CXF
  1. CXF
  2. CXF-4002

Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.5.4, 2.6.1
    • Component/s: Tooling
    • Labels:
    • Environment:

      Maven, Sonar

    • Estimated Complexity:
      Unknown

      Description

      I am getting this error when using the version 2.5.1 of the cxf-codegen-plugin (i did not get this error with the previous version that I was using which was 2.1.8).

      Pom of the parent :
      <plugin>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-codegen-plugin</artifactId>
      <version>2.5.1</version>
      </plugin>

      Pom of the child :

      <plugin>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-codegen-plugin</artifactId>
      <executions>
      <execution>
      <id>generate-sources</id>
      <phase>generate-sources</phase>
      <configuration>
      <sourceRoot>$

      {basedir}/src/main/generated/</sourceRoot>
      <wsdlOptions>
      <wsdlOption>
      <wsdl>${basedir}

      /src/main/resources/wsdl/mobileclient/blablaClient-1.0.wsdl</wsdl>
      <extraargs>
      <extraarg>-client</extraarg>
      <extraarg>-p</extraarg>
      <extraarg>http://www.xxx.com/client.blablaClient</extraarg>
      </extraargs>
      </wsdlOption>
      </wsdlOptions>
      </configuration>
      <goals>
      <goal>wsdl2java</goal>
      </goals>
      </execution>
      </executions>
      </plugin>

      Here is the complete stack trace :

      Embedded error: Unable to execute maven plugin Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      Caused by: org.sonar.api.utils.SonarException: Unable to execute maven plugin
      at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:48)
      at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:37)
      at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:67)
      at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:54)
      at org.sonar.batch.phases.Phases.execute(Phases.java:77)
      at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59)
      at org.sonar.batch.Batch.analyzeModule(Batch.java:164)
      at org.sonar.batch.Batch.analyzeModule(Batch.java:155)
      at org.sonar.batch.Batch.analyzeModule(Batch.java:155)
      at org.sonar.batch.Batch.analyzeModules(Batch.java:82)
      at org.sonar.batch.Batch.execute(Batch.java:62)
      at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:155)
      at org.sonar.maven.SonarMojo.execute(SonarMojo.java:144)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
      ... 21 more
      Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.sonar.maven.Maven2PluginExecutor.concreteExecute(Maven2PluginExecutor.java:52)
      at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:46)
      ... 35 more
      Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java
      at org.apache.maven.plugin.DefaultPluginManager.validatePomConfiguration(DefaultPluginManager.java:1157)
      at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:705)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      ... 46 more

        Activity

        Celinio Fernandes created issue -
        Hide
        Benson Margulies added a comment -

        This could well be the results of my work on the codegen plugin for 2.5.1, but I'm rather mystified by the question of how Maven would decide about an attempt to configure classesDirectory when it isn't in the XML here anywhere.

        Show
        Benson Margulies added a comment - This could well be the results of my work on the codegen plugin for 2.5.1, but I'm rather mystified by the question of how Maven would decide about an attempt to configure classesDirectory when it isn't in the XML here anywhere.
        Hide
        Daniel Kulp added a comment -

        My gut feeling is that this really should be considered a bug in Sonar. I have no idea what it's trying to do, but the fact that this works well outside of sonar kind of points at tham.

        Show
        Daniel Kulp added a comment - My gut feeling is that this really should be considered a bug in Sonar. I have no idea what it's trying to do, but the fact that this works well outside of sonar kind of points at tham.
        Hide
        Daniel Kulp added a comment -


        Another question: when run in Sonar, what version of Maven do you have it configured to use for the build?

        Show
        Daniel Kulp added a comment - Another question: when run in Sonar, what version of Maven do you have it configured to use for the build?
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        could be interesting which maven version and sonar plugin version used.

        Show
        Olivier Lamy (*$^¨%`£) added a comment - could be interesting which maven version and sonar plugin version used.
        Daniel Kulp made changes -
        Field Original Value New Value
        Fix Version/s NeedMoreInfo [ 12315387 ]
        Hide
        Richard Russell added a comment -

        I experience the error when using Maven 3.0.3 as well as Maven 2.2.1; Sonar 1.7.1 plugin.

        Show
        Richard Russell added a comment - I experience the error when using Maven 3.0.3 as well as Maven 2.2.1; Sonar 1.7.1 plugin.
        Hide
        Michael B added a comment -

        Got the same error on linux using java v1.6.0_30-b12 in Jenkins ver. 1.450 with sonar plugin v1.8 and maven 3. Got that after updating versions of several artifacts in pom including upgrade of cxf from 2.5.0 to 2.5.2. At the same time i have another very similar project configured in the same jenkins, and it has undergone the very similar change without any problems...

        The log:

        [INFO] [13:34:24.266] ------------- Analyzing XXXXXXX-ws-common
        [INFO] [13:34:25.715] Selected quality profile : [name=Sonar way with Findbugs,language=java]
        [INFO] [13:34:25.723] Configure maven plugins...
        [INFO] [13:34:25.745] Compare to previous analysis (2012-01-30)
        [INFO] [13:34:25.759] Compare over 5 days (2012-01-27, analysis of 2012-01-27 10:21:02.0)
        [INFO] [13:34:25.770] Compare over 30 days (2012-01-02, analysis of 2012-01-02 15:32:18.0)
        [INFO] [13:34:25.802] Initializer FindbugsMavenInitializer...
        [INFO] [13:34:25.802] Initializer FindbugsMavenInitializer done: 0 ms
        [INFO] [13:34:25.802] Initializer ProjectFileSystemLogger...
        [INFO] [13:34:25.802] Source directories:
        [INFO] [13:34:25.802] /var/lib/jenkins/jobs/XXXXXXX/workspace/trunk/XXXXXXX-ws-common/src/main/java
        [INFO] [13:34:25.802] Initializer ProjectFileSystemLogger done: 0 ms
        [INFO] [13:34:25.802] Initializer MavenInitializer...
        [INFO] [13:34:25.802] Source encoding: UTF-8
        [INFO] [13:34:25.802] Initializer MavenInitializer done: 0 ms
        [INFO] [13:34:25.802] Execute maven plugin cobertura-maven-plugin...
        [INFO] [13:34:25.802] Execute org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura...
        [INFO] ------------------------------------------------------------------------
        [INFO] Building XXXXXXX-ws-common
        [INFO] task-segment: [org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura]
        [INFO] ------------------------------------------------------------------------
        [INFO] Preparing cobertura:cobertura
        [INFO] [enforcer:enforce

        {execution: default}

        ]
        [INFO] [13:34:27.015] Execute org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura done: 1213 ms
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Can not execute Sonar

        Embedded error: Unable to execute maven plugin
        Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java
        [INFO] ------------------------------------------------------------------------
        [INFO] Trace
        org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
        Caused by: org.sonar.api.utils.SonarException: Unable to execute maven plugin
        at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:51)
        at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:38)
        at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:73)
        at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:60)
        at org.sonar.batch.phases.Phases.execute(Phases.java:90)
        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106)
        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.Batch.execute(Batch.java:100)
        at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:152)
        at org.sonar.maven.SonarMojo.execute(SonarMojo.java:142)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
        ... 21 more
        Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.sonar.maven.Maven2PluginExecutor.concreteExecute(Maven2PluginExecutor.java:52)
        at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:49)
        ... 38 more
        Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java
        at org.apache.maven.plugin.DefaultPluginManager.validatePomConfiguration(DefaultPluginManager.java:1157)
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:705)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 49 more

        Show
        Michael B added a comment - Got the same error on linux using java v1.6.0_30-b12 in Jenkins ver. 1.450 with sonar plugin v1.8 and maven 3. Got that after updating versions of several artifacts in pom including upgrade of cxf from 2.5.0 to 2.5.2. At the same time i have another very similar project configured in the same jenkins, and it has undergone the very similar change without any problems... The log: [INFO] [13:34:24.266] ------------- Analyzing XXXXXXX-ws-common [INFO] [13:34:25.715] Selected quality profile : [name=Sonar way with Findbugs,language=java] [INFO] [13:34:25.723] Configure maven plugins... [INFO] [13:34:25.745] Compare to previous analysis (2012-01-30) [INFO] [13:34:25.759] Compare over 5 days (2012-01-27, analysis of 2012-01-27 10:21:02.0) [INFO] [13:34:25.770] Compare over 30 days (2012-01-02, analysis of 2012-01-02 15:32:18.0) [INFO] [13:34:25.802] Initializer FindbugsMavenInitializer... [INFO] [13:34:25.802] Initializer FindbugsMavenInitializer done: 0 ms [INFO] [13:34:25.802] Initializer ProjectFileSystemLogger... [INFO] [13:34:25.802] Source directories: [INFO] [13:34:25.802] /var/lib/jenkins/jobs/XXXXXXX/workspace/trunk/XXXXXXX-ws-common/src/main/java [INFO] [13:34:25.802] Initializer ProjectFileSystemLogger done: 0 ms [INFO] [13:34:25.802] Initializer MavenInitializer... [INFO] [13:34:25.802] Source encoding: UTF-8 [INFO] [13:34:25.802] Initializer MavenInitializer done: 0 ms [INFO] [13:34:25.802] Execute maven plugin cobertura-maven-plugin... [INFO] [13:34:25.802] Execute org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura... [INFO] ------------------------------------------------------------------------ [INFO] Building XXXXXXX-ws-common [INFO] task-segment: [org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura] [INFO] ------------------------------------------------------------------------ [INFO] Preparing cobertura:cobertura [INFO] [enforcer:enforce {execution: default} ] [INFO] [13:34:27.015] Execute org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura done: 1213 ms [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar Embedded error: Unable to execute maven plugin Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.sonar.api.utils.SonarException: Unable to execute maven plugin at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:51) at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:38) at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:73) at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:60) at org.sonar.batch.phases.Phases.execute(Phases.java:90) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.Batch.execute(Batch.java:100) at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:152) at org.sonar.maven.SonarMojo.execute(SonarMojo.java:142) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98) ... 21 more Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.sonar.maven.Maven2PluginExecutor.concreteExecute(Maven2PluginExecutor.java:52) at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:49) ... 38 more Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: cxf-codegen:wsdl2java at org.apache.maven.plugin.DefaultPluginManager.validatePomConfiguration(DefaultPluginManager.java:1157) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:705) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 49 more
        Hide
        Michael B added a comment -

        Rollback from CXF 2.5.2 to 2.5.0 fixed this problem. So certainly there are some changes in CXF between these versions that are not very compatible...

        Show
        Michael B added a comment - Rollback from CXF 2.5.2 to 2.5.0 fixed this problem. So certainly there are some changes in CXF between these versions that are not very compatible...
        Hide
        Yann Mombrun added a comment -

        I experience the same issue on Windows 64. It works with Maven 3.0.3 but not with Maven 2.2.1.
        Additional plugins configured are pmd, findbugs, cobertura and checkstyle.

        Show
        Yann Mombrun added a comment - I experience the same issue on Windows 64. It works with Maven 3.0.3 but not with Maven 2.2.1. Additional plugins configured are pmd, findbugs, cobertura and checkstyle.
        Hide
        Christoph Linder added a comment -

        Bump for CXF 2.5.2, Linux64, maven 2.2.1

        Show
        Christoph Linder added a comment - Bump for CXF 2.5.2, Linux64, maven 2.2.1
        Hide
        K.C. Sham added a comment -

        CXF 2.6.0 maven 2.2.1 mac same issue.

        Failed when running mvn install; works when running mvn generate-sources.

        <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <version>$

        {cxf.version}

        </version>
        <executions>
        <execution>
        <id>generate-sources</id>
        <phase>generate-sources</phase>
        <configuration>
        <sourceRoot>$

        {project.build.directory}

        /generated/cxf</sourceRoot>
        <wsdlRoot>$

        {basedir}

        /src/main/wsdl</wsdlRoot>
        <includes>
        <include>*/.wsdl</include>
        </includes>
        </configuration>
        <goals>
        <goal>wsdl2java</goal>
        </goals>
        </execution>
        </executions>
        </plugin>

        Show
        K.C. Sham added a comment - CXF 2.6.0 maven 2.2.1 mac same issue. Failed when running mvn install; works when running mvn generate-sources. <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>$ {cxf.version} </version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot>$ {project.build.directory} /generated/cxf</sourceRoot> <wsdlRoot>$ {basedir} /src/main/wsdl</wsdlRoot> <includes> <include>* / .wsdl</include> </includes> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin>
        J. Daniel Kulp <dkulp@apache.org> committed 1919eb9258a5f0ea77527f82be62d772b7544b6c (1 file)
        Reviews: none

        [CXF-4002] Remove the @readonly for classesDIr as it seems to break certain Sonar setups. Not sure why and not able to reproduce it.
        git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1332718 13f79535-47bb-0310-9956-ffa450edef68

        Hide
        Daniel Kulp added a comment -


        I've gone ahead and removed the @readonly for that param. Since I've never been able to reproduce the issue, I'm not sure if that will really help. If someone could test tomorrows snaps, that would be great.

        Show
        Daniel Kulp added a comment - I've gone ahead and removed the @readonly for that param. Since I've never been able to reproduce the issue, I'm not sure if that will really help. If someone could test tomorrows snaps, that would be great.
        Daniel Kulp made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Daniel Kulp [ dkulp ]
        Fix Version/s 2.6.1 [ 12320746 ]
        Fix Version/s 2.5.4 [ 12320747 ]
        Fix Version/s NeedMoreInfo [ 12315387 ]
        Resolution Fixed [ 1 ]
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Daniel Kulp
            Reporter:
            Celinio Fernandes
          • Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development