Compiling source using Eclipse 3.2 + Maven 2

Need help? Post your questions here.

Moderator: moderators

Compiling source using Eclipse 3.2 + Maven 2

Postby mars96 » Fri Nov 09, 2007 7:32 pm

Hi!

I have a problem compiling subsonic 3.2 with Eclipse 3.2 and Maven2.
I've downloaded the sources, let Maven download the needed files and added some files manually when Maven wasn't able to download them (jdic and jgoodies looks/forms).

Now I want to build/compile/package the project but this doesn't work.
I think it's because the subsonic author is using IDEA as IDE and not Eclipse.
There is a special "maven-idea-plugin" section in the main pom.xml file.

Who has a solution?

EDIT: I think I got it. It works when I run it from the commandline... mvn compiler:compile


Background why I want to compile the source again:

I want to backport Subsonic to an older Java Version (1.4). I have a target platform where no Java 1.5 or greater is available.

Thanks!
cu
mars96
 
Posts: 29
Joined: Fri Nov 09, 2007 7:19 pm

Postby sindre_mehus » Sat Nov 10, 2007 6:50 am

Hi,

To generate the Eclipse project configuration run:
Code: Select all
mvn eclipse:eclipse


BTW, you don't need to download any 3rd party libraries. The ones that are not in the central Maven repository are located in the "repo" dir.

Good luck,
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Mac Compile

Postby crisbtreets » Mon Nov 12, 2007 4:30 pm

I tried compiling the 3.2 tag over the weekend on my Mac (mvn compile) and I am getting a failure in the subsonic-installer because the nsis.home is set to c:/Program Files/NSIS. Is there a way to ignore the installer when building?
crisbtreets
 
Posts: 24
Joined: Wed Jul 12, 2006 9:25 pm
Location: Boston, MA

Postby sindre_mehus » Tue Nov 13, 2007 2:30 pm

I think the easiest way is to comment out this line in the top-level pom.xml:

Code: Select all
<module>subsonic-installer</module>


Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby crisbtreets » Tue Nov 13, 2007 6:58 pm

That worked. Maven install works.

The eclipse project files don't work. All of the jars are not in the same directory as the ".classpath" file suggests. I had to manually change each one to the correct absolute path. Eclipse complies now.
crisbtreets
 
Posts: 24
Joined: Wed Jul 12, 2006 9:25 pm
Location: Boston, MA


Return to Help

Who is online

Users browsing this forum: No registered users and 17 guests