Hi,
I am using jsonschema2pojo-maven-plugin:0.4.10 to generate Java Pojos, but when my maven build fails with the following error - complaining about StringUtils eventhough the dependency is added.
Am I missing anything here? Appreciate your help in resolving this.
My configuration in pom.xml:
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<version>0.4.10</version>
<configuration>
<sourceDirectory>src/main/resources/schema/sample.schema.json</sourceDirectory>
<targetPackage>src.main.generated.example.types</targetPackage>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
Maven Output:
[ERROR] Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.10:generate (default) on project fraudnet: Execution default of goal org.jsonschema2pojo:jsonschema2pojo-ma
n:0.4.10:generate failed: A required class was missing while executing org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.10:generate: org/apache/commons/lang3/StringUtils
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.10
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/mkatkuri/.m2/repository/org/jsonschema2pojo/jsonschema2pojo-maven-plugin/0.4.10/jsonschema2pojo-maven-plugin-0.4.10.jar
[ERROR] urls[1] = file:/C:/Users/mkatkuri/.m2/repository/org/jsonschema2pojo/jsonschema2pojo-core/0.4.10/jsonschema2pojo-core-0.4.10.jar
[ERROR] urls[2] = file:/C:/Users/mkatkuri/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[ERROR] urls[3] = file:/C:/Users/mkatkuri/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.6/maven-shared-utils-0.6.jar
[ERROR] urls[4] = file:/C:/Users/mkatkuri/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[5] = file:/C:/Users/mkatkuri/.m2/repository/com/google/code/findbugs/annotations/1.3.9/annotations-1.3.9.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>FraudNet:fraudnet:1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.commons.lang3.StringUtils
Thanks
Manoj