[ http://jira.codehaus.org/browse/MECLIPSE-121?page=all ]
Kenney Westerhof closed MECLIPSE-121:
-------------------------------------
Resolution: Cannot Reproduce
The xmlbeans-maven-plugin will add the target/xmlbean-sources/ to the compile
classpath elements of the pom.
The eclipse plugin will register that directory as a source directory.
Eclipse will export all direct sources of a project by default.
So, even though those source dirs are not marked as exported, they are. I've
just created a test project
with xmlbeans generated sources and had another project depend on it (by
manually creating a project reference).
I can easily access the generated sources from that second project.
> Adding extra .classpath entries (making xmlbeans work with
> maven-eclipse-plugin)
> --------------------------------------------------------------------------------
>
> Key: MECLIPSE-121
> URL: http://jira.codehaus.org/browse/MECLIPSE-121
> Project: Maven 2.x Eclipse Plugin
> Type: Improvement
> Versions: 2.3, 2.2
> Environment: Any environment, though this fix was particularly inspired by a
> setup in which the xmlbeans plugin generates .java and .class files, in a
> multiproject setup, where we want all eclipse projects to compile even when
> they refer to generated xmlbeans classes.
> Reporter: erwin
> Attachments: patch-maven-eclipse-plugin-2.2-classpathentries.txt
>
>
> The setup that we prefer to make the maven xmlbeans plugin work in
> combination with the maven eclipse plugin and eclipse, is one where the
> .classpath file of each xmlbeans-enabled project to contain this line:
> <classpathentry kind="lib" exported="true" path="target/classes"
> sourcepath="target/xmlbeans-source"/>
> I don't see a way to tell the maven-eclipse-plugin to do this currently. It
> could be solved by adding another specific parameter to the EclipsePlugin
> class, "exportedLibraries", akin to "classpathContainers". But then next time
> there will be another need.
> I think that a better solution is a generic way to add custom .classpath
> entries, that can also subsume the functionality of the "classpathContainers"
> parameter. Example:
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-eclipse-plugin</artifactId>
> <configuration>
> <classpathentries>
> <classpathentry>
> <kind>lib</kind>
> <exported>true</exported>
> <path>target/classes</path>
> <sourcepath>target/xmlbeans-source</sourcepath>
> </classpathentry>
> </classpathentries>
> </configuration>
> </plugin>
> I'll attach a patch to this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira