[ 
http://jira.codehaus.org/browse/MNG-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Casey closed MNG-3203.
---------------------------

         Assignee: John Casey
       Resolution: Fixed
    Fix Version/s:     (was: 2.0.11)
                   2.2.0

for default lifecycle bindings (mojos bound to the lifecycle from the packaging 
of the POM), the executionId that can be used to configure each is 
'default-<goalname>'. So, to configure the compiler plugin differently for the 
compile and testCompile goals, you'd use something like:

{code:xml}
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <executions>
    <execution>
      <id>default-compile</id>
      <configuration>
        <source>1.4</source>
        <target>1.4</target>
      </configuration>
    </execution>
    <execution>
      <id>default-testCompile</id>
      <configuration>
        <source>1.5</source>
        <target>1.5</target>
      </configuration>
    </execution>
  </executions>
</plugin>
{code}

This should work both in Maven 2.2.0 and in Maven 3.x. See IT: 

[MavenITmng3203DefaultLifecycleExecIdTest.java|http://svn.apache.org/repos/asf/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3203DefaultLifecycleExecIdTest.java]

> maven should execute compiler:compile and :test-compile in separate 
> executions, to allow separate configuration
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3203
>                 URL: http://jira.codehaus.org/browse/MNG-3203
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.0.7
>            Reporter: John Casey
>            Assignee: John Casey
>             Fix For: 2.2.0
>
>
> Currently, it's impossible to configure the two default maven-compiler-plugin 
> mojos in the jar lifecycle (:compile and :test-compile) separately without 
> the configuration for one affecting both. This is because they are both 
> executed in the same (default) execution. We should be assigning these to 
> different execution id's, to allow separate configuration.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to