[ 
http://jira.codehaus.org/browse/MJAXB-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=153286#action_153286
 ] 

Colin Scott commented on MJAXB-8:
---------------------------------

All you need to do here is use a different staleFile value for each execution.

<executions>
        <execution>
                <id>sinkupdate</id>
                <goals>
                        <goal>xjc</goal>
                </goals>
                <configuration>
                        <packageName>foo.sinkupdate</packageName>
                        <schemaFiles>sinkupdate.xsd</schemaFiles>
                        
<staleFile>${project.build.directory}/generated-sources/jaxb/sinkupdate/.staleFlag</staleFile>
                </configuration>                                                
                
        </execution>    
        <execution>
                <id>sinkquery</id>
                <goals>
                        <goal>xjc</goal>
                </goals>
                <configuration>                                         
                        <packageName>foo.sinkquery</packageName>
                        <schemaFiles>sinkquery.xsd</schemaFiles>        
                        
<staleFile>${project.build.directory}/generated-sources/jaxb/sinkquery/.staleFlag</staleFile>
                </configuration>                                                
        </execution>
</executions>

Regards

Colin

> When having multiple executions the jaxb plugin uses same staleFile for both 
> runs
> ---------------------------------------------------------------------------------
>
>                 Key: MJAXB-8
>                 URL: http://jira.codehaus.org/browse/MJAXB-8
>             Project: Maven 2.x JAXB 2.0 Plugin
>          Issue Type: Bug
>         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


Reply via email to