maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Herscu <>
Subject Re: [m2] adding classpathentry with maven-eclipse-plugin
Date Fri, 27 Apr 2007 17:13:34 GMT
Here is one use case (or probably something missing from 

- add a resource folder to your Java project
- add it in the pom.xml
- write some code to load some resource (e.g. using getResourceAsStream)
- test the project using M2 -- the resource will be found
- test the project in Eclipse -- the resource will *not* be found

In order to run/test/debug the project in Eclipse, you will have to 
manually add that resource folder to the .classpath descriptor file.
The maven-eclipse-plugin could automatically add that resource folder as 
a classpathentry.

Adrian Herscu wrote:
> Solved by adding that classpath using the build-helper-maven-plugin.
> Thorsten Heit wrote:
>> Hi Adrian,
>>> Is there some way to add a classpathentry such as
>>>    <classpathentry kind="src" path="target/generated-sources/antlr"/>
>>> to the .classpath file?
>>> It seems that the plugin knows only about classpath containers :-(
>> AFAIK no. The plugin only adds all the dependencies contained in your 
>> pom.xml to the .classpath file. Just for curiosity: What's your use case?
>> Thorsten

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message