Re: eclipse and maven discrepancies
Hi, I had the same problem running caveat emptor in eclipse. The explanation was touched on earlier in this thread but not identified as the reason. The compiled classes have been placed alongside the source file folders in Eclipse. And this means the class files cannot be loaded for the TestNG framework because the classes are expected to be in the default place for a Maven enabled project test/classes To things working uncheck the checkbox called "Allow output folders for source folders". This will copy the compiled classes (and resource) put into test/classes. You can find the "Allow output folders for source folders" checkbox in > Java Build Path > Source (tab) And make sure the output folder is: yourprojectname/target/classes Good luck. Regards, Jeremy rolfst wrote: > > Hi Wayne, > > I have the tests working in eclipse, but not in maven. > And even then eclipse and maven need to work together because of some > problems in project building with eclipse. > > As I've stated before for some reason my maven build fails with testng > because surefire and testng and the embedded container do not work well > together. > > in the log I see that jboss finds the sessionbeans I've created. but when > I > do a lookup the only thing I am able to retrieve is the user transaction. > every other object (entitymanagerfactory, sessionbeans) could not be > retrieved from jndi > > any clue? > Rolf > > On 4/2/07, Wayne Fay wrote: >> >> Rolf, just wondering how far along you got in converting the >> CaveatEmptor JPA/EJB3/Hibernate app from Ant to Maven... I've been >> working on this myself some this morning. >> >> Were you ever 100% successful? Assuming you were, we should send your >> modified zip to Hibernate for inclusion on their download page. >> >> Also, why is the JBoss stuff only available on the Andromda repo? I'd >> hope JBoss would host it, or perhaps even Central. >> >> Wayne >> >> On 4/2/07, Thorsten Heit wrote: >> > Hi Rolf, >> > >> > >> > > this is not a junit test but a testng. >> > > Transactions are handled in the testmethods themselves. >> > > The error messages are not describing the real error. >> > > The problem is that for some reason during the maven execution of the >> > > test. >> > > Testng and the embeddable ejb container have some conflicts but I >> don't >> > > see why >> > > I know this only by looking at the first error and having >> commented >> > > out >> > > a line in the second test (transaction.begin) than the second test >> fails >> > > by >> > > stating that a session bean was not bound/found. >> > >> > Sorry, but I don't know TestNG, only JUnit... According to the >> exception >> I'd assume that there _is_ a problem with correctly opening and closing >> the >> transaction. If not, then at least with the initialization and/or >> shutdown >> of your test class / test method... >> > >> > Without knowing your source I'm wondering whether your failing test >> class can run standalone or relies on others for doing its checks, for >> example via static initializers, during init/shutdown etc. Have you >> checked >> that? >> > >> > >> > Cheers >> > >> > Thorsten >> > >> > - >> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> > For additional commands, e-mail: users-h...@maven.apache.org >> > >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> > > -- View this message in context: http://www.nabble.com/eclipse-and-maven-discrepancies-tp9733929p23197348.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Eclipse and maven
> BTW, where do I put things that define ${maven.java.version}? In properties inside the pom. 1.5 You could also specify them in a profile in settings.xml, but in this particular case, that doesn't make sense (at least to me). Properties in settings.xml should include things that are developer-specific, like the path to some execuatble. Justin -Original Message- From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Monday, March 09, 2009 11:19 AM To: Maven Users List Subject: Re: Eclipse and maven Thanks! I went through removing all plugins in the reporting section and slowly adding one at a time back, checking each time, and finally got it all working! Appreciate the help. BTW, where do I put things that define ${maven.java.version}? I had to put actual "1.5" there since it wasn't getting resolved. If in the settings.xml, where does that go and what is the syntax? On Mar 3, 2009, at 3:08 PM, Edelson, Justin wrote: > This is very strange. It looks like an older version of the master is > being used. > > If you run help:effective-pom against the master, does it correctly > show targetJdk = 1.5? > > You should probably get rid of the duplicate plugin configuration > within the reporting section. I don't see how that could cause this > problem, but it may be related. > > Justin > > > -Original Message- > From: John Wooten [mailto:jwoo...@shoulderscorp.com] > Sent: Tuesday, March 03, 2009 1:59 PM > To: Maven Users List > Subject: Re: Eclipse and maven > > Here is the link to the info you requested. Thanks a lot for taking > the time to help with this. > > http://pastebin.com/m57fb8d1e > > > On Mar 2, 2009, at 4:25 PM, Edelson, Justin wrote: > >> John- >> Sorry I didn't get back to you about your 1.5 problem over the >> weekend. Can you post your pom and the output of mvn >> help:effective-pom to a pastebin and send the link? >> >> As for the rest of it, I don't understand what you are trying to >> accomplish. commons, log4j, etc. are already in the central >> repository. If you need to share 3rd party JARs, use a repository >> manager (Archiva, Nexus, etc.). >> >> Justin >> >> >> >> From: John Wooten [mailto:jwoo...@shoulderscorp.com] >> Sent: Mon 3/2/2009 4:13 PM >> To: Maven Users List >> Subject: Re: Eclipse and maven >> >> >> >> I haven't fixed the problem with java 1.5 yet, but am moving all my >> projects into the maven convention. Now, I have the question: >> >> In my eclipse projects, I have a separate project called "libs" where >> I have been putting all of my external jars like java-commons, log4j, >> etc. Then in the classpath I add that project, and select the jars I >> need. I'd like to move to using the maven repository inside the >> eclipse projects and get rid of the "libs" project. How do I do that >> so that others who check out the eclipse projects still have access >> to > >> the necessary jars? Do they have to install maven also? What is the >> best direction here? >> >> On Feb 28, 2009, at 12:55 PM, Edelson, Justin wrote: >> >>> source and target are not valid configuration parameters for pmd. >>> The parameter is called targetJdk. >>> >>> The way I deal with this problem is to have a property called >>> maven.java.version and then reference that wherever necessary. >>> Currently in our organizational pom, these are: >>> >>> >>> org.apache.maven.plugins >>> maven-compiler-plugin >>> >>> ${maven.java.version} >>> ${maven.java.version} >>> >>> >>> >>> >>> org.apache.maven.plugins >>> maven-javadoc-plugin >>> ${plugin.version.javadoc} >>> >>> ${maven.java.version} >>> >>> >>> >>> org.apache.maven.plugins >>> maven-pmd-plugin >>> ${plugin.version.pmd} >>> >>> ${maven.java.version} >>> >>> >>> >>> >>> AFAIK, there is no JDK version parameter for checkstyle or jdepend. >>> >>> Hope this helps... >&
Re: Eclipse and maven
Thanks! I went through removing all plugins in the reporting section and slowly adding one at a time back, checking each time, and finally got it all working! Appreciate the help. BTW, where do I put things that define ${maven.java.version}? I had to put actual "1.5" there since it wasn't getting resolved. If in the settings.xml, where does that go and what is the syntax? On Mar 3, 2009, at 3:08 PM, Edelson, Justin wrote: This is very strange. It looks like an older version of the master is being used. If you run help:effective-pom against the master, does it correctly show targetJdk = 1.5? You should probably get rid of the duplicate plugin configuration within the reporting section. I don't see how that could cause this problem, but it may be related. Justin -Original Message- From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Tuesday, March 03, 2009 1:59 PM To: Maven Users List Subject: Re: Eclipse and maven Here is the link to the info you requested. Thanks a lot for taking the time to help with this. http://pastebin.com/m57fb8d1e On Mar 2, 2009, at 4:25 PM, Edelson, Justin wrote: John- Sorry I didn't get back to you about your 1.5 problem over the weekend. Can you post your pom and the output of mvn help:effective-pom to a pastebin and send the link? As for the rest of it, I don't understand what you are trying to accomplish. commons, log4j, etc. are already in the central repository. If you need to share 3rd party JARs, use a repository manager (Archiva, Nexus, etc.). Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Mon 3/2/2009 4:13 PM To: Maven Users List Subject: Re: Eclipse and maven I haven't fixed the problem with java 1.5 yet, but am moving all my projects into the maven convention. Now, I have the question: In my eclipse projects, I have a separate project called "libs" where I have been putting all of my external jars like java-commons, log4j, etc. Then in the classpath I add that project, and select the jars I need. I'd like to move to using the maven repository inside the eclipse projects and get rid of the "libs" project. How do I do that so that others who check out the eclipse projects still have access to the necessary jars? Do they have to install maven also? What is the best direction here? On Feb 28, 2009, at 12:55 PM, Edelson, Justin wrote: source and target are not valid configuration parameters for pmd. The parameter is called targetJdk. The way I deal with this problem is to have a property called maven.java.version and then reference that wherever necessary. Currently in our organizational pom, these are: org.apache.maven.plugins maven-compiler-plugin ${maven.java.version} ${maven.java.version} org.apache.maven.plugins maven-javadoc-plugin ${plugin.version.javadoc} ${maven.java.version} org.apache.maven.plugins maven-pmd-plugin ${plugin.version.pmd} ${maven.java.version} AFAIK, there is no JDK version parameter for checkstyle or jdepend. Hope this helps... Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Sat 2/28/2009 12:40 PM To: Maven Users List Subject: Re: Eclipse and maven I have the following in a terminal window: [woo] 543 > javac -version javac 1.5.0_16 Now, I have the java version in each of the plugins as 1.5 viz: jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. I didn't see where to specify that for the javadoc. Still get: [INFO] Generating "PMD Report" report. [WARNING] Unable to locate Source XRef to link to - DISABLED [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! In the section I have org.apache.maven.plugins maven-pmd-plugin 1.5 1.5 /rulesets/basic.xml /rulesets/imports.xml /rulesets/unusedcode.xml /rulesets/finalizers.xml On Feb 27, 2009, at 7:25 PM, Edelson, Justin wrote: I believe that's a javadoc warning (not error). In addition to maven- compiler-plug
RE: Eclipse and maven
This is very strange. It looks like an older version of the master is being used. If you run help:effective-pom against the master, does it correctly show targetJdk = 1.5? You should probably get rid of the duplicate plugin configuration within the reporting section. I don't see how that could cause this problem, but it may be related. Justin -Original Message- From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Tuesday, March 03, 2009 1:59 PM To: Maven Users List Subject: Re: Eclipse and maven Here is the link to the info you requested. Thanks a lot for taking the time to help with this. http://pastebin.com/m57fb8d1e On Mar 2, 2009, at 4:25 PM, Edelson, Justin wrote: > John- > Sorry I didn't get back to you about your 1.5 problem over the > weekend. Can you post your pom and the output of mvn > help:effective-pom to a pastebin and send the link? > > As for the rest of it, I don't understand what you are trying to > accomplish. commons, log4j, etc. are already in the central > repository. If you need to share 3rd party JARs, use a repository > manager (Archiva, Nexus, etc.). > > Justin > > > > From: John Wooten [mailto:jwoo...@shoulderscorp.com] > Sent: Mon 3/2/2009 4:13 PM > To: Maven Users List > Subject: Re: Eclipse and maven > > > > I haven't fixed the problem with java 1.5 yet, but am moving all my > projects into the maven convention. Now, I have the question: > > In my eclipse projects, I have a separate project called "libs" where > I have been putting all of my external jars like java-commons, log4j, > etc. Then in the classpath I add that project, and select the jars I > need. I'd like to move to using the maven repository inside the > eclipse projects and get rid of the "libs" project. How do I do that > so that others who check out the eclipse projects still have access to > the necessary jars? Do they have to install maven also? What is the > best direction here? > > On Feb 28, 2009, at 12:55 PM, Edelson, Justin wrote: > >> source and target are not valid configuration parameters for pmd. >> The parameter is called targetJdk. >> >> The way I deal with this problem is to have a property called >> maven.java.version and then reference that wherever necessary. >> Currently in our organizational pom, these are: >> >> >> org.apache.maven.plugins >> maven-compiler-plugin >> >> ${maven.java.version} >> ${maven.java.version} >> >> >> >> >> org.apache.maven.plugins >> maven-javadoc-plugin >> ${plugin.version.javadoc} >> >> ${maven.java.version} >> >> >> >> org.apache.maven.plugins >> maven-pmd-plugin >> ${plugin.version.pmd} >> >> ${maven.java.version} >> >> >> >> >> AFAIK, there is no JDK version parameter for checkstyle or jdepend. >> >> Hope this helps... >> >> Justin >> >> >> >> From: John Wooten [mailto:jwoo...@shoulderscorp.com] >> Sent: Sat 2/28/2009 12:40 PM >> To: Maven Users List >> Subject: Re: Eclipse and maven >> >> >> >> I have the following in a terminal window: >> >> [woo] 543 > javac -version >> javac 1.5.0_16 >> >> >> Now, I have the java version in each of the plugins as 1.5 >> >> viz: >> >> jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. >> I didn't see where to specify that for the javadoc. >> >> Still get: >> >> [INFO] Generating "PMD Report" report. >> [WARNING] Unable to locate Source XRef to link to - DISABLED >> [WARNING] File encoding has not been set, using platform encoding >> MacRoman, i.e. build is platform dependent! >> [WARNING] Error while parsing /Users/woo/Development/workspaces/ >> areteq/ >> modules/Foundation/src/main/java/com/areteq/common/ >> HashMapHandler.java: Can't use generics unless running in JDK 1.5 >> mode! >> [WARNING] Error while parsing /Users/woo/Development/workspaces/ >> areteq/ >> modules/Foundation/src/main/java/com/areteq/common/ >> HashMapHan
Re: Eclipse and maven
Here is the link to the info you requested. Thanks a lot for taking the time to help with this. http://pastebin.com/m57fb8d1e On Mar 2, 2009, at 4:25 PM, Edelson, Justin wrote: John- Sorry I didn't get back to you about your 1.5 problem over the weekend. Can you post your pom and the output of mvn help:effective-pom to a pastebin and send the link? As for the rest of it, I don't understand what you are trying to accomplish. commons, log4j, etc. are already in the central repository. If you need to share 3rd party JARs, use a repository manager (Archiva, Nexus, etc.). Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Mon 3/2/2009 4:13 PM To: Maven Users List Subject: Re: Eclipse and maven I haven't fixed the problem with java 1.5 yet, but am moving all my projects into the maven convention. Now, I have the question: In my eclipse projects, I have a separate project called "libs" where I have been putting all of my external jars like java-commons, log4j, etc. Then in the classpath I add that project, and select the jars I need. I'd like to move to using the maven repository inside the eclipse projects and get rid of the "libs" project. How do I do that so that others who check out the eclipse projects still have access to the necessary jars? Do they have to install maven also? What is the best direction here? On Feb 28, 2009, at 12:55 PM, Edelson, Justin wrote: source and target are not valid configuration parameters for pmd. The parameter is called targetJdk. The way I deal with this problem is to have a property called maven.java.version and then reference that wherever necessary. Currently in our organizational pom, these are: org.apache.maven.plugins maven-compiler-plugin ${maven.java.version} ${maven.java.version} org.apache.maven.plugins maven-javadoc-plugin ${plugin.version.javadoc} ${maven.java.version} org.apache.maven.plugins maven-pmd-plugin ${plugin.version.pmd} ${maven.java.version} AFAIK, there is no JDK version parameter for checkstyle or jdepend. Hope this helps... Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Sat 2/28/2009 12:40 PM To: Maven Users List Subject: Re: Eclipse and maven I have the following in a terminal window: [woo] 543 > javac -version javac 1.5.0_16 Now, I have the java version in each of the plugins as 1.5 viz: jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. I didn't see where to specify that for the javadoc. Still get: [INFO] Generating "PMD Report" report. [WARNING] Unable to locate Source XRef to link to - DISABLED [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! In the section I have org.apache.maven.plugins maven-pmd-plugin 1.5 1.5 /rulesets/basic.xml /rulesets/imports.xml /rulesets/unusedcode.xml /rulesets/finalizers.xml On Feb 27, 2009, at 7:25 PM, Edelson, Justin wrote: I believe that's a javadoc warning (not error). In addition to maven- compiler-plugin, you also need to specify the Java version in the javadoc plugin (in the reporting section) and, if you use it, the pmd plugin. Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Fri 2/27/2009 7:16 PM To: Maven Users List Subject: Re: Eclipse and maven That is 1 place I have it. Still get error. Pardon bad thumbsmanship. Sent from mobile phone. On Feb 27, 2009, at 7:05 PM, Rusty Wright wrote: Only one plugin needs that: maven-compiler-plugin 1.5 1.5 etc. John Wooten wrote: I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! Would be nice to spe
RE: Eclipse and maven
John- Sorry I didn't get back to you about your 1.5 problem over the weekend. Can you post your pom and the output of mvn help:effective-pom to a pastebin and send the link? As for the rest of it, I don't understand what you are trying to accomplish. commons, log4j, etc. are already in the central repository. If you need to share 3rd party JARs, use a repository manager (Archiva, Nexus, etc.). Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Mon 3/2/2009 4:13 PM To: Maven Users List Subject: Re: Eclipse and maven I haven't fixed the problem with java 1.5 yet, but am moving all my projects into the maven convention. Now, I have the question: In my eclipse projects, I have a separate project called "libs" where I have been putting all of my external jars like java-commons, log4j, etc. Then in the classpath I add that project, and select the jars I need. I'd like to move to using the maven repository inside the eclipse projects and get rid of the "libs" project. How do I do that so that others who check out the eclipse projects still have access to the necessary jars? Do they have to install maven also? What is the best direction here? On Feb 28, 2009, at 12:55 PM, Edelson, Justin wrote: > source and target are not valid configuration parameters for pmd. > The parameter is called targetJdk. > > The way I deal with this problem is to have a property called > maven.java.version and then reference that wherever necessary. > Currently in our organizational pom, these are: > > >org.apache.maven.plugins >maven-compiler-plugin > >${maven.java.version} >${maven.java.version} > > > > >org.apache.maven.plugins >maven-javadoc-plugin >${plugin.version.javadoc} > >${maven.java.version} > > > >org.apache.maven.plugins >maven-pmd-plugin >${plugin.version.pmd} > >${maven.java.version} > > > > > AFAIK, there is no JDK version parameter for checkstyle or jdepend. > > Hope this helps... > > Justin > > ____________ > > From: John Wooten [mailto:jwoo...@shoulderscorp.com] > Sent: Sat 2/28/2009 12:40 PM > To: Maven Users List > Subject: Re: Eclipse and maven > > > > I have the following in a terminal window: > > [woo] 543 > javac -version > javac 1.5.0_16 > > > Now, I have the java version in each of the plugins as 1.5 > > viz: > > jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. I > didn't see where to specify that for the javadoc. > > Still get: > > [INFO] Generating "PMD Report" report. > [WARNING] Unable to locate Source XRef to link to - DISABLED > [WARNING] File encoding has not been set, using platform encoding > MacRoman, i.e. build is platform dependent! > [WARNING] Error while parsing /Users/woo/Development/workspaces/ > areteq/ > modules/Foundation/src/main/java/com/areteq/common/ > HashMapHandler.java: Can't use generics unless running in JDK 1.5 > mode! > [WARNING] Error while parsing /Users/woo/Development/workspaces/ > areteq/ > modules/Foundation/src/main/java/com/areteq/common/ > HashMapHandler.java: Can't use generics unless running in JDK 1.5 > mode! > > > In the section I have > > org.apache.maven.plugins > maven-pmd-plugin > > 1.5 > 1.5 > > /rulesets/basic.xml > /rulesets/imports.xml > /rulesets/unusedcode.xml > /rulesets/finalizers.xml > > > > > > > On Feb 27, 2009, at 7:25 PM, Edelson, Justin wrote: > >> I believe that's a javadoc warning (not error). In addition to maven- >> compiler-plugin, you also need to specify the Java version in the >> javadoc plugin (in the reporting section) and, if you use it, the >> pmd plugin. >> >> Justin >> >> >> >> From: John Wooten [mailto:jwoo...@shoulderscorp.com] >> Sent: Fri 2/27/2009 7:16 PM >> To: Maven Users List >> Subject: Re: Eclipse and maven >> >> >> >> That is 1 place I have it. Still get error. >> >> Pardon bad thumbsmanship. Sent from mobile phone. >> >> On Feb 27, 2009, at 7:05 PM, R
Re: Eclipse and maven
I haven't fixed the problem with java 1.5 yet, but am moving all my projects into the maven convention. Now, I have the question: In my eclipse projects, I have a separate project called "libs" where I have been putting all of my external jars like java-commons, log4j, etc. Then in the classpath I add that project, and select the jars I need. I'd like to move to using the maven repository inside the eclipse projects and get rid of the "libs" project. How do I do that so that others who check out the eclipse projects still have access to the necessary jars? Do they have to install maven also? What is the best direction here? On Feb 28, 2009, at 12:55 PM, Edelson, Justin wrote: source and target are not valid configuration parameters for pmd. The parameter is called targetJdk. The way I deal with this problem is to have a property called maven.java.version and then reference that wherever necessary. Currently in our organizational pom, these are: org.apache.maven.plugins maven-compiler-plugin ${maven.java.version} ${maven.java.version} org.apache.maven.plugins maven-javadoc-plugin ${plugin.version.javadoc} ${maven.java.version} org.apache.maven.plugins maven-pmd-plugin ${plugin.version.pmd} ${maven.java.version} AFAIK, there is no JDK version parameter for checkstyle or jdepend. Hope this helps... Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Sat 2/28/2009 12:40 PM To: Maven Users List Subject: Re: Eclipse and maven I have the following in a terminal window: [woo] 543 > javac -version javac 1.5.0_16 Now, I have the java version in each of the plugins as 1.5 viz: jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. I didn't see where to specify that for the javadoc. Still get: [INFO] Generating "PMD Report" report. [WARNING] Unable to locate Source XRef to link to - DISABLED [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! In the section I have org.apache.maven.plugins maven-pmd-plugin 1.5 1.5 /rulesets/basic.xml /rulesets/imports.xml /rulesets/unusedcode.xml /rulesets/finalizers.xml On Feb 27, 2009, at 7:25 PM, Edelson, Justin wrote: I believe that's a javadoc warning (not error). In addition to maven- compiler-plugin, you also need to specify the Java version in the javadoc plugin (in the reporting section) and, if you use it, the pmd plugin. Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Fri 2/27/2009 7:16 PM To: Maven Users List Subject: Re: Eclipse and maven That is 1 place I have it. Still get error. Pardon bad thumbsmanship. Sent from mobile phone. On Feb 27, 2009, at 7:05 PM, Rusty Wright wrote: Only one plugin needs that: maven-compiler-plugin 1.5 1.5 etc. John Wooten wrote: I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! Would be nice to specify this in one place ( run in JDK 1.5 mode ). On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: See comparison at http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration regards, Eugene supareno wrote: David, http://code.google.com/p/q4e is a very good tool too though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html Sent from the Maven - Users mailing list archive at Nabble.com. --- -- To unsubscribe, e
Re: Eclipse and maven
Made change suggested to targetJdk, and yes I am running 1.5 as the default. Got the following: [INFO] Generating "PMD Report" report. [WARNING] Unable to locate Source XRef to link to - DISABLED [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [ What else can be wrong? On Feb 28, 2009, at 12:55 PM, Edelson, Justin wrote: targetJdk - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
Thnx! Hard 2 believe we have different tags 4 the same behavior in each plugin! Pardon bad thumbsmanship. Sent from mobile phone. On Feb 28, 2009, at 12:55 PM, "Edelson, Justin" > wrote: source and target are not valid configuration parameters for pmd. The parameter is called targetJdk. The way I deal with this problem is to have a property called maven.java.version and then reference that wherever necessary. Currently in our organizational pom, these are: org.apache.maven.plugins maven-compiler-plugin ${maven.java.version} ${maven.java.version} org.apache.maven.plugins maven-javadoc-plugin ${plugin.version.javadoc} ${maven.java.version} org.apache.maven.plugins maven-pmd-plugin ${plugin.version.pmd} ${maven.java.version} AFAIK, there is no JDK version parameter for checkstyle or jdepend. Hope this helps... Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Sat 2/28/2009 12:40 PM To: Maven Users List Subject: Re: Eclipse and maven I have the following in a terminal window: [woo] 543 > javac -version javac 1.5.0_16 Now, I have the java version in each of the plugins as 1.5 viz: jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. I didn't see where to specify that for the javadoc. Still get: [INFO] Generating "PMD Report" report. [WARNING] Unable to locate Source XRef to link to - DISABLED [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! In the section I have org.apache.maven.plugins maven-pmd-plugin 1.5 1.5 /rulesets/basic.xml /rulesets/imports.xml /rulesets/unusedcode.xml /rulesets/finalizers.xml On Feb 27, 2009, at 7:25 PM, Edelson, Justin wrote: I believe that's a javadoc warning (not error). In addition to maven- compiler-plugin, you also need to specify the Java version in the javadoc plugin (in the reporting section) and, if you use it, the pmd plugin. Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Fri 2/27/2009 7:16 PM To: Maven Users List Subject: Re: Eclipse and maven That is 1 place I have it. Still get error. Pardon bad thumbsmanship. Sent from mobile phone. On Feb 27, 2009, at 7:05 PM, Rusty Wright wrote: Only one plugin needs that: maven-compiler-plugin 1.5 1.5 etc. John Wooten wrote: I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! Would be nice to specify this in one place ( run in JDK 1.5 mode ). On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: See comparison at http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration regards, Eugene supareno wrote: David, http://code.google.com/p/q4e is a very good tool too though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html Sent from the Maven - Users mailing list archive at Nabble.com. --- -- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --- -- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --- -- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Eclipse and maven
source and target are not valid configuration parameters for pmd. The parameter is called targetJdk. The way I deal with this problem is to have a property called maven.java.version and then reference that wherever necessary. Currently in our organizational pom, these are: org.apache.maven.plugins maven-compiler-plugin ${maven.java.version} ${maven.java.version} org.apache.maven.plugins maven-javadoc-plugin ${plugin.version.javadoc} ${maven.java.version} org.apache.maven.plugins maven-pmd-plugin ${plugin.version.pmd} ${maven.java.version} AFAIK, there is no JDK version parameter for checkstyle or jdepend. Hope this helps... Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Sat 2/28/2009 12:40 PM To: Maven Users List Subject: Re: Eclipse and maven I have the following in a terminal window: [woo] 543 > javac -version javac 1.5.0_16 Now, I have the java version in each of the plugins as 1.5 viz: jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. I didn't see where to specify that for the javadoc. Still get: [INFO] Generating "PMD Report" report. [WARNING] Unable to locate Source XRef to link to - DISABLED [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! In the section I have org.apache.maven.plugins maven-pmd-plugin 1.5 1.5 /rulesets/basic.xml /rulesets/imports.xml /rulesets/unusedcode.xml /rulesets/finalizers.xml On Feb 27, 2009, at 7:25 PM, Edelson, Justin wrote: > I believe that's a javadoc warning (not error). In addition to maven- > compiler-plugin, you also need to specify the Java version in the > javadoc plugin (in the reporting section) and, if you use it, the > pmd plugin. > > Justin > > > > From: John Wooten [mailto:jwoo...@shoulderscorp.com] > Sent: Fri 2/27/2009 7:16 PM > To: Maven Users List > Subject: Re: Eclipse and maven > > > > That is 1 place I have it. Still get error. > > Pardon bad thumbsmanship. Sent from mobile phone. > > On Feb 27, 2009, at 7:05 PM, Rusty Wright > wrote: > >> Only one plugin needs that: >> >> >> >>maven-compiler-plugin >> >> >> 1.5 >> 1.5 >> >> >> etc. >> >> >> John Wooten wrote: >>> I have added: >>> >>>1.5 >>>1.5 >>> >>> to each plugin and I still get: >>> [WARNING] Error while parsing /Users/woo/Development/workspaces/ >>> areteq/modules/Foundation/src/main/java/com/areteq/common/ >>> HashMapHandler.java: Can't use generics unless running in JDK 1.5 >>> mode! >>> Would be nice to specify this in one place ( run in JDK 1.5 mode ). >>> On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: >>>> >>>> >>>> See comparison at >>>> http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration >>>> >>>> regards, >>>> Eugene >>>> >>>> >>>> >>>> supareno wrote: >>>>> >>>>> David, >>>>> >>>>> http://code.google.com/p/q4e is a very good tool too >>>>> >>>>>> though...i would also encourage you to check out the M2Eclipse >>>>>> plugin >>>>>> for Eclipse. it does a really good job of helping with the >>>>>> integration of Maven and Eclipse >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461
Re: Eclipse and maven
I have the following in a terminal window: [woo] 543 > javac -version javac 1.5.0_16 Now, I have the java version in each of the plugins as 1.5 viz: jdepend plugin, surefire plugin, pmd plugin, and checkstyle plugin. I didn't see where to specify that for the javadoc. Still get: [INFO] Generating "PMD Report" report. [WARNING] Unable to locate Source XRef to link to - DISABLED [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! In the section I have org.apache.maven.plugins maven-pmd-plugin 1.5 1.5 /rulesets/basic.xml /rulesets/imports.xml /rulesets/unusedcode.xml /rulesets/finalizers.xml On Feb 27, 2009, at 7:25 PM, Edelson, Justin wrote: I believe that's a javadoc warning (not error). In addition to maven- compiler-plugin, you also need to specify the Java version in the javadoc plugin (in the reporting section) and, if you use it, the pmd plugin. Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Fri 2/27/2009 7:16 PM To: Maven Users List Subject: Re: Eclipse and maven That is 1 place I have it. Still get error. Pardon bad thumbsmanship. Sent from mobile phone. On Feb 27, 2009, at 7:05 PM, Rusty Wright wrote: Only one plugin needs that: maven-compiler-plugin 1.5 1.5 etc. John Wooten wrote: I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! Would be nice to specify this in one place ( run in JDK 1.5 mode ). On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: See comparison at http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration regards, Eugene supareno wrote: David, http://code.google.com/p/q4e is a very good tool too though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html Sent from the Maven - Users mailing list archive at Nabble.com. --- -- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
This might be a dumb question, but it's easy enough to overlook. You do, in fact, have a 1.5 JVM installed, right? (I'm not trying to be a wise ass. I just haven't seen mention of that particular fact or question in this thread, yet.) John Wooten wrote: I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/modules/Foundation/src/main/java/com/areteq/common/HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
Try "mvn help:effective-pom" and check what plugin configuration is used for that project. regards, Eugene John Wooten-2 wrote: > > I have added: > > > 1.5 > 1.5 > > > > to each plugin and I still get: > > [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ > modules/Foundation/src/main/java/com/areteq/common/ > HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! > > Would be nice to specify this in one place ( run in JDK 1.5 mode ). > > > On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: > >> >> >> See comparison at >> http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration >> >> regards, >> Eugene >> >> >> >> supareno wrote: >>> >>> David, >>> >>> http://code.google.com/p/q4e is a very good tool too >>> though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22257832.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
Try this: create a folder in one of your project, create a pom.xml in that folder. Then you can import that nested project with m2eclipse using "Import... / Maven projects wizard" or if you have .project and .classpath can also use "Import... / Existing projects into workspace". regards, Eugene John Wooten-2 wrote: > > Uses Ganymede, when I try to move one project as a folder under > another, by trying to do a New/Project or a Refactor, it says it can > not create a project under another project. > > On Feb 27, 2009, at 4:02 PM, Eugene Kuleshov wrote: > >> >> >> Sure it will. Unless you are using 3..4 year old version of Eclipse. >> >> regards, >> Eugene >> >> >> John Wooten-2 wrote: >>> >>> Eclipse won't let you nest projects in a directory structure. >>> >>> On Feb 27, 2009, at 9:14 AM, Edelson, Justin wrote: >>> This looks like the right directory structure to me. Each directory with a pom.xml file would be an Eclipse project. Why do you think this won't work? Justin >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Eclipse-and-maven-tp22245841p22254394.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22257816.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
I feel vindicated; in a previous post of mine I was also saying that I thought eclipse didn't like nested projects. ;-) The way I took my first baby steps with maven and eclipse is that I used the appfuse modular spring archetype. From the command line type mvn \ archetype:create \ -DarchetypeGroupId=org.appfuse.archetypes \ -DarchetypeArtifactId=appfuse-modular-spring \ -DremoteRepositories=http://static.appfuse.org/releases \ -DarchetypeVersion=2.0.2 \ -DgroupId=com.mycompany.app \ -DartifactId=myproject Then look in the myproject directory, and in its core and web directories. Within eclipse you can do File > New > Other and then in the Select a wizard window go into the Maven folder and select Maven Project and then click Next, then leave Create a simple project unselected, so it brings up the archetype selector, then scroll down and find org.appfuse.archetypes and use one of the appfuse-modular ones. Keep an eye on the bottom of the eclipse window and the status; it cranks for a while getting it all set up. Then, outside of eclipse, look at how it set things up, and eyeball the pom.xml files. John Wooten wrote: Uses Ganymede, when I try to move one project as a folder under another, by trying to do a New/Project or a Refactor, it says it can not create a project under another project. On Feb 27, 2009, at 4:02 PM, Eugene Kuleshov wrote: Sure it will. Unless you are using 3..4 year old version of Eclipse. regards, Eugene John Wooten-2 wrote: Eclipse won't let you nest projects in a directory structure. On Feb 27, 2009, at 9:14 AM, Edelson, Justin wrote: This looks like the right directory structure to me. Each directory with a pom.xml file would be an Eclipse project. Why do you think this won't work? Justin -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254394.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Eclipse and maven
I believe that's a javadoc warning (not error). In addition to maven-compiler-plugin, you also need to specify the Java version in the javadoc plugin (in the reporting section) and, if you use it, the pmd plugin. Justin From: John Wooten [mailto:jwoo...@shoulderscorp.com] Sent: Fri 2/27/2009 7:16 PM To: Maven Users List Subject: Re: Eclipse and maven That is 1 place I have it. Still get error. Pardon bad thumbsmanship. Sent from mobile phone. On Feb 27, 2009, at 7:05 PM, Rusty Wright wrote: > Only one plugin needs that: > > > > maven-compiler-plugin > > > 1.5 > 1.5 > > > etc. > > > John Wooten wrote: >> I have added: >> >> 1.5 >> 1.5 >> >> to each plugin and I still get: >> [WARNING] Error while parsing /Users/woo/Development/workspaces/ >> areteq/modules/Foundation/src/main/java/com/areteq/common/ >> HashMapHandler.java: Can't use generics unless running in JDK 1.5 >> mode! >> Would be nice to specify this in one place ( run in JDK 1.5 mode ). >> On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: >>> >>> >>> See comparison at >>> http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration >>> >>> regards, >>> Eugene >>> >>> >>> >>> supareno wrote: >>>> >>>> David, >>>> >>>> http://code.google.com/p/q4e is a very good tool too >>>> >>>>> though...i would also encourage you to check out the M2Eclipse >>>>> plugin >>>>> for Eclipse. it does a really good job of helping with the >>>>> integration of Maven and Eclipse >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html >>> Sent from the Maven - Users mailing list archive at Nabble.com. >>> >>> >>> --- >>> -- >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
That is 1 place I have it. Still get error. Pardon bad thumbsmanship. Sent from mobile phone. On Feb 27, 2009, at 7:05 PM, Rusty Wright wrote: Only one plugin needs that: maven-compiler-plugin 1.5 1.5 etc. John Wooten wrote: I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/ areteq/modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! Would be nice to specify this in one place ( run in JDK 1.5 mode ). On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: See comparison at http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration regards, Eugene supareno wrote: David, http://code.google.com/p/q4e is a very good tool too though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html Sent from the Maven - Users mailing list archive at Nabble.com. --- -- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
Only one plugin needs that: maven-compiler-plugin 1.5 1.5 etc. John Wooten wrote: I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/modules/Foundation/src/main/java/com/areteq/common/HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! Would be nice to specify this in one place ( run in JDK 1.5 mode ). On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: See comparison at http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration regards, Eugene supareno wrote: David, http://code.google.com/p/q4e is a very good tool too though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
I have added: 1.5 1.5 to each plugin and I still get: [WARNING] Error while parsing /Users/woo/Development/workspaces/areteq/ modules/Foundation/src/main/java/com/areteq/common/ HashMapHandler.java: Can't use generics unless running in JDK 1.5 mode! Would be nice to specify this in one place ( run in JDK 1.5 mode ). On Feb 27, 2009, at 4:06 PM, Eugene Kuleshov wrote: See comparison at http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration regards, Eugene supareno wrote: David, http://code.google.com/p/q4e is a very good tool too though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
Uses Ganymede, when I try to move one project as a folder under another, by trying to do a New/Project or a Refactor, it says it can not create a project under another project. On Feb 27, 2009, at 4:02 PM, Eugene Kuleshov wrote: Sure it will. Unless you are using 3..4 year old version of Eclipse. regards, Eugene John Wooten-2 wrote: Eclipse won't let you nest projects in a directory structure. On Feb 27, 2009, at 9:14 AM, Edelson, Justin wrote: This looks like the right directory structure to me. Each directory with a pom.xml file would be an Eclipse project. Why do you think this won't work? Justin -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254394.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
See comparison at http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration regards, Eugene supareno wrote: > > David, > > http://code.google.com/p/q4e is a very good tool too > >> though...i would also encourage you to check out the M2Eclipse plugin >> for Eclipse. it does a really good job of helping with the >> integration of Maven and Eclipse > -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254461.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
I attest that, the latest incarnation of q4e (the dev release at http://q4e.googlecode.com/svn/trunk/updatesite-dev/) has solved all the performance issues - I have 40-50 projects on my workspace and it's still super fast. Kalle On Fri, Feb 27, 2009 at 11:18 AM, supareno wrote: > David, > > http://code.google.com/p/q4e is a very good tool too > > though...i would also encourage you to check out the M2Eclipse plugin for >> Eclipse. it does a really good job of helping with the integration of Maven >> and Eclipse >> >> John Wooten wrote: >> >>> Eclipse won't let you nest projects in a directory structure. >>> >>> >>> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Eclipse and maven
Sure it will. Unless you are using 3..4 year old version of Eclipse. regards, Eugene John Wooten-2 wrote: > > Eclipse won't let you nest projects in a directory structure. > > On Feb 27, 2009, at 9:14 AM, Edelson, Justin wrote: > >> This looks like the right directory structure to me. Each directory >> with a pom.xml file would be an Eclipse project. Why do you think >> this won't work? >> >> Justin > -- View this message in context: http://www.nabble.com/Eclipse-and-maven-tp22245841p22254394.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
David, http://code.google.com/p/q4e is a very good tool too though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse John Wooten wrote: Eclipse won't let you nest projects in a directory structure. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
though...i would also encourage you to check out the M2Eclipse plugin for Eclipse. it does a really good job of helping with the integration of Maven and Eclipse John Wooten wrote: Eclipse won't let you nest projects in a directory structure. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
run "mvn eclipse:eclipse" from the base project and it will create all of the .project and .classpath files for you to import into Eclipse. John Wooten wrote: Eclipse won't let you nest projects in a directory structure. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
Eclipse won't let you nest projects in a directory structure. On Feb 27, 2009, at 9:14 AM, Edelson, Justin wrote: This looks like the right directory structure to me. Each directory with a pom.xml file would be an Eclipse project. Why do you think this won't work? Justin On Feb 27, 2009, at 8:25 AM, "John Wooten" wrote: I'm trying to set up the structure below which was suggested as an appropriate structure for maven when there were multiple products depending upon common modules. /areteq /pom.xml - super pom - contains site information, etc.? /modules /foundation /pom.xml - to create the foundation jar (common to all products) /src .. in all of these /engine /pom.xml - to create the engine jar ( common to all products ) /pre-processors /pom.xml - to create all pre-processor jars /pre-processor1 /pom.xml - to create pre-processor1 jar /pre-processor2 / etc. /post-processors /renderers /products /pom.xml - to create all products and test? /product1 /pom.xml - to create product1 and test? Contains list of child modules it depends upon? /src - not clear there is much here except for resources, data, configurations. /product2 etc. However, it is difficult to also use this with Eclipse as one cannot have a project "areteq" and then have other projects, viz. "foundation" under that. I want to be able to use "foundation" as an eclipse project for interactive development and debugging, but use the maven pom's to do integrated testing documentation, profiling, etc. Do I make foundation a separate eclipse project, but use the maven structure inside of it, and then just have pom's in the areteq project that refer to the eclipse projects ( i.e. directories ) using relative paths? Right now "areteq" and "foundation" are at the same directory level. John W. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and maven
This looks like the right directory structure to me. Each directory with a pom.xml file would be an Eclipse project. Why do you think this won't work? Justin On Feb 27, 2009, at 8:25 AM, "John Wooten" wrote: I'm trying to set up the structure below which was suggested as an appropriate structure for maven when there were multiple products depending upon common modules. /areteq /pom.xml - super pom - contains site information, etc.? /modules /foundation /pom.xml - to create the foundation jar (common to all products) /src .. in all of these /engine /pom.xml - to create the engine jar ( common to all products ) /pre-processors /pom.xml - to create all pre-processor jars /pre-processor1 /pom.xml - to create pre-processor1 jar /pre-processor2 / etc. /post-processors /renderers /products /pom.xml - to create all products and test? /product1 /pom.xml - to create product1 and test? Contains list of child modules it depends upon? /src - not clear there is much here except for resources, data, configurations. /product2 etc. However, it is difficult to also use this with Eclipse as one cannot have a project "areteq" and then have other projects, viz. "foundation" under that. I want to be able to use "foundation" as an eclipse project for interactive development and debugging, but use the maven pom's to do integrated testing documentation, profiling, etc. Do I make foundation a separate eclipse project, but use the maven structure inside of it, and then just have pom's in the areteq project that refer to the eclipse projects ( i.e. directories ) using relative paths? Right now "areteq" and "foundation" are at the same directory level. John W. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Eclipse and Maven "best practice"
I don't currently use any of the Maven Eclipse IDE integration plugins and just use Eclipse's external tools facility to run mvn for any selected folder in Eclipse's 'Package Explorer' pane. At least this way you know Maven is behaving as it does from the command line, for new dependency I add to pom.xml and run eclipse:eclipse, but this can be done from inside Eclipse aswell. e.g. Set up a new External Tool as follows : Name: mvn clean install Location: ${env_var:M2_HOME}/bin/mvn.bat Working Directory: ${resource_loc} Arguments: clean install Then just select the folder or project in the Eclipse Java Tree (folder must have a pom.xml in it) then select this external tool 'mvn clean install' - once run once it will be on the drop down. You can set up the common maven goals like this, then share the External tools configuration by using the 'Common' tab and specifying a folder that is under SCM. Also can set up an 'General Project' in Eclipse that points to your local repo folder, this allows you to search this area and open pom files if necessary. I would gladly swap to a Plugin but there always seems to be unexpected side effects. On 18/09/2007, Pete <[EMAIL PROTECTED]> wrote: > I use Eclipse and the External Tools configuration to run mvn from > within eclipse if needed. > > I used to have Eclipse compiling to a different classes directory and > that worked fine for many projects, but recently I use 'mvn > jetty:run' all the time so that when I save a java file in Eclipse it > gets compiled immediately by Eclipse and the change will be instantly > visible in Jetty. Working this way eclipse and mvn must compile to > same place, as jetty start up using the classpath that mvn is using. > > > On 17/09/2007, Jim Sellers <[EMAIL PROTECTED]> wrote: > > I'd take a look at what files are generated when you create a new project > > using SAP. Are there other folders / files that are created? (starting > > with a dot). > > > > Are there project natures / builders that are not being included (in the > > .project file)? > > > > It sounds like there is *something* missing that SAP is reading / looking > > at. > > > > Jim > > > > > > On 9/17/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > Since we're talking about Eclipse... As I said before, I'm using SAP > > > NWDS (2.0.14) which is based on Eclipse v2.1. I'm using > > > eclipse:eclipse to generate metadata and added the proper perspectives > > > etc. > > > > > > When I create a new project (J2EE, EJB Module Project or Web Module > > > Project) then it shows up in the J2EE Explorer and things are good. > > > > > > When I use mvn e:e and then import the project, it comes in as a > > > "standard" Java project. I've tried editing metadata files manually > > > but its still not coming up the way I was hoping. The EJB project > > > shows up in J2EE Explorer but the beans don't show up since I'm not > > > using the default ejbModule directory etc. > > > > > > Any ideas? I might try upgrading to the latest NWDS build which is > > > based on Eclipse 3, apparently. > > > > > > Wayne > > > > > > On 9/16/07, Thierry Lach <[EMAIL PROTECTED]> wrote: > > > > There can be problems caused with a single build destination caused by > > > the > > > > Eclipse incremental compiler that would sometimes require doing a clean > > > in > > > > both maven and eclipse. > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
I use Eclipse and the External Tools configuration to run mvn from within eclipse if needed. I used to have Eclipse compiling to a different classes directory and that worked fine for many projects, but recently I use 'mvn jetty:run' all the time so that when I save a java file in Eclipse it gets compiled immediately by Eclipse and the change will be instantly visible in Jetty. Working this way eclipse and mvn must compile to same place, as jetty start up using the classpath that mvn is using. On 17/09/2007, Jim Sellers <[EMAIL PROTECTED]> wrote: > I'd take a look at what files are generated when you create a new project > using SAP. Are there other folders / files that are created? (starting > with a dot). > > Are there project natures / builders that are not being included (in the > .project file)? > > It sounds like there is *something* missing that SAP is reading / looking > at. > > Jim > > > On 9/17/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > Since we're talking about Eclipse... As I said before, I'm using SAP > > NWDS (2.0.14) which is based on Eclipse v2.1. I'm using > > eclipse:eclipse to generate metadata and added the proper perspectives > > etc. > > > > When I create a new project (J2EE, EJB Module Project or Web Module > > Project) then it shows up in the J2EE Explorer and things are good. > > > > When I use mvn e:e and then import the project, it comes in as a > > "standard" Java project. I've tried editing metadata files manually > > but its still not coming up the way I was hoping. The EJB project > > shows up in J2EE Explorer but the beans don't show up since I'm not > > using the default ejbModule directory etc. > > > > Any ideas? I might try upgrading to the latest NWDS build which is > > based on Eclipse 3, apparently. > > > > Wayne > > > > On 9/16/07, Thierry Lach <[EMAIL PROTECTED]> wrote: > > > There can be problems caused with a single build destination caused by > > the > > > Eclipse incremental compiler that would sometimes require doing a clean > > in > > > both maven and eclipse. > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
I'd take a look at what files are generated when you create a new project using SAP. Are there other folders / files that are created? (starting with a dot). Are there project natures / builders that are not being included (in the .project file)? It sounds like there is *something* missing that SAP is reading / looking at. Jim On 9/17/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > Since we're talking about Eclipse... As I said before, I'm using SAP > NWDS (2.0.14) which is based on Eclipse v2.1. I'm using > eclipse:eclipse to generate metadata and added the proper perspectives > etc. > > When I create a new project (J2EE, EJB Module Project or Web Module > Project) then it shows up in the J2EE Explorer and things are good. > > When I use mvn e:e and then import the project, it comes in as a > "standard" Java project. I've tried editing metadata files manually > but its still not coming up the way I was hoping. The EJB project > shows up in J2EE Explorer but the beans don't show up since I'm not > using the default ejbModule directory etc. > > Any ideas? I might try upgrading to the latest NWDS build which is > based on Eclipse 3, apparently. > > Wayne > > On 9/16/07, Thierry Lach <[EMAIL PROTECTED]> wrote: > > There can be problems caused with a single build destination caused by > the > > Eclipse incremental compiler that would sometimes require doing a clean > in > > both maven and eclipse. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Eclipse and Maven "best practice"
Thierry is definitely right that you can run into inconsistencies between the incremental Eclipse builds versus Maven builds. I've had to do occasionally some Project->Cleans to get rid of the red. Wayne I would DEFINITELY upgrade to an Eclipse 3.x product. I think in general you would be better off (provided the SAP bits are still compatible). Do you use any Eclipse based plugin such as m2eclipse or q4e with NWDS? If not and its possible, I would definitely encourage you to at least try it. -aps On 9/17/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > Since we're talking about Eclipse... As I said before, I'm using SAP > NWDS (2.0.14) which is based on Eclipse v2.1. I'm using > eclipse:eclipse to generate metadata and added the proper perspectives > etc. > > When I create a new project (J2EE, EJB Module Project or Web Module > Project) then it shows up in the J2EE Explorer and things are good. > > When I use mvn e:e and then import the project, it comes in as a > "standard" Java project. I've tried editing metadata files manually > but its still not coming up the way I was hoping. The EJB project > shows up in J2EE Explorer but the beans don't show up since I'm not > using the default ejbModule directory etc. > > Any ideas? I might try upgrading to the latest NWDS build which is > based on Eclipse 3, apparently. > > Wayne > > On 9/16/07, Thierry Lach <[EMAIL PROTECTED]> wrote: > > There can be problems caused with a single build destination caused by > the > > Eclipse incremental compiler that would sometimes require doing a clean > in > > both maven and eclipse. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "What lies behind us and what lies in front of us is of little concern to what lies within us." -Ralph Waldo Emerson
Re: Eclipse and Maven "best practice"
Since we're talking about Eclipse... As I said before, I'm using SAP NWDS (2.0.14) which is based on Eclipse v2.1. I'm using eclipse:eclipse to generate metadata and added the proper perspectives etc. When I create a new project (J2EE, EJB Module Project or Web Module Project) then it shows up in the J2EE Explorer and things are good. When I use mvn e:e and then import the project, it comes in as a "standard" Java project. I've tried editing metadata files manually but its still not coming up the way I was hoping. The EJB project shows up in J2EE Explorer but the beans don't show up since I'm not using the default ejbModule directory etc. Any ideas? I might try upgrading to the latest NWDS build which is based on Eclipse 3, apparently. Wayne On 9/16/07, Thierry Lach <[EMAIL PROTECTED]> wrote: > There can be problems caused with a single build destination caused by the > Eclipse incremental compiler that would sometimes require doing a clean in > both maven and eclipse. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
There can be problems caused with a single build destination caused by the Eclipse incremental compiler that would sometimes require doing a clean in both maven and eclipse. On 9/14/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > I've used separate locations for a few reasons: > 1) in web apps to keep the default location (WEB-INF/classes) > 2) in eclipse it'll build to one location, in maven it builds to 2 > (classes, > test-classes) and I wanted to keep that behaviour > 3) if I run mvn clean or mvn site (etc), I don't have to do a full clean > when I just back into eclipse > 4) I like to have the tools keep as close to their default behaviour as > possible so that the ideas from either tool don't "leak" into the other. > 5) because I enjoy pain? > > You're right: it's mostly to avoid having to refresh eclipse and have it > totally rebuild everything. ;-) > > Jim > > > On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > > > That's interesting - why separate locations? To avoid having to refresh > > in > > Eclipse when a maven build is run? > > > > On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > > > > > I've had the most success with using maven and eclipse by: > > > 1) having both systems build to a separate locations > > > 2) using command line to run maven and when I need to sync up metadata > > > using > > > eclipse:eclipse then hitting refresh in eclipse. > > > 3) for any eclipse specific data (.classpath, .mymetadata, etc), > having > > > those are part of the .cvsignore (not checked into source control) > > > > > > Not against anyone who has worked on the m2e or q4e plug-ins, but when > I > > > tried any plug-ins that were available close to a year ago (?) I had > > > troubles. I still have not found a reason to move away from the > command > > > line. > > > > > > Jim > > > > > > > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project > at > > > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > > > added. > > > > > > > > Among the things they took away in this customized Eclipse is the > > > > ability to add plugins etc the usual way through the menu system. > > > > > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's > any > > > > chance to use m2e or q4e etc with this tool? > > > > > > > > Wayne > > > > > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > > > Is there any reason why you don't use a Maven/Eclipse plugin such > as > > > > > m2eclipse and now q4e? They integrate fully into Eclipse's build > > and > > > do > > > > > autodependency management. Also have you setup a CLASSPATH > > Container > > > > > variable within Eclipse in order to use your local M2 repository? > > > > > > > > > > See here: > > > > > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > > > > > And for plugins: > > > > > > > > > > http://m2eclipse.codehaus.org/ > > > > > http://code.google.com/p/q4e/ > > > > > > > > > > -aps > > > > > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > > > environment? > > > > > > I > > > > > > know there is a goal to produce an eclipse project with the pom, > > but > > > > I'm > > > > > > trying to understand how to create one at hand, customise and > > > include > > > > it's > > > > > > dependencies. > > > > > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main > > > project > > > > is > > > > > > "appTest" that depends on "appCommon". > > > > > > > > > > > > The source directories are the default Maven (src/main/java) and > > > that > > > > > > directory is configured as "source" in eclipse, so it can > compile > > > the > > > > > > code. > > > > > > > > > > > > Then I've configured a specific directory "build" (same level as > > the > > > > "src" > > > > > > above), that eclipse will use to put the compiled classes (this > > > folder > > > > > > will > > > > > > be ignored for SVN/CVS integration). > > > > > > > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > > > > > > > No let's say I put a dependency on version Log4J 1.0. I make > some > > > code > > > > > > accessing it, then eclipse will just mark it as invalid, since > the > > > > Log4J > > > > > > is > > > > > > not in it's classpath. Maven, on the other end, downloads it > from > > > > central > > > > > > repository and compiles successfully. > > > > > > > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > > > > > > > The way I see it, I can include it in the project's classpath, > and > > > > point > > > > > > it > > > > > > to the local repository jar that maven just downloaded. > > > > > > > > > > > > Would this be the best option? > > > > > > -- > > > > > > View this message in context: > > > > > > > > >
RE: Eclipse and Maven "best practice"
> -Original Message- > From: Jim Sellers [mailto:[EMAIL PROTECTED] > Sent: Friday, September 14, 2007 3:23 PM > To: Maven Users List > Subject: Re: Eclipse and Maven "best practice" > > I've used separate locations for a few reasons: > 1) in web apps to keep the default location (WEB-INF/classes) It is easy to adjust Maven to use this location, if you don't mind that. > 2) in eclipse it'll build to one location, in maven it builds to 2 (classes, > test-classes) and I wanted to keep that behavior You can configure Eclipse to compile source dirs to different locations (output dirs), and therefore match the Maven target dirs. In fact, the Maven 2 Eclipse plugins generate Eclipse configs to match that. > 3) if I run mvn clean or mvn site (etc), I don't have to do a full clean > when I just back into eclipse If you had Maven and Eclipse build to the same output dirs, building one actually builds for both. > 4) I like to have the tools keep as close to their default behaviour as > possible so that the ideas from either tool don't "leak" into the other. Which means you probably are not interested in my thoughts on your other points ;-) > 5) because I enjoy pain? Heh - to each his own :-) > You're right: it's mostly to avoid having to refresh eclipse and have it > totally rebuild everything. ;-) You may enjoy a little config change as suggested above to prevent rebuilding! There is also an "automatically refresh workspace" Eclipse pref to do that for you too. > > Jim > > > On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > > > That's interesting - why separate locations? To avoid having to refresh > > in > > Eclipse when a maven build is run? > > > > On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > > > > > I've had the most success with using maven and eclipse by: > > > 1) having both systems build to a separate locations > > > 2) using command line to run maven and when I need to sync up metadata > > > using > > > eclipse:eclipse then hitting refresh in eclipse. > > > 3) for any eclipse specific data (.classpath, .mymetadata, etc), having > > > those are part of the .cvsignore (not checked into source control) > > > > > > Not against anyone who has worked on the m2e or q4e plug-ins, but when I > > > tried any plug-ins that were available close to a year ago (?) I had > > > troubles. I still have not found a reason to move away from the command > > > line. > > > > > > Jim > > > > > > > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at > > > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > > > added. > > > > > > > > Among the things they took away in this customized Eclipse is the > > > > ability to add plugins etc the usual way through the menu system. > > > > > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's any > > > > chance to use m2e or q4e etc with this tool? > > > > > > > > Wayne > > > > > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > > > Is there any reason why you don't use a Maven/Eclipse plugin such as > > > > > m2eclipse and now q4e? They integrate fully into Eclipse's build > > and > > > do > > > > > autodependency management. Also have you setup a CLASSPATH > > Container > > > > > variable within Eclipse in order to use your local M2 repository? > > > > > > > > > > See here: > > > > > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > > > > > And for plugins: > > > > > > > > > > http://m2eclipse.codehaus.org/ > > > > > http://code.google.com/p/q4e/ > > > > > > > > > > -aps > > > > > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > > > environment? > > > > > > I > > > > > > know there is a goal to produce an eclipse project with the pom, > > but
Re: Eclipse and Maven "best practice"
Wow... sorry for so many typos. I'm in a serious rush. Here's my previous email with applied corrections: Maven and Eclipse are tricky to get together well. > > I use m2, and from time to time I've lost hours of otherwise productive > time trying to figure out why things were not working. I could name a lot of > issues, like dependency problems and classes that weren't being rebuilt. > > Sometimes a simple right click + Disable Maven + Enable Maven would > suffice, sometimes it wouldn't. > > Not to mention the _REALLY_ annoying issue that m2 only builds the correct > eclipse IDE project if the Maven project compiles successfully. That means > that if your 300+ class project has a single little tiny problem, you don't > get an eclipse project with the correct source directories configured. > > This is by far something that would make me switch to q4e if it doesn't > have this problem. > > Speak up people! Let's see if we can get Eclipse + Maven more productive > with some input. > Who knows, maybe a developer from the m2 team hears my cry and helps us > out =o) > > Yours, > Rodrigo Madera Sorry again, Rodrigo
Re: Eclipse and Maven "best practice"
Maven and Eclipse are tricky to get together well. I use m2, and from time to time I've lost hours of otherwise productive time trying to figure out why things were not working. I could name a lot of issues, like dependency problems and removed compiled classes that weren't being rebuilt. Sometimes a simple right click + Disable Maven + Enable Maven would suffice, sometimes it won't. Not to mention the _REALLY_ annoying issue that m2 only build the correct eclipse project if the project compiles successfully. That means that if your 300+ class project has a single little tiny problem, you don't get an eclipse project with the correct source directory. This is by far something that would make me switch to q4e if it doesn't have the problem. Speak up there people! Let's see if we can get Eclipse + Maven more productive with some input. Who knows, maybe the a m2 hears my cry and helps us out =o) Yours, Rodrigo Madera On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > I haven't had the time/inclination to try out q4e yet. I didn't like m2 > when I tried it a few weeks ago, though. I'd be interested to see what > people think of q4e so far... > > > On 9/14/07, Rodrigo Madera <[EMAIL PROTECTED]> wrote: > > > > Since you brought that up, let me take advantage of this oportunity to > ask > > users: > > > > I have always used m2. How would that compare to q4e? > > > > Thanks, > > Rodrigo > > > > On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > > > > > That's interesting - why separate locations? To avoid having to > refresh > > > in > > > Eclipse when a maven build is run? > > > > > > On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > > > > > > > I've had the most success with using maven and eclipse by: > > > > 1) having both systems build to a separate locations > > > > 2) using command line to run maven and when I need to sync up > metadata > > > > using > > > > eclipse:eclipse then hitting refresh in eclipse. > > > > 3) for any eclipse specific data (.classpath, .mymetadata, etc), > > having > > > > those are part of the .cvsignore (not checked into source control) > > > > > > > > Not against anyone who has worked on the m2e or q4e plug-ins, but > when > > I > > > > tried any plug-ins that were available close to a year ago (?) I had > > > > troubles. I still have not found a reason to move away from the > > command > > > > line. > > > > > > > > Jim > > > > > > > > > > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) > project > > at > > > > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > > > > added. > > > > > > > > > > Among the things they took away in this customized Eclipse is the > > > > > ability to add plugins etc the usual way through the menu system. > > > > > > > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's > > any > > > > > chance to use m2e or q4e etc with this tool? > > > > > > > > > > Wayne > > > > > > > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > > > > Is there any reason why you don't use a Maven/Eclipse plugin > such > > as > > > > > > m2eclipse and now q4e? They integrate fully into Eclipse's > build > > > and > > > > do > > > > > > autodependency management. Also have you setup a CLASSPATH > > > Container > > > > > > variable within Eclipse in order to use your local M2 > repository? > > > > > > > > > > > > See here: > > > > > > > > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > > > > > > > And for plugins: > > > > > > > > > > > > http://m2eclipse.codehaus.org/ > > > > > > http://code.google.com/p/q4e/ > > > > > > > > > > > > -aps > > > > > > > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > > > > environment? > > > > > > > I > > > > > > > know there is a goal to produce an eclipse project with the > pom, > > > but > > > > > I'm > > > > > > > trying to understand how to create one at hand, customise and > > > > include > > > > > it's > > > > > > > dependencies. > > > > > > > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main > > > > project > > > > > is > > > > > > > "appTest" that depends on "appCommon". > > > > > > > > > > > > > > The source directories are the default Maven (src/main/java) > and > > > > that > > > > > > > directory is configured as "source" in eclipse, so it can > > compile > > > > the > > > > > > > code. > > > > > > > > > > > > > > Then I've configured a specific directory "build" (same level > as > > > the > > > > > "src" > > > > > > > above), that eclipse will use to put the compiled classes > (this > > > > folder > > > > > > > will > > > > > > > be ignored for SVN/CVS integration). > > > > > > > > > > > > > > Everything looks great, and works nicelly. Or so it seems
Re: Eclipse and Maven "best practice"
I'll have to give this a try. I agree having Eclipse do a rebuild is painful sometimes, especially if there are a lot of projects. I never really thought about having two separate output directories, for some reason. One more experiment to add to the to-do list... On 9/14/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > I've used separate locations for a few reasons: > 1) in web apps to keep the default location (WEB-INF/classes) > 2) in eclipse it'll build to one location, in maven it builds to 2 > (classes, > test-classes) and I wanted to keep that behaviour > 3) if I run mvn clean or mvn site (etc), I don't have to do a full clean > when I just back into eclipse > 4) I like to have the tools keep as close to their default behaviour as > possible so that the ideas from either tool don't "leak" into the other. > 5) because I enjoy pain? > > You're right: it's mostly to avoid having to refresh eclipse and have it > totally rebuild everything. ;-) > > Jim > > > On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > > > That's interesting - why separate locations? To avoid having to refresh > > in > > Eclipse when a maven build is run? > > > > On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > > > > > I've had the most success with using maven and eclipse by: > > > 1) having both systems build to a separate locations > > > 2) using command line to run maven and when I need to sync up metadata > > > using > > > eclipse:eclipse then hitting refresh in eclipse. > > > 3) for any eclipse specific data (.classpath, .mymetadata, etc), > having > > > those are part of the .cvsignore (not checked into source control) > > > > > > Not against anyone who has worked on the m2e or q4e plug-ins, but when > I > > > tried any plug-ins that were available close to a year ago (?) I had > > > troubles. I still have not found a reason to move away from the > command > > > line. > > > > > > Jim > > > > > > > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project > at > > > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > > > added. > > > > > > > > Among the things they took away in this customized Eclipse is the > > > > ability to add plugins etc the usual way through the menu system. > > > > > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's > any > > > > chance to use m2e or q4e etc with this tool? > > > > > > > > Wayne > > > > > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > > > Is there any reason why you don't use a Maven/Eclipse plugin such > as > > > > > m2eclipse and now q4e? They integrate fully into Eclipse's build > > and > > > do > > > > > autodependency management. Also have you setup a CLASSPATH > > Container > > > > > variable within Eclipse in order to use your local M2 repository? > > > > > > > > > > See here: > > > > > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > > > > > And for plugins: > > > > > > > > > > http://m2eclipse.codehaus.org/ > > > > > http://code.google.com/p/q4e/ > > > > > > > > > > -aps > > > > > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > > > environment? > > > > > > I > > > > > > know there is a goal to produce an eclipse project with the pom, > > but > > > > I'm > > > > > > trying to understand how to create one at hand, customise and > > > include > > > > it's > > > > > > dependencies. > > > > > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main > > > project > > > > is > > > > > > "appTest" that depends on "appCommon". > > > > > > > > > > > > The source directories are the default Maven (src/main/java) and > > > that > > > > > > directory is configured as "source" in eclipse, so it can > compile > > > the > > > > > > code. > > > > > > > > > > > > Then I've configured a specific directory "build" (same level as > > the > > > > "src" > > > > > > above), that eclipse will use to put the compiled classes (this > > > folder > > > > > > will > > > > > > be ignored for SVN/CVS integration). > > > > > > > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > > > > > > > No let's say I put a dependency on version Log4J 1.0. I make > some > > > code > > > > > > accessing it, then eclipse will just mark it as invalid, since > the > > > > Log4J > > > > > > is > > > > > > not in it's classpath. Maven, on the other end, downloads it > from > > > > central > > > > > > repository and compiles successfully. > > > > > > > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > > > > > > > The way I see it, I can include it in the project's classpath, > and > > > > point > > > > > > it > > > > > > to the local repository jar that maven just downloaded. > > > > > > > > > > > > Would this b
Re: Eclipse and Maven "best practice"
I've used separate locations for a few reasons: 1) in web apps to keep the default location (WEB-INF/classes) 2) in eclipse it'll build to one location, in maven it builds to 2 (classes, test-classes) and I wanted to keep that behaviour 3) if I run mvn clean or mvn site (etc), I don't have to do a full clean when I just back into eclipse 4) I like to have the tools keep as close to their default behaviour as possible so that the ideas from either tool don't "leak" into the other. 5) because I enjoy pain? You're right: it's mostly to avoid having to refresh eclipse and have it totally rebuild everything. ;-) Jim On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > That's interesting - why separate locations? To avoid having to refresh > in > Eclipse when a maven build is run? > > On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > > > I've had the most success with using maven and eclipse by: > > 1) having both systems build to a separate locations > > 2) using command line to run maven and when I need to sync up metadata > > using > > eclipse:eclipse then hitting refresh in eclipse. > > 3) for any eclipse specific data (.classpath, .mymetadata, etc), having > > those are part of the .cvsignore (not checked into source control) > > > > Not against anyone who has worked on the m2e or q4e plug-ins, but when I > > tried any plug-ins that were available close to a year ago (?) I had > > troubles. I still have not found a reason to move away from the command > > line. > > > > Jim > > > > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at > > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > > added. > > > > > > Among the things they took away in this customized Eclipse is the > > > ability to add plugins etc the usual way through the menu system. > > > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's any > > > chance to use m2e or q4e etc with this tool? > > > > > > Wayne > > > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > > Is there any reason why you don't use a Maven/Eclipse plugin such as > > > > m2eclipse and now q4e? They integrate fully into Eclipse's build > and > > do > > > > autodependency management. Also have you setup a CLASSPATH > Container > > > > variable within Eclipse in order to use your local M2 repository? > > > > > > > > See here: > > > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > > > And for plugins: > > > > > > > > http://m2eclipse.codehaus.org/ > > > > http://code.google.com/p/q4e/ > > > > > > > > -aps > > > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > Hi, > > > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > > environment? > > > > > I > > > > > know there is a goal to produce an eclipse project with the pom, > but > > > I'm > > > > > trying to understand how to create one at hand, customise and > > include > > > it's > > > > > dependencies. > > > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main > > project > > > is > > > > > "appTest" that depends on "appCommon". > > > > > > > > > > The source directories are the default Maven (src/main/java) and > > that > > > > > directory is configured as "source" in eclipse, so it can compile > > the > > > > > code. > > > > > > > > > > Then I've configured a specific directory "build" (same level as > the > > > "src" > > > > > above), that eclipse will use to put the compiled classes (this > > folder > > > > > will > > > > > be ignored for SVN/CVS integration). > > > > > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > > > > > No let's say I put a dependency on version Log4J 1.0. I make some > > code > > > > > accessing it, then eclipse will just mark it as invalid, since the > > > Log4J > > > > > is > > > > > not in it's classpath. Maven, on the other end, downloads it from > > > central > > > > > repository and compiles successfully. > > > > > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > > > > > The way I see it, I can include it in the project's classpath, and > > > point > > > > > it > > > > > to the local repository jar that maven just downloaded. > > > > > > > > > > Would this be the best option? > > > > > -- > > > > > View this message in context: > > > > > > > > > > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > -- > > > > "What lies behind us and what lies in front of us is of little > conc
Re: Eclipse and Maven "best practice"
I haven't had the time/inclination to try out q4e yet. I didn't like m2 when I tried it a few weeks ago, though. I'd be interested to see what people think of q4e so far... On 9/14/07, Rodrigo Madera <[EMAIL PROTECTED]> wrote: > > Since you brought that up, let me take advantage of this oportunity to ask > users: > > I have always used m2. How would that compare to q4e? > > Thanks, > Rodrigo > > On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > > > That's interesting - why separate locations? To avoid having to refresh > > in > > Eclipse when a maven build is run? > > > > On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > > > > > I've had the most success with using maven and eclipse by: > > > 1) having both systems build to a separate locations > > > 2) using command line to run maven and when I need to sync up metadata > > > using > > > eclipse:eclipse then hitting refresh in eclipse. > > > 3) for any eclipse specific data (.classpath, .mymetadata, etc), > having > > > those are part of the .cvsignore (not checked into source control) > > > > > > Not against anyone who has worked on the m2e or q4e plug-ins, but when > I > > > tried any plug-ins that were available close to a year ago (?) I had > > > troubles. I still have not found a reason to move away from the > command > > > line. > > > > > > Jim > > > > > > > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project > at > > > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > > > added. > > > > > > > > Among the things they took away in this customized Eclipse is the > > > > ability to add plugins etc the usual way through the menu system. > > > > > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's > any > > > > chance to use m2e or q4e etc with this tool? > > > > > > > > Wayne > > > > > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > > > Is there any reason why you don't use a Maven/Eclipse plugin such > as > > > > > m2eclipse and now q4e? They integrate fully into Eclipse's build > > and > > > do > > > > > autodependency management. Also have you setup a CLASSPATH > > Container > > > > > variable within Eclipse in order to use your local M2 repository? > > > > > > > > > > See here: > > > > > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > > > > > And for plugins: > > > > > > > > > > http://m2eclipse.codehaus.org/ > > > > > http://code.google.com/p/q4e/ > > > > > > > > > > -aps > > > > > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > > > environment? > > > > > > I > > > > > > know there is a goal to produce an eclipse project with the pom, > > but > > > > I'm > > > > > > trying to understand how to create one at hand, customise and > > > include > > > > it's > > > > > > dependencies. > > > > > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main > > > project > > > > is > > > > > > "appTest" that depends on "appCommon". > > > > > > > > > > > > The source directories are the default Maven (src/main/java) and > > > that > > > > > > directory is configured as "source" in eclipse, so it can > compile > > > the > > > > > > code. > > > > > > > > > > > > Then I've configured a specific directory "build" (same level as > > the > > > > "src" > > > > > > above), that eclipse will use to put the compiled classes (this > > > folder > > > > > > will > > > > > > be ignored for SVN/CVS integration). > > > > > > > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > > > > > > > No let's say I put a dependency on version Log4J 1.0. I make > some > > > code > > > > > > accessing it, then eclipse will just mark it as invalid, since > the > > > > Log4J > > > > > > is > > > > > > not in it's classpath. Maven, on the other end, downloads it > from > > > > central > > > > > > repository and compiles successfully. > > > > > > > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > > > > > > > The way I see it, I can include it in the project's classpath, > and > > > > point > > > > > > it > > > > > > to the local repository jar that maven just downloaded. > > > > > > > > > > > > Would this be the best option? > > > > > > -- > > > > > > View this message in context: > > > > > > > > > > > > > > > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > > > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > > > > > - > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > "What
Re: Eclipse and Maven "best practice"
Since you brought that up, let me take advantage of this oportunity to ask users: I have always used m2. How would that compare to q4e? Thanks, Rodrigo On 9/14/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote: > > That's interesting - why separate locations? To avoid having to refresh > in > Eclipse when a maven build is run? > > On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > > > I've had the most success with using maven and eclipse by: > > 1) having both systems build to a separate locations > > 2) using command line to run maven and when I need to sync up metadata > > using > > eclipse:eclipse then hitting refresh in eclipse. > > 3) for any eclipse specific data (.classpath, .mymetadata, etc), having > > those are part of the .cvsignore (not checked into source control) > > > > Not against anyone who has worked on the m2e or q4e plug-ins, but when I > > tried any plug-ins that were available close to a year ago (?) I had > > troubles. I still have not found a reason to move away from the command > > line. > > > > Jim > > > > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at > > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > > added. > > > > > > Among the things they took away in this customized Eclipse is the > > > ability to add plugins etc the usual way through the menu system. > > > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's any > > > chance to use m2e or q4e etc with this tool? > > > > > > Wayne > > > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > > Is there any reason why you don't use a Maven/Eclipse plugin such as > > > > m2eclipse and now q4e? They integrate fully into Eclipse's build > and > > do > > > > autodependency management. Also have you setup a CLASSPATH > Container > > > > variable within Eclipse in order to use your local M2 repository? > > > > > > > > See here: > > > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > > > And for plugins: > > > > > > > > http://m2eclipse.codehaus.org/ > > > > http://code.google.com/p/q4e/ > > > > > > > > -aps > > > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > Hi, > > > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > > environment? > > > > > I > > > > > know there is a goal to produce an eclipse project with the pom, > but > > > I'm > > > > > trying to understand how to create one at hand, customise and > > include > > > it's > > > > > dependencies. > > > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main > > project > > > is > > > > > "appTest" that depends on "appCommon". > > > > > > > > > > The source directories are the default Maven (src/main/java) and > > that > > > > > directory is configured as "source" in eclipse, so it can compile > > the > > > > > code. > > > > > > > > > > Then I've configured a specific directory "build" (same level as > the > > > "src" > > > > > above), that eclipse will use to put the compiled classes (this > > folder > > > > > will > > > > > be ignored for SVN/CVS integration). > > > > > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > > > > > No let's say I put a dependency on version Log4J 1.0. I make some > > code > > > > > accessing it, then eclipse will just mark it as invalid, since the > > > Log4J > > > > > is > > > > > not in it's classpath. Maven, on the other end, downloads it from > > > central > > > > > repository and compiles successfully. > > > > > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > > > > > The way I see it, I can include it in the project's classpath, and > > > point > > > > > it > > > > > to the local repository jar that maven just downloaded. > > > > > > > > > > Would this be the best option? > > > > > -- > > > > > View this message in context: > > > > > > > > > > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > -- > > > > "What lies behind us and what lies in front of us is of little > concern > > > to > > > > what lies within us." -Ralph Waldo Emerson > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- If Jack Bauer had been a Spartan, the movie would have been called "1".
Re: Eclipse and Maven "best practice"
That's interesting - why separate locations? To avoid having to refresh in Eclipse when a maven build is run? On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > > I've had the most success with using maven and eclipse by: > 1) having both systems build to a separate locations > 2) using command line to run maven and when I need to sync up metadata > using > eclipse:eclipse then hitting refresh in eclipse. > 3) for any eclipse specific data (.classpath, .mymetadata, etc), having > those are part of the .cvsignore (not checked into source control) > > Not against anyone who has worked on the m2e or q4e plug-ins, but when I > tried any plug-ins that were available close to a year ago (?) I had > troubles. I still have not found a reason to move away from the command > line. > > Jim > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > added. > > > > Among the things they took away in this customized Eclipse is the > > ability to add plugins etc the usual way through the menu system. > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's any > > chance to use m2e or q4e etc with this tool? > > > > Wayne > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > Is there any reason why you don't use a Maven/Eclipse plugin such as > > > m2eclipse and now q4e? They integrate fully into Eclipse's build and > do > > > autodependency management. Also have you setup a CLASSPATH Container > > > variable within Eclipse in order to use your local M2 repository? > > > > > > See here: > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > And for plugins: > > > > > > http://m2eclipse.codehaus.org/ > > > http://code.google.com/p/q4e/ > > > > > > -aps > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi, > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > environment? > > > > I > > > > know there is a goal to produce an eclipse project with the pom, but > > I'm > > > > trying to understand how to create one at hand, customise and > include > > it's > > > > dependencies. > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main > project > > is > > > > "appTest" that depends on "appCommon". > > > > > > > > The source directories are the default Maven (src/main/java) and > that > > > > directory is configured as "source" in eclipse, so it can compile > the > > > > code. > > > > > > > > Then I've configured a specific directory "build" (same level as the > > "src" > > > > above), that eclipse will use to put the compiled classes (this > folder > > > > will > > > > be ignored for SVN/CVS integration). > > > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > > > No let's say I put a dependency on version Log4J 1.0. I make some > code > > > > accessing it, then eclipse will just mark it as invalid, since the > > Log4J > > > > is > > > > not in it's classpath. Maven, on the other end, downloads it from > > central > > > > repository and compiles successfully. > > > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > > > The way I see it, I can include it in the project's classpath, and > > point > > > > it > > > > to the local repository jar that maven just downloaded. > > > > > > > > Would this be the best option? > > > > -- > > > > View this message in context: > > > > > > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > "What lies behind us and what lies in front of us is of little concern > > to > > > what lies within us." -Ralph Waldo Emerson > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: Eclipse and Maven "best practice"
$ mvn eclipse:m2clipse seems to works really well for me in Eclipse3.3. It creates a M2Libraries that automatically loads the jars into eclipse classpath. The only trouble I have is if I want my project to have WTP nature enable... I've used $ mvn eclipse:m2clipse -Dwtpversion=1.5 but then I have to do some manual clean up before able to run(like enable M2LIB in J2EE modules in project settings.). I guess it's not up to date. -Z On 9/14/07, Alexander Vaisberg <[EMAIL PROTECTED]> wrote: > You must this dependency to the pom add. > > zm schrieb: > > Hi, > > > > Can anyone help me with the best way to setup a Maven/Eclipse environment? I > > know there is a goal to produce an eclipse project with the pom, but I'm > > trying to understand how to create one at hand, customise and include it's > > dependencies. > > > > I have created 2 projects, "appTest" and "appCommon". The main project is > > "appTest" that depends on "appCommon". > > > > The source directories are the default Maven (src/main/java) and that > > directory is configured as "source" in eclipse, so it can compile the code. > > > > Then I've configured a specific directory "build" (same level as the "src" > > above), that eclipse will use to put the compiled classes (this folder will > > be ignored for SVN/CVS integration). > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > No let's say I put a dependency on version Log4J 1.0. I make some code > > accessing it, then eclipse will just mark it as invalid, since the Log4J is > > not in it's classpath. Maven, on the other end, downloads it from central > > repository and compiles successfully. > > > > Now what would be the best way to put it to compile in eclipse? > > > > The way I see it, I can include it in the project's classpath, and point it > > to the local repository jar that maven just downloaded. > > > > Would this be the best option? > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- /bugslayer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
You must this dependency to the pom add. zm schrieb: Hi, Can anyone help me with the best way to setup a Maven/Eclipse environment? I know there is a goal to produce an eclipse project with the pom, but I'm trying to understand how to create one at hand, customise and include it's dependencies. I have created 2 projects, "appTest" and "appCommon". The main project is "appTest" that depends on "appCommon". The source directories are the default Maven (src/main/java) and that directory is configured as "source" in eclipse, so it can compile the code. Then I've configured a specific directory "build" (same level as the "src" above), that eclipse will use to put the compiled classes (this folder will be ignored for SVN/CVS integration). Everything looks great, and works nicelly. Or so it seems ... No let's say I put a dependency on version Log4J 1.0. I make some code accessing it, then eclipse will just mark it as invalid, since the Log4J is not in it's classpath. Maven, on the other end, downloads it from central repository and compiles successfully. Now what would be the best way to put it to compile in eclipse? The way I see it, I can include it in the project's classpath, and point it to the local repository jar that maven just downloaded. Would this be the best option? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
Wayne, I don't think you are going to get an m2e for Eclipse 2 and q4e, as I remember, is for 3.3 (but maybe it works with 3.2 too). But you can install pretty much as many versions of Eclipse as you want each working on a different part of your code. Just put them in different folders. I even use multiples of the same version with different groups of plugins. Then start up the eclipse version you want but be careful about pointing different versions at the same workspace. Sometimes a different version or some plugin will store some configuration that causes some other instance to die completely or go into "slow-eclipse" mode where everything takes 20 seconds. It works pretty good to keep your source in a version control (eg. SVN) and then set up multiple local workspaces tied to the version control. Run the Eclipse you want against its own workspace and then save the changes to the one repo and update to the other repo. Its like working on two computers at once with the different versions. You can even run multiple eclipse instances at the same time if you have the RAM. -- Lee On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > added. > > Among the things they took away in this customized Eclipse is the > ability to add plugins etc the usual way through the menu system. > > I'm wondering if anyone else is "stuck" using NWDS and if there's any > chance to use m2e or q4e etc with this tool? > > Wayne > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > Is there any reason why you don't use a Maven/Eclipse plugin such as > > m2eclipse and now q4e? They integrate fully into Eclipse's build and do > > autodependency management. Also have you setup a CLASSPATH Container > > variable within Eclipse in order to use your local M2 repository? > > > > See here: > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > And for plugins: > > > > http://m2eclipse.codehaus.org/ > > http://code.google.com/p/q4e/ > > > > -aps > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > environment? > > > I > > > know there is a goal to produce an eclipse project with the pom, but > I'm > > > trying to understand how to create one at hand, customise and include > it's > > > dependencies. > > > > > > I have created 2 projects, "appTest" and "appCommon". The main project > is > > > "appTest" that depends on "appCommon". > > > > > > The source directories are the default Maven (src/main/java) and that > > > directory is configured as "source" in eclipse, so it can compile the > > > code. > > > > > > Then I've configured a specific directory "build" (same level as the > "src" > > > above), that eclipse will use to put the compiled classes (this folder > > > will > > > be ignored for SVN/CVS integration). > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > No let's say I put a dependency on version Log4J 1.0. I make some code > > > accessing it, then eclipse will just mark it as invalid, since the > Log4J > > > is > > > not in it's classpath. Maven, on the other end, downloads it from > central > > > repository and compiles successfully. > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > The way I see it, I can include it in the project's classpath, and > point > > > it > > > to the local repository jar that maven just downloaded. > > > > > > Would this be the best option? > > > -- > > > View this message in context: > > > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > "What lies behind us and what lies in front of us is of little concern > to > > what lies within us." -Ralph Waldo Emerson > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com
Re: Eclipse and Maven "best practice"
This is the way I generally work, too. I just thought maybe I'd look into one of these "new" tools since I'm back in Eclipse regularly and have never really given any of these tools a chance. Wayne On 9/13/07, Jim Sellers <[EMAIL PROTECTED]> wrote: > I've had the most success with using maven and eclipse by: > 1) having both systems build to a separate locations > 2) using command line to run maven and when I need to sync up metadata using > eclipse:eclipse then hitting refresh in eclipse. > 3) for any eclipse specific data (.classpath, .mymetadata, etc), having > those are part of the .cvsignore (not checked into source control) > > Not against anyone who has worked on the m2e or q4e plug-ins, but when I > tried any plug-ins that were available close to a year ago (?) I had > troubles. I still have not found a reason to move away from the command > line. > > Jim > > > On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at > > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > > added. > > > > Among the things they took away in this customized Eclipse is the > > ability to add plugins etc the usual way through the menu system. > > > > I'm wondering if anyone else is "stuck" using NWDS and if there's any > > chance to use m2e or q4e etc with this tool? > > > > Wayne > > > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > > Is there any reason why you don't use a Maven/Eclipse plugin such as > > > m2eclipse and now q4e? They integrate fully into Eclipse's build and do > > > autodependency management. Also have you setup a CLASSPATH Container > > > variable within Eclipse in order to use your local M2 repository? > > > > > > See here: > > > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > > > And for plugins: > > > > > > http://m2eclipse.codehaus.org/ > > > http://code.google.com/p/q4e/ > > > > > > -aps > > > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi, > > > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > > environment? > > > > I > > > > know there is a goal to produce an eclipse project with the pom, but > > I'm > > > > trying to understand how to create one at hand, customise and include > > it's > > > > dependencies. > > > > > > > > I have created 2 projects, "appTest" and "appCommon". The main project > > is > > > > "appTest" that depends on "appCommon". > > > > > > > > The source directories are the default Maven (src/main/java) and that > > > > directory is configured as "source" in eclipse, so it can compile the > > > > code. > > > > > > > > Then I've configured a specific directory "build" (same level as the > > "src" > > > > above), that eclipse will use to put the compiled classes (this folder > > > > will > > > > be ignored for SVN/CVS integration). > > > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > > > No let's say I put a dependency on version Log4J 1.0. I make some code > > > > accessing it, then eclipse will just mark it as invalid, since the > > Log4J > > > > is > > > > not in it's classpath. Maven, on the other end, downloads it from > > central > > > > repository and compiles successfully. > > > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > > > The way I see it, I can include it in the project's classpath, and > > point > > > > it > > > > to the local repository jar that maven just downloaded. > > > > > > > > Would this be the best option? > > > > -- > > > > View this message in context: > > > > > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > "What lies behind us and what lies in front of us is of little concern > > to > > > what lies within us." -Ralph Waldo Emerson > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
I've had the most success with using maven and eclipse by: 1) having both systems build to a separate locations 2) using command line to run maven and when I need to sync up metadata using eclipse:eclipse then hitting refresh in eclipse. 3) for any eclipse specific data (.classpath, .mymetadata, etc), having those are part of the .cvsignore (not checked into source control) Not against anyone who has worked on the m2e or q4e plug-ins, but when I tried any plug-ins that were available close to a year ago (?) I had troubles. I still have not found a reason to move away from the command line. Jim On 9/13/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at > work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff > added. > > Among the things they took away in this customized Eclipse is the > ability to add plugins etc the usual way through the menu system. > > I'm wondering if anyone else is "stuck" using NWDS and if there's any > chance to use m2e or q4e etc with this tool? > > Wayne > > On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > > Is there any reason why you don't use a Maven/Eclipse plugin such as > > m2eclipse and now q4e? They integrate fully into Eclipse's build and do > > autodependency management. Also have you setup a CLASSPATH Container > > variable within Eclipse in order to use your local M2 repository? > > > > See here: > > > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > > > And for plugins: > > > > http://m2eclipse.codehaus.org/ > > http://code.google.com/p/q4e/ > > > > -aps > > > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > > > > Can anyone help me with the best way to setup a Maven/Eclipse > environment? > > > I > > > know there is a goal to produce an eclipse project with the pom, but > I'm > > > trying to understand how to create one at hand, customise and include > it's > > > dependencies. > > > > > > I have created 2 projects, "appTest" and "appCommon". The main project > is > > > "appTest" that depends on "appCommon". > > > > > > The source directories are the default Maven (src/main/java) and that > > > directory is configured as "source" in eclipse, so it can compile the > > > code. > > > > > > Then I've configured a specific directory "build" (same level as the > "src" > > > above), that eclipse will use to put the compiled classes (this folder > > > will > > > be ignored for SVN/CVS integration). > > > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > > > No let's say I put a dependency on version Log4J 1.0. I make some code > > > accessing it, then eclipse will just mark it as invalid, since the > Log4J > > > is > > > not in it's classpath. Maven, on the other end, downloads it from > central > > > repository and compiles successfully. > > > > > > Now what would be the best way to put it to compile in eclipse? > > > > > > The way I see it, I can include it in the project's classpath, and > point > > > it > > > to the local repository jar that maven just downloaded. > > > > > > Would this be the best option? > > > -- > > > View this message in context: > > > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > "What lies behind us and what lies in front of us is of little concern > to > > what lies within us." -Ralph Waldo Emerson > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Eclipse and Maven "best practice"
I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff added. Among the things they took away in this customized Eclipse is the ability to add plugins etc the usual way through the menu system. I'm wondering if anyone else is "stuck" using NWDS and if there's any chance to use m2e or q4e etc with this tool? Wayne On 9/13/07, Alexander Sack <[EMAIL PROTECTED]> wrote: > Is there any reason why you don't use a Maven/Eclipse plugin such as > m2eclipse and now q4e? They integrate fully into Eclipse's build and do > autodependency management. Also have you setup a CLASSPATH Container > variable within Eclipse in order to use your local M2 repository? > > See here: > > http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html > > And for plugins: > > http://m2eclipse.codehaus.org/ > http://code.google.com/p/q4e/ > > -aps > > On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > Can anyone help me with the best way to setup a Maven/Eclipse environment? > > I > > know there is a goal to produce an eclipse project with the pom, but I'm > > trying to understand how to create one at hand, customise and include it's > > dependencies. > > > > I have created 2 projects, "appTest" and "appCommon". The main project is > > "appTest" that depends on "appCommon". > > > > The source directories are the default Maven (src/main/java) and that > > directory is configured as "source" in eclipse, so it can compile the > > code. > > > > Then I've configured a specific directory "build" (same level as the "src" > > above), that eclipse will use to put the compiled classes (this folder > > will > > be ignored for SVN/CVS integration). > > > > Everything looks great, and works nicelly. Or so it seems ... > > > > No let's say I put a dependency on version Log4J 1.0. I make some code > > accessing it, then eclipse will just mark it as invalid, since the Log4J > > is > > not in it's classpath. Maven, on the other end, downloads it from central > > repository and compiles successfully. > > > > Now what would be the best way to put it to compile in eclipse? > > > > The way I see it, I can include it in the project's classpath, and point > > it > > to the local repository jar that maven just downloaded. > > > > Would this be the best option? > > -- > > View this message in context: > > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > "What lies behind us and what lies in front of us is of little concern to > what lies within us." -Ralph Waldo Emerson > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
Hi, It give a book a Better Builds with Maven vor free on the page: http://www.devzuz.com/web/guest/products/resources#BBWM. I think it help you. Alexander Vaysberg (pc-hilfe) zm schrieb: Hi, Can anyone help me with the best way to setup a Maven/Eclipse environment? I know there is a goal to produce an eclipse project with the pom, but I'm trying to understand how to create one at hand, customise and include it's dependencies. I have created 2 projects, "appTest" and "appCommon". The main project is "appTest" that depends on "appCommon". The source directories are the default Maven (src/main/java) and that directory is configured as "source" in eclipse, so it can compile the code. Then I've configured a specific directory "build" (same level as the "src" above), that eclipse will use to put the compiled classes (this folder will be ignored for SVN/CVS integration). Everything looks great, and works nicelly. Or so it seems ... No let's say I put a dependency on version Log4J 1.0. I make some code accessing it, then eclipse will just mark it as invalid, since the Log4J is not in it's classpath. Maven, on the other end, downloads it from central repository and compiles successfully. Now what would be the best way to put it to compile in eclipse? The way I see it, I can include it in the project's classpath, and point it to the local repository jar that maven just downloaded. Would this be the best option? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven "best practice"
Is there any reason why you don't use a Maven/Eclipse plugin such as m2eclipse and now q4e? They integrate fully into Eclipse's build and do autodependency management. Also have you setup a CLASSPATH Container variable within Eclipse in order to use your local M2 repository? See here: http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html And for plugins: http://m2eclipse.codehaus.org/ http://code.google.com/p/q4e/ -aps On 9/13/07, zm <[EMAIL PROTECTED]> wrote: > > > Hi, > > Can anyone help me with the best way to setup a Maven/Eclipse environment? > I > know there is a goal to produce an eclipse project with the pom, but I'm > trying to understand how to create one at hand, customise and include it's > dependencies. > > I have created 2 projects, "appTest" and "appCommon". The main project is > "appTest" that depends on "appCommon". > > The source directories are the default Maven (src/main/java) and that > directory is configured as "source" in eclipse, so it can compile the > code. > > Then I've configured a specific directory "build" (same level as the "src" > above), that eclipse will use to put the compiled classes (this folder > will > be ignored for SVN/CVS integration). > > Everything looks great, and works nicelly. Or so it seems ... > > No let's say I put a dependency on version Log4J 1.0. I make some code > accessing it, then eclipse will just mark it as invalid, since the Log4J > is > not in it's classpath. Maven, on the other end, downloads it from central > repository and compiles successfully. > > Now what would be the best way to put it to compile in eclipse? > > The way I see it, I can include it in the project's classpath, and point > it > to the local repository jar that maven just downloaded. > > Would this be the best option? > -- > View this message in context: > http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883 > Sent from the Maven - Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "What lies behind us and what lies in front of us is of little concern to what lies within us." -Ralph Waldo Emerson
RE: Eclipse and Maven "best practice"
http://maven.apache.org/plugins/maven-eclipse-plugin/overview.html http://m2eclipse.codehaus.org/ http://code.google.com/p/q4e/ -Original Message- From: zm [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 10:54 AM To: users@maven.apache.org Subject: Eclipse and Maven "best practice" Hi, Can anyone help me with the best way to setup a Maven/Eclipse environment? I know there is a goal to produce an eclipse project with the pom, but I'm trying to understand how to create one at hand, customise and include it's dependencies. I have created 2 projects, "appTest" and "appCommon". The main project is "appTest" that depends on "appCommon". The source directories are the default Maven (src/main/java) and that directory is configured as "source" in eclipse, so it can compile the code. Then I've configured a specific directory "build" (same level as the "src" above), that eclipse will use to put the compiled classes (this folder will be ignored for SVN/CVS integration). Everything looks great, and works nicelly. Or so it seems ... No let's say I put a dependency on version Log4J 1.0. I make some code accessing it, then eclipse will just mark it as invalid, since the Log4J is not in it's classpath. Maven, on the other end, downloads it from central repository and compiles successfully. Now what would be the best way to put it to compile in eclipse? The way I see it, I can include it in the project's classpath, and point it to the local repository jar that maven just downloaded. Would this be the best option? -- View this message in context: http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s17 7.html#a12655883 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Yes I've read the conversation. and it works. I can finally go on with cavaeatemptor On 4/5/07, Wayne Fay <[EMAIL PROTECTED]> wrote: I actually sent another email to the list with some more details: dateApr 3, 2007 10:25 AM subject Surefire TestNG troubles Mark D. responded that TestNG's API changed so they break Surefire, but this is currently being worked on, so hopefully we'll get some working releases soon. He suggested using the latest TestNG Ant plugin with Antrun if you need functionality in v5.2+. Wayne On 4/4/07, Rolf Strijdhorst <[EMAIL PROTECTED]> wrote: > Hi Wayne, > > I have the tests working in eclipse, but not in maven. > And even then eclipse and maven need to work together because of some > problems in project building with eclipse. > > As I've stated before for some reason my maven build fails with testng > because surefire and testng and the embedded container do not work well > together. > > in the log I see that jboss finds the sessionbeans I've created. but when I > do a lookup the only thing I am able to retrieve is the user transaction. > every other object (entitymanagerfactory, sessionbeans) could not be > retrieved from jndi > > any clue? > Rolf > > On 4/2/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > Rolf, just wondering how far along you got in converting the > > CaveatEmptor JPA/EJB3/Hibernate app from Ant to Maven... I've been > > working on this myself some this morning. > > > > Were you ever 100% successful? Assuming you were, we should send your > > modified zip to Hibernate for inclusion on their download page. > > > > Also, why is the JBoss stuff only available on the Andromda repo? I'd > > hope JBoss would host it, or perhaps even Central. > > > > Wayne > > > > On 4/2/07, Thorsten Heit <[EMAIL PROTECTED]> wrote: > > > Hi Rolf, > > > > > > > > > > this is not a junit test but a testng. > > > > Transactions are handled in the testmethods themselves. > > > > The error messages are not describing the real error. > > > > The problem is that for some reason during the maven execution of the > > > > test. > > > > Testng and the embeddable ejb container have some conflicts but I > > don't > > > > see why > > > > I know this only by looking at the first error and having > > commented > > > > out > > > > a line in the second test (transaction.begin) than the second test > > fails > > > > by > > > > stating that a session bean was not bound/found. > > > > > > Sorry, but I don't know TestNG, only JUnit... According to the exception > > I'd assume that there _is_ a problem with correctly opening and closing the > > transaction. If not, then at least with the initialization and/or shutdown > > of your test class / test method... > > > > > > Without knowing your source I'm wondering whether your failing test > > class can run standalone or relies on others for doing its checks, for > > example via static initializers, during init/shutdown etc. Have you checked > > that? > > > > > > > > > Cheers > > > > > > Thorsten > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
I actually sent another email to the list with some more details: dateApr 3, 2007 10:25 AM subject Surefire TestNG troubles Mark D. responded that TestNG's API changed so they break Surefire, but this is currently being worked on, so hopefully we'll get some working releases soon. He suggested using the latest TestNG Ant plugin with Antrun if you need functionality in v5.2+. Wayne On 4/4/07, Rolf Strijdhorst <[EMAIL PROTECTED]> wrote: Hi Wayne, I have the tests working in eclipse, but not in maven. And even then eclipse and maven need to work together because of some problems in project building with eclipse. As I've stated before for some reason my maven build fails with testng because surefire and testng and the embedded container do not work well together. in the log I see that jboss finds the sessionbeans I've created. but when I do a lookup the only thing I am able to retrieve is the user transaction. every other object (entitymanagerfactory, sessionbeans) could not be retrieved from jndi any clue? Rolf On 4/2/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > Rolf, just wondering how far along you got in converting the > CaveatEmptor JPA/EJB3/Hibernate app from Ant to Maven... I've been > working on this myself some this morning. > > Were you ever 100% successful? Assuming you were, we should send your > modified zip to Hibernate for inclusion on their download page. > > Also, why is the JBoss stuff only available on the Andromda repo? I'd > hope JBoss would host it, or perhaps even Central. > > Wayne > > On 4/2/07, Thorsten Heit <[EMAIL PROTECTED]> wrote: > > Hi Rolf, > > > > > > > this is not a junit test but a testng. > > > Transactions are handled in the testmethods themselves. > > > The error messages are not describing the real error. > > > The problem is that for some reason during the maven execution of the > > > test. > > > Testng and the embeddable ejb container have some conflicts but I > don't > > > see why > > > I know this only by looking at the first error and having > commented > > > out > > > a line in the second test (transaction.begin) than the second test > fails > > > by > > > stating that a session bean was not bound/found. > > > > Sorry, but I don't know TestNG, only JUnit... According to the exception > I'd assume that there _is_ a problem with correctly opening and closing the > transaction. If not, then at least with the initialization and/or shutdown > of your test class / test method... > > > > Without knowing your source I'm wondering whether your failing test > class can run standalone or relies on others for doing its checks, for > example via static initializers, during init/shutdown etc. Have you checked > that? > > > > > > Cheers > > > > Thorsten > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Hi Wayne, I have the tests working in eclipse, but not in maven. And even then eclipse and maven need to work together because of some problems in project building with eclipse. As I've stated before for some reason my maven build fails with testng because surefire and testng and the embedded container do not work well together. in the log I see that jboss finds the sessionbeans I've created. but when I do a lookup the only thing I am able to retrieve is the user transaction. every other object (entitymanagerfactory, sessionbeans) could not be retrieved from jndi any clue? Rolf On 4/2/07, Wayne Fay <[EMAIL PROTECTED]> wrote: Rolf, just wondering how far along you got in converting the CaveatEmptor JPA/EJB3/Hibernate app from Ant to Maven... I've been working on this myself some this morning. Were you ever 100% successful? Assuming you were, we should send your modified zip to Hibernate for inclusion on their download page. Also, why is the JBoss stuff only available on the Andromda repo? I'd hope JBoss would host it, or perhaps even Central. Wayne On 4/2/07, Thorsten Heit <[EMAIL PROTECTED]> wrote: > Hi Rolf, > > > > this is not a junit test but a testng. > > Transactions are handled in the testmethods themselves. > > The error messages are not describing the real error. > > The problem is that for some reason during the maven execution of the > > test. > > Testng and the embeddable ejb container have some conflicts but I don't > > see why > > I know this only by looking at the first error and having commented > > out > > a line in the second test (transaction.begin) than the second test fails > > by > > stating that a session bean was not bound/found. > > Sorry, but I don't know TestNG, only JUnit... According to the exception I'd assume that there _is_ a problem with correctly opening and closing the transaction. If not, then at least with the initialization and/or shutdown of your test class / test method... > > Without knowing your source I'm wondering whether your failing test class can run standalone or relies on others for doing its checks, for example via static initializers, during init/shutdown etc. Have you checked that? > > > Cheers > > Thorsten > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Rolf, just wondering how far along you got in converting the CaveatEmptor JPA/EJB3/Hibernate app from Ant to Maven... I've been working on this myself some this morning. Were you ever 100% successful? Assuming you were, we should send your modified zip to Hibernate for inclusion on their download page. Also, why is the JBoss stuff only available on the Andromda repo? I'd hope JBoss would host it, or perhaps even Central. Wayne On 4/2/07, Thorsten Heit <[EMAIL PROTECTED]> wrote: Hi Rolf, > this is not a junit test but a testng. > Transactions are handled in the testmethods themselves. > The error messages are not describing the real error. > The problem is that for some reason during the maven execution of the > test. > Testng and the embeddable ejb container have some conflicts but I don't > see why > I know this only by looking at the first error and having commented > out > a line in the second test (transaction.begin) than the second test fails > by > stating that a session bean was not bound/found. Sorry, but I don't know TestNG, only JUnit... According to the exception I'd assume that there _is_ a problem with correctly opening and closing the transaction. If not, then at least with the initialization and/or shutdown of your test class / test method... Without knowing your source I'm wondering whether your failing test class can run standalone or relies on others for doing its checks, for example via static initializers, during init/shutdown etc. Have you checked that? Cheers Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Hi Rolf, > this is not a junit test but a testng. > Transactions are handled in the testmethods themselves. > The error messages are not describing the real error. > The problem is that for some reason during the maven execution of the > test. > Testng and the embeddable ejb container have some conflicts but I don't > see why > I know this only by looking at the first error and having commented > out > a line in the second test (transaction.begin) than the second test fails > by > stating that a session bean was not bound/found. Sorry, but I don't know TestNG, only JUnit... According to the exception I'd assume that there _is_ a problem with correctly opening and closing the transaction. If not, then at least with the initialization and/or shutdown of your test class / test method... Without knowing your source I'm wondering whether your failing test class can run standalone or relies on others for doing its checks, for example via static initializers, during init/shutdown etc. Have you checked that? Cheers Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Hi Thorsten, this is not a junit test but a testng. Transactions are handled in the testmethods themselves. The error messages are not describing the real error. The problem is that for some reason during the maven execution of the test. Testng and the embeddable ejb container have some conflicts but I don't see why I know this only by looking at the first error and having commented out a line in the second test (transaction.begin) than the second test fails by stating that a session bean was not bound/found. On 3/30/07, Thorsten Heit <[EMAIL PROTECTED]> wrote: Hi Rolf, > The errors i get are in the target/surefire-report dir in two files. > i give the contents of the xml file *snip* > message="EntityManagerFactories not bound"> > javax.naming.NameNotFoundException: EntityManagerFactories not bound > at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) > at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) > at org.jnp.server.NamingServer.getObject(NamingServer.java:543) > at org.jnp.server.NamingServer.lookup(NamingServer.java:267) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588) > at javax.naming.InitialContext.lookup(InitialContext.java:351) > at auction.test.EJB3IntegrationTest.getEntityManagerFactory( > EJB3IntegrationTest.java:133) > at auction.test.basic.PersistentStateTransitions.withoutEJBContainer ( > PersistentStateTransitions.java:53) > > > > message="Transaction already active, cannot nest transactions."> > javax.transaction.NotSupportedException: Transaction already active, > cannot > nest transactions. > at org.jboss.tm.TxManager.begin(TxManager.java:557) > at org.jboss.ejb3.embedded.UserTransactionImpl.begin( > UserTransactionImpl.java:74) > at auction.test.basic.PersistentStateTransitions.withEJBContainer( > PersistentStateTransitions.java:116) > *snip* > It looks like the embedded container doesn't have what it needs to startup > properly but I don't have a clue what to look for See the last message: There's still a transaction open in the actual tested class that isn't closed when the next test method is executed. Are you using overwritten implementations of #setUp() and #tearDown() in that test class? Have you tried using different fork mode for your tests? (see http://maven.apache.org/plugins/maven-surefire-plugin/examples/forking.html ) HTH Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Hi Rolf, > The errors i get are in the target/surefire-report dir in two files. > i give the contents of the xml file *snip* > message="EntityManagerFactories not bound"> > javax.naming.NameNotFoundException: EntityManagerFactories not bound > at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) > at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) > at org.jnp.server.NamingServer.getObject(NamingServer.java:543) > at org.jnp.server.NamingServer.lookup(NamingServer.java:267) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588) > at javax.naming.InitialContext.lookup(InitialContext.java:351) > at auction.test.EJB3IntegrationTest.getEntityManagerFactory( > EJB3IntegrationTest.java:133) > at auction.test.basic.PersistentStateTransitions.withoutEJBContainer( > PersistentStateTransitions.java:53) > > > > message="Transaction already active, cannot nest transactions."> > javax.transaction.NotSupportedException: Transaction already active, > cannot > nest transactions. > at org.jboss.tm.TxManager.begin(TxManager.java:557) > at org.jboss.ejb3.embedded.UserTransactionImpl.begin( > UserTransactionImpl.java:74) > at auction.test.basic.PersistentStateTransitions.withEJBContainer( > PersistentStateTransitions.java:116) > *snip* > It looks like the embedded container doesn't have what it needs to startup > properly but I don't have a clue what to look for See the last message: There's still a transaction open in the actual tested class that isn't closed when the next test method is executed. Are you using overwritten implementations of #setUp() and #tearDown() in that test class? Have you tried using different fork mode for your tests? (see http://maven.apache.org/plugins/maven-surefire-plugin/examples/forking.html) HTH Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Hi Thorsten, Strange all my resource directories (src/main/resources, src/test/resources, src/main/java, scr/test/java) are all included in the build path but only the resources in src/main/java and in src/test/java show up in target/classes I have checked the buildpath for excluded and included patterns. right now I have fixed this by manually creating linked resources in src/main/java to the src/main/resources dir. The errors i get are in the target/surefire-report dir in two files. i give the contents of the xml file http://java.sun.com/"; name="java.vendor.url"/> http://java.sun.com/cgi-bin/bugreport.cgi"; name=" java.vendor.url.bug"/> javax.naming.NameNotFoundException: EntityManagerFactories not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588) at javax.naming.InitialContext.lookup(InitialContext.java:351) at auction.test.EJB3IntegrationTest.getEntityManagerFactory( EJB3IntegrationTest.java:133) at auction.test.basic.PersistentStateTransitions.withoutEJBContainer( PersistentStateTransitions.java:53) javax.transaction.NotSupportedException: Transaction already active, cannot nest transactions. at org.jboss.tm.TxManager.begin(TxManager.java:557) at org.jboss.ejb3.embedded.UserTransactionImpl.begin( UserTransactionImpl.java:74) at auction.test.basic.PersistentStateTransitions.withEJBContainer( PersistentStateTransitions.java:116) It looks like the embedded container doesn't have what it needs to startup properly but I don't have a clue what to look for Thanx Rolf On 3/29/07, Thorsten Heit <[EMAIL PROTECTED]> wrote: Hi Rolf, > using the standard directory layout of maven my resources in > src/main/resourses are not copied during an eclipse full build. (neither > are > the ones in src/test/resources). Yes, that's normal: Eclipse only compiles Java source files contained in the configured source folders (Project -> Properties -> Java Build Path -> Source), and only resource files found in these folders are copied to the configured output folder(s). To have Eclipse copy your resources stored under src/main/resources simply add that folder to the build path. BTW: The same holds for test classes/resources under src/test/main etc. > But for some reason maven cannot run the test without failure in the > execution of the tests. > (no compilation error but runtime errors) > Can someone help me how to fix this problem? What error do you get? Have you had a look in the target directory where surefire creates the reports for each executed test? HTH Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse and maven discrepancies
Hi Rolf, > using the standard directory layout of maven my resources in > src/main/resourses are not copied during an eclipse full build. (neither > are > the ones in src/test/resources). Yes, that's normal: Eclipse only compiles Java source files contained in the configured source folders (Project -> Properties -> Java Build Path -> Source), and only resource files found in these folders are copied to the configured output folder(s). To have Eclipse copy your resources stored under src/main/resources simply add that folder to the build path. BTW: The same holds for test classes/resources under src/test/main etc. > But for some reason maven cannot run the test without failure in the > execution of the tests. > (no compilation error but runtime errors) > Can someone help me how to fix this problem? What error do you get? Have you had a look in the target directory where surefire creates the reports for each executed test? HTH Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven
Laurent GRANIE on 19/07/06 15:37, wrote: Ok, I have maven2 working. I'm trying to use MyEclipse to deploy to Tomcat and the MyEclipse deployer is copying the servlet-api jar file to my server. This is a problem because that file conflicts with the server. Is there anyway to keep that on the dependencies in my POM, but not have it on my classpath in Eclipse after running the eclipse:eclipse task? The eclipse:eclipse command adds "Variable" Library entries to the "Java Build Path" of your project. You must define the M2_REPO eclipse variable to your Maven 2 repository (by default ~/.m2/repository). Just select the first entry I edit it and click on the "Variable..." button. The m2eclipse plugin for Eclipse handles the dependencies better, making this M2_REPO variable redundant. It does have its issues as well of course but I find it more useful for webapp development, and I use the war:inplace goal to set up the deployment 'in place', to which I point a tomcat context. No copying files after each change, although I do have to stop and restart tomcat after changing configuration files. I haven't managed to the WTP / WST working with it yet though. Just my 2 cents. Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven
Ok, I have maven2 working. I'm trying to use MyEclipse to deploy to Tomcat and the MyEclipse deployer is copying the servlet-api jar file to my server. This is a problem because that file conflicts with the server. Is there anyway to keep that on the dependencies in my POM, but not have it on my classpath in Eclipse after running the eclipse:eclipse task? The eclipse:eclipse command adds "Variable" Library entries to the "Java Build Path" of your project. You must define the M2_REPO eclipse variable to your Maven 2 repository (by default ~/.m2/repository). Just select the first entry I edit it and click on the "Variable..." button. Laurent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven
does setting the dependancy scope to provided not work when running from MyEclipse... javax.servlet servlet-api 2.3 provided "Bill Manuel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ok, I have maven2 working. I'm trying to use MyEclipse to deploy to > Tomcat > and the MyEclipse deployer is copying the servlet-api jar file to my > server. This is a problem because that file conflicts with the server. > Is > there anyway to keep that on the dependencies in my POM, but not have it > on > my classpath in Eclipse after running the eclipse:eclipse task? > > Thanks, > > Bill Manuel > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven - layers overlapping
Dima Berastau wrote: > 1. generating/updating project.xml from .classpath and .project would > already be useful. Not sure about .project, but .classpath file should IMO be generated from the POM, never the other way around simply because POM has more information in it. The plugin could watch the POM (and possibly it's ancestors) for changes and ask the user to update the affected .classpath files automatically. > 2. running maven's goals from eclipse runtime Building atop of Eclipse Ant plugin would be probably the best choice here. > 3. as would the effort to keep the 2 in sync automatically, Not sure what you mean here, sorry > 4. an editor with outline for project.xml/project.properties would also be > very handy. I envision it as wizard-like tabbed editor like the one provided for plugin descriptors by Eclipse PDE. > I have nothing against JSRs as long as they are useful (= were designed as a > result of experience based on people using technology) and flexible (= it > shouldn't take 1 year to change a standard). > Personally, I think that it would be a lot faster to write a plugin and > start making use of it (if it turns out to be useful people with a lot of > free time can standardize it later). That would also be my preferable choice. :-) Let's make something that works, then extract the important bits later to make a stnadard, and finally implement the thing the right way and scrap the prototype. R. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven - layers overlapping
Hi Scott, I think some duplication will inevitably exist. Different IDEs use different ways to represent the same things (and have grown accustomed to doing so) and many of those ways you simply have to live with (unless you are planning on convincing eclipse development team to switch to maven POMs instead of .classpath and .project :)). Eclipse user myself, what I think is missing is a decent maven plugin for eclipse (along the lines of ant plugin or building on top of the ant plugin) that could bring some of the maven't functionality to eclipse. things like: 1. generating/updating project.xml from .classpath and .project would already be useful. 2. running maven's goals from eclipse runtime 3. as would the effort to keep the 2 in sync automatically, 4. an editor with outline for project.xml/project.properties would also be very handy. I have nothing against JSRs as long as they are useful (= were designed as a result of experience based on people using technology) and flexible (= it shouldn't take 1 year to change a standard). Personally, I think that it would be a lot faster to write a plugin and start making use of it (if it turns out to be useful people with a lot of free time can standardize it later). dima - Original Message - From: "Scott Stirling" <[EMAIL PROTECTED]> To: "'Maven Users List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 04, 2003 12:10 PM Subject: Eclipse and Maven - layers overlapping > Hi, > > I've noticed we have overlapping layers of project configuration, goals (in > the general, non-Maven sense of goals), and tool use between Eclipse and > Maven. Probably true of any of the "new generation" of IDEs. > > I began noticing this a lot today because I am restructuring and > componentizing a large project as part of a SCM switch (StarTeam to > ClearCase). I was generating skeleton Eclipse .project and .classpath files > with Maven for each of our sub-projects (components). > > Regardless of using Maven to generate the Eclipse project files, there are a > few things we want to do to all the Eclipse projects (which we check in and > share), which are realized through Eclipse settings in .project and > .classpath, e.g.: > > - One (or both) of the Eclipse Checkstyle plugins adds itself to your > .project file as a > > - You maintain dependencies between related Eclipse projects by exporting > libraries and paths, which add elements to .classpath > > If you have a software project corresponding to a single commercial product > made up of several small components (each one a project in Eclipse for > various reasons) and several small teams of developers sharing .project and > .classpath files in source control for each project . . . if someone changes > something in their Eclipse build path configuration for their component > project, like adding a jar to their build path or a new source directory or > removing one of the above, the change may need to be propagated through the > network of Eclipse projects, resulting in edits to all the files, checking > them in, and re-importing the projects or re-starting Eclipse. > > There's a whole layer of moderate, not extreme, complexity of configuration > to maintain in the Eclipse project configurations! So, one lesson is that > any ability to generate Eclipse project files from a project.xml is just to > get you started, as advertised. > > The other main layer is the Maven layer; the build layer. Here there are > many of the same things like jars, source and classes dirs, nicely > represented by the POM, which must be configured and then maintained across > all the same components. > > What this leads me to think is that the functionality of Maven and Maven's > POM concept ought to be unified with the way IDEs do things (Eclipse first, > of course). I think the POM should or could become the basis for a JSR (or > something like that) on Java project and build management. Much of the same > information and functionality I want from Maven I also want from my IDE. > The difference is more in the outputs derived from the POM: developers want > the outputs displayed in the IDE and on our desktops; management wants > Web-based reports and installers/CDs. These are some of the things that we > are currently using the IDE and Maven (and previously Ant) to do, either > during development or during the automated build: > > - compile > - assemble and jar > - run unit tests and present results > - coverage analysis (Clover) > - code convention checking (Checkstyle) > - source metrics (JavaNCSS) > - dependency analysis (Pasta or JDepend) > - generate Javadoc > - deploying components > > In development, I do all this in Eclipse with plugins and standard Eclipse > functionality. With the builds, I do it all with Maven and Ant. But I'm > feeling like I'm maintaining a lot of the same information in two places! > > Doesn't this seem to be where things need to go somehow? Maybe one of those > standard IDE JSRs is a good place to start.