[ http://jira.codehaus.org/browse/MOJO-514?page=comments#action_81002 ]
Andreas Wuest commented on MOJO-514:
------------------------------------
had the same problem as Kaare and i think i found the problem. what i found out
is that the first run is ok, if you have multiple
schema files. however the second generation always fails because the
"clearOutputDir" configuration parameter is true by default. so
before the second run the output folders are deleted (and with them the just
created .java files). to fix the problem you have to tell the
plugin not to clear the output dir for the second run. just add
<configuration>
<clearOutputDir>false</clearOutputDir>
.......
</configuration>
to the second execution.
the stale flag files are created correct, as far as i can tell. however i think
somebody should update the faq of the plugin page
(http://mojo.codehaus.org/jaxb2-maven-plugin/faq.html) and tell the users to
add the clearOutputDir=false in the configuration.
regards,
andy
> When having multiple executions the jaxb plugin uses same staleFile for both
> runs
> ---------------------------------------------------------------------------------
>
> Key: MOJO-514
> URL: http://jira.codehaus.org/browse/MOJO-514
> Project: Mojo
> Issue Type: Bug
> Components: jaxb2
> Environment: all
> Reporter: Kaare Nilsen
>
> When using mulitple executions like this :
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>jaxb2-maven-plugin</artifactId>
> <version>1.0</version>
> <executions>
> <execution>
> <id>status</id>
> <goals>
> <goal>xjc</goal>
> </goals>
> <configuration>
> <packageName>com.myapp.apackage</packageName>
> <schemaFiles>xxx.xsd</schemaFiles>
> </configuration>
> </execution>
> <execution>
> <id>command</id>
> <goals>
> <goal>xjc</goal>
> </goals>
> <configuration>
> <packageName>anotherPackage</packageName>
> <schemaFiles>xxx2.xsd</schemaFiles>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> The follwing happens.. a .staleFlag is created when the firt execution runs,
> and then the second finds that there are no changes, and do not run.
> So. a possible fix would be that each execution had its own staleFlag.
> It is possible to workaround this by setting staleFlag in the config, but
> hey.. not very intituive right ?
--
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