You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Casey (JIRA)" <ji...@codehaus.org> on 2007/09/11 17:33:11 UTC

[jira] Created: (MNG-3203) maven should execute compiler:compile and :test-compile in separate executions, to allow separate configuration

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
             Fix For: 2.0.8, 2.1-alpha-1


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

        

[jira] Updated: (MNG-3203) maven should execute compiler:compile and :test-compile in separate executions, to allow separate configuration

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey updated MNG-3203:
----------------------------

    Fix Version/s: 2.1-alpha-1
                   2.0.8

> 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
>             Fix For: 2.0.8, 2.1-alpha-1
>
>
> 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

        

[jira] Updated: (MNG-3203) maven should execute compiler:compile and :test-compile in separate executions, to allow separate configuration

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox updated MNG-3203:
---------------------------

    Fix Version/s:     (was: 2.1-alpha-1)
                       (was: 2.0.8)
                   2.0.9

bumping to 2.0.9. If we get IT tests for these before 2.0.8 is final, we can take a look

> 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
>             Fix For: 2.0.9
>
>
> 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

        

[jira] Commented: (MNG-3203) maven should execute compiler:compile and :test-compile in separate executions, to allow separate configuration

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107088 ] 

Brett Porter commented on MNG-3203:
-----------------------------------

I'm not sure what you mean here - how would this be used? Maybe something like:

<configuration>
  <shared>...</shared>
</configuration>
<executions>
  <execution>
    <id>testCompile</id>
    <configuration>
      <something>...
    </configuration>
    <!-- not goals, that's already bound -->
  </execution>
</executions>

I'm not even sure that'd work - could be a good way to achieve this though. Would you implement it by putting every bound goal in it's own execution? Currently, there is no way to specify this in the default lifecycles.



> 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
>             Fix For: 2.0.8, 2.1-alpha-1
>
>
> 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

        

[jira] Closed: (MNG-3203) maven should execute compiler:compile and :test-compile in separate executions, to allow separate configuration

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ 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

        

[jira] Updated: (MNG-3203) maven should execute compiler:compile and :test-compile in separate executions, to allow separate configuration

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox updated MNG-3203:
---------------------------

    Fix Version/s:     (was: 2.0.9)
                   2.0.10

> 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
>             Fix For: 2.0.10
>
>
> 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