Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7511

cxf-wadl2java-plugin version 3.1.x and 3.2.0 fails to download wadlArtifact

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1, 3.2.0
    • 3.1.14, 3.2.1
    • Build system
    • None
    • Unknown

    Description

      I'm using cxf version 3.1.7 in my project. And have my wadl in maven repository. But it fails to download. Have tested that all 3.0.x versions is OK, but 3.1.0 (and 3.2.0) both fails.
      Plugin is configured like this:

      <plugin>
                      <groupId>org.apache.cxf</groupId>
                      <artifactId>cxf-wadl2java-plugin</artifactId>
                      <executions>
                          <execution>
                              <id>generate-sources-central-clicmedia-client-V3</id>
                              <phase>generate-sources</phase>
                              <configuration>
                              	<encoding>${source.encoding}</encoding>
                                  <sourceRoot>${generated-wsdl2java}</sourceRoot>
                                  <wadlOptions>
                                      <wadlOption>
                                      	<wadlArtifact>
                                      		<groupId>com.xxx.xxx</groupId>
      							        	<artifactId>xxx-backoffice</artifactId>
      							        	<version>${xxx-backoffice.version}</version>
      							        	<type>wadl</type>
                                      	</wadlArtifact>
                                          <extraargs>
                                          	<extraarg>-interface</extraarg>
                                          	<extraarg>-verbose</extraarg>
                                          </extraargs>
                                          <packagename>com.xxx.xxx.restservices.client.v3</packagename>
                                          <schemaPackagenames>
                                             <schemaPackagename>http://xxx.com/xxx=com.xxx.xxx.restservices.client.v3</schemaPackagename>
                                          </schemaPackagenames>                                     
                                      </wadlOption>
                                  </wadlOptions>
                              </configuration>
                              <goals>
                                  <goal>wadl2java</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
      

      When it runs, it logs this:

      [ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:3.1.0:wadl2java (generate-sources-central-xxx-client-V3) on project xxx-servicesRest: Execution generate-sources-central-xxx-client-V3 of goal org.apache.cxf:cxf-wadl2java-plugin:3.1.0:wadl2java failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:3.1.0:wadl2java (generate-sources-central-xxx-client-V3) on project xxx-servicesRest: Execution generate-sources-central-xxx-client-V3 of goal org.apache.cxf:cxf-wadl2java-plugin:3.1.0:wadl2java failed.
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
      	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:116)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution generate-sources-central-xxx-client-V3 of goal org.apache.cxf:cxf-wadl2java-plugin:3.1.0:wadl2java failed.
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      	... 20 more
      Caused by: java.lang.NullPointerException
      	at org.apache.cxf.maven_plugin.wadlto.WadlOption.getWadlURIs(WadlOption.java:98)
      	at org.apache.cxf.maven_plugin.wadlto.AbstractCodeGeneratorMojo.callCodeGenerator(AbstractCodeGeneratorMojo.java:374)
      	at org.apache.cxf.maven_plugin.wadlto.WADL2JavaMojo.execute(WADL2JavaMojo.java:112)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	... 21 more
      

      The same run on 3.0.x version works fine.

      I think we need the same fix like for the issue CXF-7067.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            jrandour jrandour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: