[
http://jira.codehaus.org/browse/MXMLBEANS-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98762
]
Corridor Software Developer commented on MXMLBEANS-33:
------------------------------------------------------
As far as I can tell, there is no way to add it to the classpath which the
other plugins will see when asking the project for the classpath. We cannot add
it as an artifact, nor can it be added as the compile directory. So although
the collection of source directories may be manipulated by any one plugin for
consumption by another, this does not hold true for the output classes.
However, your issue did lead me to some necessary cleanup of pushing the
generated classes to another location, then copying them into place. If you
wish to add /target/generated-classes/xmlbeans to your eclipse project
post-creation copies of the files will now be there. Hopefully the mevenide
plugin does this for you.
If you still find a desperate need and are able to produce a patch that doesn't
bend over backwards to resolve your issue, I'll most certainly apply it and
update in the future.
-Kris Bravo
> 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
> Assignee: Corridor Software Developer
>
> 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