Why do you 2 executions? Can't you process all XSD in the same execution? If the only reason the packagename configuration, then I advise you to move it to an .xjb file:
Create a movimento_arrecadacao.xjb file in src/main/resources/xjb folder <jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jxb:extensionBindingPrefixes="xjc"> <jxb:bindings schemaLocation="../xsd/movimento_arrecadacao.xsd" node="/xs:schema"> <jxb:schemaBindings> <jxb:package name="com.example.movimentoarrecadacao"/> </jxb:schemaBindings> </jxb:bindings> </jxb:bindings> And the same for contrato_arrecadacao.xsd --> contrato_arrecadacao.xjb <jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jxb:extensionBindingPrefixes="xjc"> <jxb:bindings schemaLocation="../xsd/contrato_arrecadacao.xsd" node="/xs:schema"> <jxb:schemaBindings> <jxb:package name="com.example.contratoarrecadacao"/> </jxb:schemaBindings> </jxb:bindings> </jxb:bindings> Gérald 2009/11/16 Cristiano Gavião <[email protected]>: > Hi, > > I'm trying to use jaxb2-maven-plugin with two executions but it's not > working: > > [ERROR] no schemas has been found > > It seems that configuration is not being reading inside execution node but > only outside of executions node. > > Please, could someone tell me, am I doing something wrong? > > This is my pom: > > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>jaxb2-maven-plugin</artifactId> > <version>1.3</version> > <executions> > <execution> > <id>ContratoArrecadacao</id> > <goals> > <goal>xjc</goal> > </goals> > <configuration> > <verbose>true</verbose> > > <staleFile>${project.build.directory}/generated-sources/jaxb/contratoarrecadacao/.staleFlag</staleFile> > > <schemaFiles>contrato_arrecadacao.xsd</schemaFiles> > > <schemaDirectory>${basedir}/src/main/resources/xsd/</schemaDirectory> > > <packagename>com.example.contratoarrecadacao</packagename> > </configuration> > </execution> > <execution> > <id>MovimentoArrecadacao</id> > <goals> > <goal>xjc</goal> > </goals> > <configuration> > <verbose>true</verbose> > <forceRegenerate>true</forceRegenerate> > <clearOutputDir>false</clearOutputDir> > > <staleFile>${project.build.directory}/generated-sources/jaxb/movimentoarrecadacao/.staleFlag</staleFile> > > <schemaDirectory>${basedir}/src/main/resources/xsd/</schemaDirectory> > > <schemaFiles>movimento_arrecadacao.xsd</schemaFiles> > > <packagename>com.example.movimentoarrecadacao</packagename> > </configuration> > </execution> > </executions> > </plugin> > > -- > _______________________________________ > Cristiano Gavião - Analista de Sistemas > DRY Software > Fone: (85) 9912-5251 > > --------------------------------------------------------------------- To > unsubscribe from this list, please visit: > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
