Hello, I'm trying to have two namespaces defined in 1 maven bundle. I'm reading in https://issues.apache.org/jira/browse/XBEAN-60 that at version 3.4 this had been implemented. But today with version 3.12; I'm getting similar problems with overwriting files: It seems in 1 execution, only 1 namespace can be defined. During the execution with this one namespace in the .pom, it does seem to process both my namespaces, I conclude this from the fact the the lines "Generating META-INF properties file:", "Generating Spring 2.0 handler mapping", "generating HTML", appear twice, once for each namespace I used with the different @org.apache.xbean.XBean namespace="..." annotations. I even see that for the second namespace, the output reads: "updating Spring 2.0 handler mapping" instead of generating. Which seems to be described in XBEAN-60. Unfortunately the HTML documentation, XSD file and WIKI documentation are overwritten with the information of the last namespace.
Am I doing something wrong? Or is this functionality for XSD+HTML+WIKI file generation added later than the spring.handlers and is it not built for multiple namespace support? In attachment you should find the configuration of the plugin and the output of maven showing how it overwrites the same files for each namespace it processes. It creates to sets of identical files .xsd, .xsd.html, .xsd.wiki. Kind regards, Tom Mercelis
[INFO] --- maven-xbean-plugin:3.12:mapping (statusDescriptions) @ status-tables --- [INFO] Generating META-INF properties file: ProjectFolder\target\classes\META-INF\services\org\apache\xbean\spring\http\be.example\xmlns\iecpoller-0.1 for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating Spring 2.0 handler mapping: ProjectFolder\target\classes\META-INF\spring.handlers for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating HTML documentation file: ProjectFolder\target\classes\statusdescriptions-0.2.xsd.html for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating XSD file: ProjectFolder\target\classes\statusdescriptions-0.2.xsd for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating WIKI documentation file: ProjectFolder\target\classes\statusdescriptions-0.2.xsd.wiki for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating META-INF properties file: ProjectFolder\target\classes\META-INF\services\org\apache\xbean\spring\http\be.example\xmlns\statusdescriptions-0.2 for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Updating Spring 2.0 handler mapping: ProjectFolder\target\classes\META-INF\spring.handlers for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Generating HTML documentation file: ProjectFolder\target\classes\statusdescriptions-0.2.xsd.html for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Generating XSD file: ProjectFolder\target\classes\statusdescriptions-0.2.xsd for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Generating WIKI documentation file: ProjectFolder\target\classes\statusdescriptions-0.2.xsd.wiki for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] ...done. [INFO] [INFO] --- maven-xbean-plugin:3.12:mapping (iecpoller) @ status-tables --- [INFO] Generating META-INF properties file: ProjectFolder\target\classes\META-INF\services\org\apache\xbean\spring\http\be.example\xmlns\iecpoller-0.1 for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Updating Spring 2.0 handler mapping: ProjectFolder\target\classes\META-INF\spring.handlers for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating HTML documentation file: ProjectFolder\target\classes\iecpoller-0.1.xsd.html for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating XSD file: ProjectFolder\target\classes\iecpoller-0.1.xsd for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating WIKI documentation file: ProjectFolder\target\classes\iecpoller-0.1.xsd.wiki for namespace: http://be.example/xmlns/iecpoller-0.1 [INFO] Generating META-INF properties file: ProjectFolder\target\classes\META-INF\services\org\apache\xbean\spring\http\be.example\xmlns\statusdescriptions-0.2 for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Updating Spring 2.0 handler mapping: ProjectFolder\target\classes\META-INF\spring.handlers for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Generating HTML documentation file: ProjectFolder\target\classes\iecpoller-0.1.xsd.html for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Generating XSD file: ProjectFolder\target\classes\iecpoller-0.1.xsd for namespace: http://be.example/xmlns/statusdescriptions-0.2 [INFO] Generating WIKI documentation file: ProjectFolder\target\classes\iecpoller-0.1.xsd.wiki for namespace: http://be.example/xmlns/statusdescriptions-0.2 [WARNING] Artifact ebl.inso.indmsgr:status-tables:xsd:0.0.1-SNAPSHOT already attached to project, ignoring duplicate [WARNING] Artifact ebl.inso.indmsgr:status-tables:html:schema:0.0.1-SNAPSHOT already attached to project, ignoring duplicate [INFO] ...done. [INFO]
<plugin> <groupId>org.apache.xbean</groupId> <artifactId>maven-xbean-plugin</artifactId> <version>${xbean-version}</version> <executions> <execution> <id>statusDescriptions</id> <phase>process-classes</phase> <configuration> <strictXsdOrder>false</strictXsdOrder> <namespace>http://be.example/xmlns/statusdescriptions-0.2</namespace> <schema>${basedir}/target/classes/statusdescriptions-0.2.xsd</schema> <outputDir>${basedir}/target/classes</outputDir> <generateSpringSchemasFile>false</generateSpringSchemasFile> <excludedClasses></excludedClasses> </configuration> <goals> <goal>mapping</goal> </goals> </execution> <execution> <id>iecpoller</id> <phase>process-classes</phase> <configuration> <strictXsdOrder>false</strictXsdOrder> <namespace>http://be.example/xmlns/iecpoller-0.1</namespace> <schema>${basedir}/target/classes/iecpoller-0.1.xsd</schema> <outputDir>${basedir}/target/classes</outputDir> <generateSpringSchemasFile>false</generateSpringSchemasFile> <excludedClasses></excludedClasses> </configuration> <goals> <goal>mapping</goal> </goals> </execution> </executions> </plugin>