6 Replies Latest reply: Mar 27, 2012 2:45 AM by Andrew Rubinger RSS

    Shrinkwrap Descriptor Metadata Plugin

    Ralf Battenfeld Novice

      Hi Folks

       

      I am making great progress regarding the Descriptor Metadata plugin. This maven plugin allows to create descriptors much simpler than before. The request is based in SHRINKDESC-92 asking for a tool that allows to generate descriptors separated from the descriptor build. Thanks to Jesper for the suggestions.

       

      The usage is fairly simple:

       

                  <plugin>

                      <groupId>org.jboss.shrinkwrap.descriptors</groupId>

                      <artifactId>shrinkwrap-descriptors-metadata-parser</artifactId>

                      <version>${project.version}</version>

                      <executions>

                          <execution>

                              <id>execution1</id>

                              <phase>validate</phase>

                              <configuration>

                                  <verbose>true</verbose>

                                  <path>

                                      <pathToApi>${basedir}/src/main/java</pathToApi>

                                      <pathToImpl>${basedir}/src/main/java</pathToImpl>

                                      <pathToTest>${basedir}/src/test/java</pathToTest>

                                      <pathToServices>${basedir}/src/main/resources/META-INF/services</pathToServices>

                                  </path>

                                  <descriptors>

                                      <descriptor>

                                          <pathToXsd>${basedir}/src/test/resources/xsd/ironjacamar_1_0.xsd</pathToXsd>

                                          <nameSpace>ironjacamar</nameSpace>

                                          <packageApi>org.jboss.ironjacamar.api</packageApi>

                                          <packageImpl>org.jboss.ironjacamar.impl</packageImpl>

                                          <descriptorName>IronjacamarDescriptor</descriptorName>

                                          <elementName>ironjacamar</elementName>

                                          <elementType>ironjacamar:ironjacamarType</elementType>

                                      </descriptor>

                                  </descriptors>

                              </configuration>

                              <goals>

                                  <goal>parse</goal>

                              </goals>

                          </execution>

                      </executions>

                  </plugin>

       

      Here are some details:

      • Native supports of dtd files
      • Parsing of xsd's are rewritten from ground by using DOM stuff (no xslt)
      • Generating java code is still based on xslt but the plan is to replace this in the future as well. See CodeModel which is as well a fork from jaxb
      • Supports xsd's in a much higher level without enhancements. Example: orm.xsd is parsed without any issues. Cool:-)

       

      I have to continue this. Goal is to use this plugin for all descriptors we create. Stay tuned