You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Edd grant (JIRA)" <ji...@codehaus.org> on 2012/02/14 15:13:03 UTC

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Edd grant created MCOMPILER-165:
-----------------------------------

             Summary: Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
                 Key: MCOMPILER-165
                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
             Project: Maven 2.x Compiler Plugin
          Issue Type: Bug
    Affects Versions: 2.3.2
            Reporter: Edd grant


I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).

Example 1 - Parent POM:
{code}
<pluginManagement>
  <plugins>
     <plugin>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>2.3.2</version>
      <configuration>
        <source>1.6</source>
        <target>1.6</target>
      </configuration> 
    </plugin>
  </plugins>
</pluginManagement>
{code} 

Example 2 - Child POM that inherits the parent POM's plugin configuration:
{code}
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
</plugin>
{code}

Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
{code}
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <compilerId>groovy-eclipse-compiler</compilerId>
    <verbose>true</verbose>
    <source>1.6</source>
    <target>1.6</target>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-eclipse-compiler</artifactId>
      <version>2.6.0-01</version>
    </dependency>
  </dependencies>
</plugin>
{code}

Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:

{code}
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] No such compiler 'groovy-eclipse-compiler'.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
	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.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: No such compiler 'groovy-eclipse-compiler'.
	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	... 17 more

{code}

Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301612#comment-301612 ] 

Joerg Schaible commented on MCOMPILER-165:
------------------------------------------

For M2 this does not matter, the plugin is loaded once and once only.
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>         Attachments: multiple-pom-mixed-java-groovy-project-test.zip
>
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "hendra (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301593#comment-301593 ] 

hendra commented on MCOMPILER-165:
----------------------------------

Try to use different maven-compiler-plugin from the parent pom.
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>         Attachments: multiple-pom-mixed-java-groovy-project-test.zip
>
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "Edd grant (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=292002#comment-292002 ] 

Edd grant commented on MCOMPILER-165:
-------------------------------------

I have checked out the code and will investigate myself but I'm not familiar with the code so not confident I'll be able to offer up a patch any time soon. Would be grateful if someone could look in to this, even if it's just to provide a temporary workaround. 
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>         Attachments: multiple-pom-mixed-java-groovy-project-test.zip
>
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "Edd grant (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301606#comment-301606 ] 

Edd grant commented on MCOMPILER-165:
-------------------------------------

What exactly do you mean by a 'different maven-compiler-plugin', do you mean a different {{version}} attribute? Or a different {{compilerId}}? Or something else? Perhaps I've not explained very well but the fact that the parent POM has a different compilerId to the child was intentional as it supports my use case where the default is to use Java compilation, because some things like the maven-jps-plugin don't work with the {{groovy-eclipse-compiler}} , but where some child modules can use Groovy.

To be honest, I've long since given up on trying to make this work with Maven 2 since I discovered that it works fine with Maven 3.  
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>         Attachments: multiple-pom-mixed-java-groovy-project-test.zip
>
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301607#comment-301607 ] 

Joerg Schaible commented on MCOMPILER-165:
------------------------------------------

It cannot work with M2, since every plugin is loaded once and once only i.e. the dependencies on POM 3 are completely ignored in a reactor build. You would have to declare them also in the parent in the pluginMgmt section to make this work.

M3 uses isolated classloaders for the plugins, therefore it will work.
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>         Attachments: multiple-pom-mixed-java-groovy-project-test.zip
>
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "Edd grant (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291640#comment-291640 ] 

Edd grant commented on MCOMPILER-165:
-------------------------------------

Have just done some testing and have discovered that this isn't solely related to PluginConfiguration inheritance from parent to child POMs. Even if I remove the {{maven-compiler-plugin}} definition from the parent module and explicitly declare it and it's configuration in all child POMs I still get the same error when I build the project from the parent POM, but not if I build the child POM on it's own. 

In summary it now seems that it is maybe not possible to use different {{compilerId}} values for different POMs in a multi POM build? 
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "hendra (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301608#comment-301608 ] 

hendra commented on MCOMPILER-165:
----------------------------------

sorry didn't make it clear enough.

what I mean is using different version of the plugin. 
for your case in 'Example 3': instead of "inherit" the version of maven-compiler-plugin (version 2.3.2) from the parent pom try to use different version.
example:
{noformat}
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>${other.version}</version>
  <configuration>
    <compilerId>groovy-eclipse-compiler</compilerId>
    <verbose>true</verbose>
    <source>1.6</source>
    <target>1.6</target>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-eclipse-compiler</artifactId>
      <version>2.6.0-01</version>
    </dependency>
  </dependencies>
</plugin>
{noformat}

cheers.
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>         Attachments: multiple-pom-mixed-java-groovy-project-test.zip
>
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCOMPILER-165) Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.

Posted by "Edd grant (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MCOMPILER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edd grant updated MCOMPILER-165:
--------------------------------

    Attachment: multiple-pom-mixed-java-groovy-project-test.zip

Attached project which demonstrates the issue:

1: Execute {{mvn clean install}} from the {{child-groovy-module}} folder and it should complete successfully.
2: Execute {{mvn clean install}} from the {{parent-module}} folder, it will fail with the {{No such compiler 'groovy-eclipse-compiler'}} error.
                
> Child modules don't seem to be able to use a different compilerId to their parent modules when built from the parent POM.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-165
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-165
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Edd grant
>         Attachments: multiple-pom-mixed-java-groovy-project-test.zip
>
>
> I have a mixed Java/ Groovy project which is split over several Maven modules, all of which have a common parent module. In the parent POM I specify some basic common options for the {{maven-compiler-plugin}} (see example 1 below). The idea being that in my child modules I can either simple use this configuration by specifying the plugin with no further configuration (example 2), or I can override this configuration if I have specific requirements (for example switching the {{compilerId}}) (example 3).
> Example 1 - Parent POM:
> {code}
> <pluginManagement>
>   <plugins>
>      <plugin>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <version>2.3.2</version>
>       <configuration>
>         <source>1.6</source>
>         <target>1.6</target>
>       </configuration> 
>     </plugin>
>   </plugins>
> </pluginManagement>
> {code} 
> Example 2 - Child POM that inherits the parent POM's plugin configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
> </plugin>
> {code}
> Example 3 - Child POM that specifies a different compilation configuration (uses the {{groovy-eclipse-compiler}}) to the parent POM's  configuration:
> {code}
> <plugin>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <configuration>
>     <compilerId>groovy-eclipse-compiler</compilerId>
>     <verbose>true</verbose>
>     <source>1.6</source>
>     <target>1.6</target>
>   </configuration>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.groovy</groupId>
>       <artifactId>groovy-eclipse-compiler</artifactId>
>       <version>2.6.0-01</version>
>     </dependency>
>   </dependencies>
> </plugin>
> {code}
> Using this configuration everything works fine if I build ({{mvn clean install}}) each POM individually, however when I build the project from the parent POM compilation of the module with the switched {{compilerId}} fails and  I get the following error:
> {code}
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] No such compiler 'groovy-eclipse-compiler'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	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.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: No such compiler 'groovy-eclipse-compiler'.
> 	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:339)
> 	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> {code}
> Would be most grateful if someone could look at this as it's causing us a lot of pain. Also interested to know if there are any workarounds or quick fixes in the meantime? Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira