You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Prescott <mi...@gmail.com> on 2008/11/07 18:56:09 UTC

eclipse:eclipse and the Eclipse output directory

I'd like to lobby for a change in the default behavior of eclipse:eclipse,
which currently configures Eclipse to put its output in the same place that
maven does, under target/classes and so on.

Eclipse and maven don't treat the paths the same way, which, when they're
sharing output folders, can lead to erratic behavior.

As a specific example, XML files in src/main/java automatically get copied
by Eclipse into the Eclipse output folder.  Maven doesn't do this unless you
also specify a <resource> that points to them.  But, maven can find and use
the files that Eclipse copies over.  As a result, you can have maven builds
that pass while Eclipse is running (and building automatically) but fail in
other circumstances (or when you do 'mvn clean install').

Having just wasted an hour tracking that down, I'm curious what the reasons
are for having the two muddled together.  Is the idea to save disk space?

Regards,

Michael Prescott

Re: eclipse:eclipse and the Eclipse output directory

Posted by Barrie Treloar <ba...@gmail.com>.
On Sat, Nov 8, 2008 at 4:26 AM, Michael Prescott
<mi...@gmail.com> wrote:
> I'd like to lobby for a change in the default behavior of eclipse:eclipse,
> which currently configures Eclipse to put its output in the same place that
> maven does, under target/classes and so on.
>
> Eclipse and maven don't treat the paths the same way, which, when they're
> sharing output folders, can lead to erratic behavior.
>
> As a specific example, XML files in src/main/java automatically get copied
> by Eclipse into the Eclipse output folder.  Maven doesn't do this unless you
> also specify a <resource> that points to them.  But, maven can find and use
> the files that Eclipse copies over.  As a result, you can have maven builds
> that pass while Eclipse is running (and building automatically) but fail in
> other circumstances (or when you do 'mvn clean install').
>
> Having just wasted an hour tracking that down, I'm curious what the reasons
> are for having the two muddled together.  Is the idea to save disk space?

Maven doesnt do anything special with the output directories, it just
includes them.
If you copy junk into them outside of Maven then it will get included.

Use src/main/resources instead.
eclipse:eclipse will be configured to include that on your classpath
and then maven will work as expect too.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org