You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Gier (JIRA)" <ji...@codehaus.org> on 2007/08/16 00:20:47 UTC

[jira] Created: (MNG-3150) Command line -f option should propagate to module poms.

Command line -f option should propagate to module poms.
-------------------------------------------------------

                 Key: MNG-3150
                 URL: http://jira.codehaus.org/browse/MNG-3150
             Project: Maven 2
          Issue Type: Improvement
          Components: Command Line
            Reporter: Paul Gier


I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.

Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.

So for my multi module build I would like to be able to say
mvn -f pom-jdk14.xml install

And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.



-- 
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] Issue Comment Edited: (MNG-3150) Command line -f option should propagate to module poms.

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=106957#action_106957 ] 

Paul Gier edited comment on MNG-3150 at 7/10/09 11:01 AM:
----------------------------------------------------------

I tried using profiles initially, but it started becoming very complicated.  
The difficult requirement is that I want transitive dependencies to work, so this means that I can't just do something like build an additional artifact with a -jdk14 classifier.  I need two separate artifacts with two different sets of dependencies, jdk1.5 and jdk1.4.
So getting transitive dependencies to work correctly means that I really need two separate artifactIds and two separate sets of dependencies.  So I tried to use a profile to create two artifactIds from the same pom.  This means I had something like
<artifactId>my-project${artifactClassifier}</artifactId>
Then I need to put all of my dependencies for the default build and the jdk1.4 build into two separate profiles.  The only exception is the dependencies that are already jdk1.4 compatibly like junit and a few others, those can go in the regular dependency section.  However, most of the dependencies, like the inter-module stuff and dependencies on other jboss projects, would have to be in a profile like this:
{code:xml}
<profiles>
  <profile>
    <id>jdk15</id>
    <dependencies>
       ...
    </dependencies>
  </profile>
  
  <profile>
    <id>jdk14</id>
    <dependencies>
       ...
    </dependencies>
  </profile>

<profiles>
{code}
The main problem with this is that in order to use the jdk14 artifact, outside projects will have to make sure that they activate the correct profiles throughout the dependency tree or they will get the wrong dependencies.
If the profile is activated by id (-P jdk14), then the matching profile in the dependency is not automatically enabled.  A property could be used to activate profiles in the dependency poms, but it can be difficult to enforce the same property in each project.  And if different properties are used,
then the poms in the dependency tree will have to be searched for the correct properties to activate each of the correct profiles.



      was (Author: pgier):
    
I tried using profiles initially, but it started becoming very complicated.  
The difficult requirement is that I want transitive dependencies to work, so this means that I can't just do something like build an additional artifact with a -jdk14 classifier.  I need two separate artifacts with two different sets of dependencies, jdk1.5 and jdk1.4.
So getting transitive dependencies to work correctly means that I really need two separate artifactIds and two separate sets of dependencies.  So I tried to use a profile to create two artifactIds from the same pom.  This means I had something like
<artifactId>my-project${artifactClassifier}</artifactId>
Then I need to put all of my dependencies for the default build and the jdk1.4 build into two separate profiles.  The only exception is the dependencies that are already jdk1.4 compatibly like junit and a few others, those can go in the regular dependency section.  However, most of the dependencies, like the inter-module stuff and dependencies on other jboss projects, would have to be in a profile like this:

<profiles>
  <profile>
    <id>jdk15</id>
    <dependencies>
       ...
    </dependencies>
  </profile>
  
  <profile>
    <id>jdk14</id>
    <dependencies>
       ...
    </dependencies>
  </profile>

<profiles>

The main problem with this is that in order to use the jdk14 artifact, outside projects will have to make sure that they activate the correct profiles throughout the dependency tree or they will get the wrong dependencies.
If the profile is activated by id (-P jdk14), then the matching profile in the dependency is not automatically enabled.  A property could be used to activate profiles in the dependency poms, but it can be difficult to enforce the same property in each project.  And if different properties are used,
then the poms in the dependency tree will have to be searched for the correct properties to activate each of the correct profiles.


  
> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>             Fix For: 3.x
>
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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-3150) Command line -f option should propagate to module poms.

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

Benjamin Bentmann closed MNG-3150.
----------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: Issues to be reviewed for 3.x)
         Assignee: Benjamin Bentmann

Superseded by MNG-1493.

> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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-3150) Command line -f option should propagate to module poms.

Posted by "Dave Syer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157835#action_157835 ] 

Dave Syer commented on MNG-3150:
--------------------------------

I also think alternate poms in reactor builds would be very useful.  In my case I need to build and deploy the same artifacts with different artifactIds to different repositories.  I can't see how this is possible with profiles.

> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>             Fix For: 3.0
>
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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-3150) Command line -f option should propagate to module poms.

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183233#action_183233 ] 

Benjamin Bentmann commented on MNG-3150:
----------------------------------------

Paul, are you aware that as of MNG-1493, the {{<module>}} element in the POM can not only point at a directory but also at a POM file? Wouldn't that solve your problem, by having a {{pom-jdk14.xml}} POM refer to its children via {{<module>child/pom-jdk14.xml</module>}}?

> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>             Fix For: 3.x
>
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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-3150) Command line -f option should propagate to module poms.

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

Brett Porter updated MNG-3150:
------------------------------

    Fix Version/s: 2.1

> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>             Fix For: 2.1
>
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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-3150) Command line -f option should propagate to module poms.

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

Arik Kfir commented on MNG-3150:
--------------------------------

Why not use profiles for this?

> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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-3150) Command line -f option should propagate to module poms.

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

Paul Gier updated MNG-3150:
---------------------------

    Attachment: MNG-3150-maven-core-r573613.patch

Adding patch to look for alternate pom files when the -f option is specified.  Also, the system property "alternate.pom.file" can be used to specify alternate pom files.

> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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-3150) Command line -f option should propagate to module poms.

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

Paul Gier commented on MNG-3150:
--------------------------------


I tried using profiles initially, but it started becoming very complicated.  
The difficult requirement is that I want transitive dependencies to work, so this means that I can't just do something like build an additional artifact with a -jdk14 classifier.  I need two separate artifacts with two different sets of dependencies, jdk1.5 and jdk1.4.
So getting transitive dependencies to work correctly means that I really need two separate artifactIds and two separate sets of dependencies.  So I tried to use a profile to create two artifactIds from the same pom.  This means I had something like
<artifactId>my-project${artifactClassifier}</artifactId>
Then I need to put all of my dependencies for the default build and the jdk1.4 build into two separate profiles.  The only exception is the dependencies that are already jdk1.4 compatibly like junit and a few others, those can go in the regular dependency section.  However, most of the dependencies, like the inter-module stuff and dependencies on other jboss projects, would have to be in a profile like this:

<profiles>
  <profile>
    <id>jdk15</id>
    <dependencies>
       ...
    </dependencies>
  </profile>
  
  <profile>
    <id>jdk14</id>
    <dependencies>
       ...
    </dependencies>
  </profile>

<profiles>

The main problem with this is that in order to use the jdk14 artifact, outside projects will have to make sure that they activate the correct profiles throughout the dependency tree or they will get the wrong dependencies.
If the profile is activated by id (-P jdk14), then the matching profile in the dependency is not automatically enabled.  A property could be used to activate profiles in the dependency poms, but it can be difficult to enforce the same property in each project.  And if different properties are used,
then the poms in the dependency tree will have to be searched for the correct properties to activate each of the correct profiles.



> Command line -f option should propagate to module poms.
> -------------------------------------------------------
>
>                 Key: MNG-3150
>                 URL: http://jira.codehaus.org/browse/MNG-3150
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>            Reporter: Paul Gier
>         Attachments: MNG-3150-maven-core-r573613.patch
>
>
> I have a multi module project where I would like to have parrallel builds.  The default pom.xml build would be using jdk1.5 or jdk6, and the parrallel build pom would be for creating retro compiled jdk14 artifacts.  So the pom for this build would be "pom-jdk14.xml".  I've explored other options such as using a classifier for the retro translated artifact, and using profiles to choose between jdk1.5 and jdk1.4 builds.  But both of these have problems that I can't get around without a lot of difficulty.
> Using two separate poms works great for me for a single module project, but for a multi module project, I have no way to tell the modules to pick up a different pom.xml file.
> So for my multi module build I would like to be able to say
> mvn -f pom-jdk14.xml install
> And each module should then look for it's own pom-jdk14.xml.  This could be made into the default behaviour of the "-f" option, or a new option could be introduced like "-fg" to use the other pom file globally across all the module.

-- 
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