The resource dirs are probably marked as source in Eclipse so that
Eclipse can copy their contents to the "output" directory (when the
files are changed), which means that they will be available in the
classpath if you execute a program or test within Eclipse.
-Max
Sybren Stüvel wrote:
I had this:
<build>
...
<resources>
...
<!-- Include this file in the Jar file so that it may be used as
a starting point by other components. -->
<resource>
<directory>.</directory>
<includes>
<include>project.xml</include>
</includes>
</resource>
</resources>
</build>
Removing this resource fixed the issue. Of course, project.xml is no
longer used, so it's no big deal.
I find it strange however, that a resource directory entry in the POM
inserts a <classpathentry kind="src"> in the .classpath file.
Thanks,
Sybren
Max Cooper wrote:
'mvn eclipse:eclipse' goal works for me, and it does NOT create an entry
like this:
<classpathentry kind="src" path="."/>
Is there a setting in your pom.xml file that would lead Maven to believe
that "." is a Java source directory?
Or perhaps there is a bug in the plugin that only occurs when you don't
follow the Maven directory structure conventions (my project does follow
the conventions). I don't know if such a bug exists. If such a bug
exists, perhaps you could reorganize your directory structure to avoid it.
-Max
Sybren Stüvel wrote:
Hi folks,
When I perform a "mvn eclipse:eclipse" command in our "argus-core"
project, Eclipse bugs on the generated .classpath file. This is what's
generated:
<classpath>
<classpathentry kind="src" path="."/>
<classpathentry kind="src"
path="resources/configuration/syst"
output="target/test-classes"/>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src"
path="src/test"
output="target/test-classes"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var"
path="M2_REPO/commons-beanutils/commons-beanutils/1.6.1/commons-beanutils-1.6.1.jar"/>
<classpathentry kind="var"
path="M2_REPO/concurrent/backport-util-concurrent/2.0_01/backport-util-concurrent-2.0_01.jar"/>
[ snipped a lot more .jar files]
</classpath>
The error that Eclipse gives me is:
"Cannot nest 'argus-core/resources/configuration/syst' inside
'argus-core'. To enable the nesting exclude 'resources/' from
'argus-core'"
If I remove this line:
<classpathentry kind="src" path="."/>
from the .classpath file, Eclipse accepts it and everything works fine.
Is there any way to get M2 to create the proper .classpath in the first
place?
Greetings,
---------------------------------------------------------------------
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]