2016-08-15 2 views

Antwort

0

Meine Lösung für die jaxb2-Maven-Plugin:

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>jaxb2-maven-plugin</artifactId> 
    <version>2.2</version> 
    <executions> 
    <execution> 
     <id>bla</id> 
     <phase>generate-resources</phase> 
     <goals> 
     <goal>xjc</goal> 
     </goals> 
     <configuration> 
     <sources> 
      <source>${somevariable}/somexsd.xsd</source> 
     </sources> 
     <outputDirectory>src/main/generated-sources/jaxb/</outputDirectory> 
     <encoding>UTF-8</encoding> 
     <locale>en</locale> 
     <packageName>de.something.generated</packageName> 
     <noPackageLevelAnnotations>true</noPackageLevelAnnotations> 
     </configuration> 
    </execution> 
    </executions> 
</plugin> 

mit "noPackageLevelAnnotations = true" wird es keine erzeugte package-info.java in Ihrem Paket sein "de.something.generated"

jetzt nur Sie haben unter Ihrem normalen src/main/java das gleiche Paket „de.something.generated“ und legen Sie dort Ihre eigenen package-info.java

nur bauen und genießen hinzuzufügen;)