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