Reputation: 1
I get a "could not process schema files" error on the <exception>
line when I try to add the JAXB2 plugin...
pom.xml
<plugins>
<!-- JAXB2 Maven Plugin -->
<!-- XSD Source Folder -->
<!-- Java Class Source Folder -->
<!-- clear folder -> false -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
<clearOutputDir>false</clearOutputDir>
</configuration>
</plugin>
</plugins>
Screenshot of error:
Upvotes: 0
Views: 4079
Reputation: 174
For me, This issue is resolved by keeping <plugins></plugins> content inside <pluginManagement>
tag as below,
<build>
<pluginManagement>
<plugins>
<plugin>
...
</plugin>
<plugin>
...
</plugin>
</plugins>
</pluginManagement>
</build>
Upvotes: 1
Reputation: 11
I faced similar problem just make sure xsd file has
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
</xsd:schema>
Not
<schema xmlns="http://www.w3.org/2001/XMLSchema">
</schema>`
Upvotes: 1