I rarely use mvn compile while in eclipse. I usually just have Eclipse Build Automatically on and when I'm done I do mvn clean compile from command line to make sure it works outside of the IDE. Maybe I haven't been coding enough to run into these problems.
And yes making anything follow mvn convention is an advantage as one of Maven's primary principals is convention over configuration. It's minor changes like this that accumulate and eventually abolish conventions. However it seems there's no standard solution to address the issues you are experiencing and you raise a great point that this should be addressed from the eclipse or m2eclipse side, just as long it doesn't involve changing pom files. =) -----Original Message----- From: adam hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, November 08, 2007 6:05 AM To: [email protected] Subject: Re: [m2eclipse-user] target directory vs. build directory There is a major Con with that, as mentioned, which is that Eclipse doesn't like the Maven compiled classes and running JUnit or other operations after a cmd-line mvn compile causes Eclipse to throw that exception. My question is better defined: is your Pro (making Eclipse follow mvn convention for its build dir) actually any advantage at all? I don't think it is, which is why I changed Eclipse to build to /build/, but I'd like to get other people's experience about it. Thanks Adam Hirn, Joseph wrote: > You can just change the output directory of Eclipse to target/ instead > of build/. The pros are following the conventions of Maven and the con > is having to set this for each project. > > -----Original Message----- > From: Adam Hardy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 5:53 PM > To: [email protected] > Subject: [m2eclipse-user] target directory vs. build directory > > What are the pros and cons of using the same or different directories > for the build directory in Eclipse and Maven? > > I am running Eclipse with my project configured to compile into > project/build/classes > > while maven on the command line by default compiles into > project/target/classes > > Previously I had set the project to use 'target' and I think that was > the reason why I would always have to rebuild my project before running > JUnit - otherwise the tests refused to run, giving me ClassNotFound > exceptions. > > This is Eclipse 3.3 and m2eclipse 0.0.11 > > Thanks > Adam > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
