Generated classes don't get added to the build path correctly
-------------------------------------------------------------
Key: MXMLBEANS-33
URL: http://jira.codehaus.org/browse/MXMLBEANS-33
Project: Maven 2.x Xmlbeans Plugin
Issue Type: Bug
Affects Versions: 2.0
Reporter: Martin Probst
When generating classes using the maven-xmlbeans-plugin users can set a
directory where classes should be generated ("classGenerationDirectory"). This
directory is not being added to the build path correctly. The system typically
works because classes go into the standard target/classes directory by default,
but it doesn't work for any other directory. Users might want to set a
different directory for compatibility with e.g. Eclipse - Eclipse empties the
target/classes directory when building, so the XMLBeans classes need to be put
aside safely.
The responsible code is in CompileXmlBeansMojo.java, line 121
(updateProject(...)):
> project.getCompileClasspathElements().add(compilerParams.getClassesDir());
project.getCompileClasspathElements() returns a new list that is generated for
this request, adding something to that list does not have any effect on the
build process. No idea how this should be done correctly though.
Test case:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xmlbeans-maven-plugin</artifactId>
<executions>
<execution>
<id>Build-XMLBeans</id>
<phase>generate-sources</phase>
<goals>
<goal>xmlbeans</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceSchemas>...</sourceSchemas>
<classGenerationDirectory>target/somewhere</classGenerationDirectory>
</configuration>
</plugin>
--
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
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email