[ 
https://jira.codehaus.org/browse/MJAXB-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277296#comment-277296
 ] 

Anders Hammar edited comment on MJAXB-52 at 8/29/11 1:10 PM:
-------------------------------------------------------------

This turns out not to be a bug, but a side effect of {{clearOutputDir}} being 
set to true by default.
A workaround is to set it to false, either for all executions or at least all 
executions after the first one.

      was (Author: afloom):
    This turns out not to be a bug, but a side effect of {{clearOutputDir}} 
being set to true by default.
  
> Several executions of xjc in a build only leaves the classes generated in the 
> last execution when finishing
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: MJAXB-52
>                 URL: https://jira.codehaus.org/browse/MJAXB-52
>             Project: Maven 2.x JAXB 2.1 Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: MacOs 10.7.1
> Maven 3.0.3
>            Reporter: Anders Hammar
>
> When I have several xjc execution bindings in a build, only the classes 
> generated in the last execution is left after finishing.
> {code:xml}
>           <plugin>
>             <groupId>org.codehaus.mojo</groupId>
>             <artifactId>jaxb2-maven-plugin</artifactId>
>             <version>1.3.1</version>
>             <executions>
>               <execution>
>                 <id>xjc1</id>
>                 <goals>
>                   <goal>xjc</goal>
>                 </goals>
>                 <configuration>
>                   <schemaFiles>A1.xsd,A2.xsd</schemaFiles>
>                   <packageName>org.acme.a</packageName>
>                   
> <staleFile>${project.build.directory}/jaxb2/.xjcStaleFlag1</staleFile>
>                 </configuration>
>               </execution>
>               <execution>
>                 <id>xjc2</id>
>                 <goals>
>                   <goal>xjc</goal>
>                 </goals>
>                 <configuration>
>                   <schemaFiles>B1.xsd,B2.xsd</schemaFiles>
>                   <packageName>org.acme.b</packageName>
>                   
> <staleFile>${project.build.directory}/jaxb2/.xjcStaleFlag2</staleFile>
>                 </configuration>
>               </execution>
>               <execution>
>                 <id>xjc3</id>
>                 <goals>
>                   <goal>xjc</goal>
>                 </goals>
>                 <configuration>
>                   <schemaFiles>C1.xsd,C2.xsd</schemaFiles>
>                   <packageName>org.acme.c</packageName>
>                   
> <staleFile>${project.build.directory}/jaxb2/.xjcStaleFlag3</staleFile>
>                 </configuration>
>               </execution>
>             </executions>
>           </plugin>
> {code}

--
This message is automatically generated by JIRA.
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


Reply via email to