org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate (generate-api) on project xyz-spec: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties


Solutions on the web

Solution icon of github
Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate (generate-api) on project xyz-spec: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties

Solution icon of github
via GitHub by parched
, 10 months ago
Failed to execute goal com.googlecode.cmake-maven-project:cmake-maven-plugin:2.8.11-b4:generate (generate) on project XXXX: Execution generate of goal com.googlecode.cmake-maven-project:cmake-maven-plugin:2.8.11-b4:generate failed.

Solution icon of github
Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.2:generate-sources (default-generate-sources) on project player-android: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.2:generate-sources failed.

Solution icon of web
Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate (default) on project onebusaway-nyc-tcip-api: Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate failed.

Solution icon of github
via GitHub by zalavaari
, 1 year ago
Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.2:generate-sources (default-generate-sources) on project player-android: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.2:generate-sources failed.

Solution icon of stackoverflow
Failed to execute goal com.saikoa.dexguard.maven:dexguard-maven-plugin:6.1.18:generate-sources (default-generate-sources) on project MyProject: Execution default-generate-sources of goal com.saikoa.dexguard.maven:dexguard-maven-plugin:6.1.18:generate-sources failed.

Solution icon of github
via GitHub by dirkmoors
, 9 months ago
Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.1:generate-sources (default-generate-sources) on project qonect-android: Execution default-generate-sources of goal

Solution icon of github
Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources (default-generate-sources) on project google-play-services: Execution default-generate-sources of goal

Solution icon of github
Failed to execute goal com.github.kongchen:swagger-maven-plugin:3.1.3:generate (default) on project ecp: Cannot load Swagger API reader: com.wordnik.swagger.jaxrs.reader.DefaultJaxrsApiReader

Solution icon of github
Failed to execute goal com.github.kongchen:swagger-maven-plugin:3.1.2:generate (default) on project my-project: null

Stack trace

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate (generate-api) on project xyz-spec: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: java.lang.IllegalArgumentException: trying to create the same field twice: additionalProperties
	at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:425)
	at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:396)
	at org.jsonschema2pojo.rules.AdditionalPropertiesRule.addAdditionalPropertiesField(AdditionalPropertiesRule.java:128)
	at org.jsonschema2pojo.rules.AdditionalPropertiesRule.apply(AdditionalPropertiesRule.java:108)
	at org.jsonschema2pojo.rules.AdditionalPropertiesRule.apply(AdditionalPropertiesRule.java:43)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:135)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
	at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
	at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
	at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)
	at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:125)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
	at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:81)
	at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:37)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:113)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
	at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
	at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
	at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)
	at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:125)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
	at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:81)
	at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:37)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:113)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
	at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
	at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
	at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:64)
	at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:32)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:125)
	at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
	at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
	at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
	at org.jsonschema2pojo.SchemaMapper.generate(SchemaMapper.java:92)
	at org.jsonschema2pojo.Jsonschema2Pojo.generate(Jsonschema2Pojo.java:75)
	at org.jsonschema2pojo.maven.Jsonschema2PojoMojo.execute(Jsonschema2PojoMojo.java:594)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	... 20 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.