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 Spencer (JIRA)" <ji...@codehaus.org> on 2007/06/04 17:03:58 UTC

[jira] Created: (MNG-3034) Import a profile into a POM

Import a profile into a POM
---------------------------

                 Key: MNG-3034
                 URL: http://jira.codehaus.org/browse/MNG-3034
             Project: Maven 2
          Issue Type: Improvement
          Components: Profiles
    Affects Versions: 2.0.6
            Reporter: Paul Spencer


I am finding that profiles are very powerful. As I make more use of them across projects, many of which are unrelated, I find myself copying a profile from one POM to another. Placing profiles in a POM the is extended is impractical because each change to a profile in the POM will prompt a release cycle of the POM and every project that extends the POM.

Related thread:
    http://www.mail-archive.com/users@maven.apache.org/msg67252.html

Below is how I would expect to use profile importing.

***
* POM of project which imports the profiles cargo_tomcat_remote and
* cargo_jetty_remote and selenium-integration-test.
***
<project>
  ...
  <groupId>com.foo.applications</groupId>
  <artifactId>webapp_1</artifactId>
  ...
  <profiles>
    <profile>
      <id>cargo_tomcat_remote</id>
      <groupId>com.foo.profiles</groupId>
      <artifactId>cargo</artifactId>
      <version>1.0</version>
      <activation>
        ...
      </activation>
    </profile>
    <profile>
      <id>cargo_jetty_remote</id>
      <groupId>com.foo.profiles</groupId>
      <artifactId>cargo</artifactId>
      <version>1.0</version>
      <!-- used activation rules in imported profile -->
      ...
    </profile>
    <profile>
      <id>selenium-integration-test</id>
      <groupId>com.foo.profiles</groupId>
      <artifactId>selenium</artifactId>
      <version>1.0</version>
      <!-- used activation rules in imported profile -->
      ...
    </profile>
</project>

***
* POM of project which defines 2 profiles, cargo_tomcat_remote and
* cargo_jetty_remote.
***
<project>
  ...
  <groupId>com.foo.profiles</groupId>
  <artifactId>cargo</artifactId>
  <version>1.0</version>
  ...
  <profiles>
    <profile>
      <id>cargo_tomcat_remote</id>
        ...
    </profile>
    <profile>
      <id>cargo_jetty_remote</id>
      <activation>
        ...
      </activation>
    </profile>
</project>


Paul Spencer


-- 
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-3034) Import a profile into a POM

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98534 ] 

Jason van Zyl commented on MNG-3034:
------------------------------------

That's fine, but still package it up as something resembling a working build as then it's easier to lay it out as an integration test and play around with it.

> Import a profile into a POM
> ---------------------------
>
>                 Key: MNG-3034
>                 URL: http://jira.codehaus.org/browse/MNG-3034
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>    Affects Versions: 2.0.6
>            Reporter: Paul Spencer
>
> I am finding that profiles are very powerful. As I make more use of them across projects, many of which are unrelated, I find myself copying a profile from one POM to another. Placing profiles in a POM the is extended is impractical because each change to a profile in the POM will prompt a release cycle of the POM and every project that extends the POM.
> Related thread:
>     http://www.mail-archive.com/users@maven.apache.org/msg67252.html
> Below is how I would expect to use profile importing.
> ***
> * POM of project which imports the profiles cargo_tomcat_remote and
> * cargo_jetty_remote and selenium-integration-test.
> ***
> <project>
>   ...
>   <groupId>com.foo.applications</groupId>
>   <artifactId>webapp_1</artifactId>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <activation>
>         ...
>       </activation>
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
>     <profile>
>       <id>selenium-integration-test</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>selenium</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
> </project>
> ***
> * POM of project which defines 2 profiles, cargo_tomcat_remote and
> * cargo_jetty_remote.
> ***
> <project>
>   ...
>   <groupId>com.foo.profiles</groupId>
>   <artifactId>cargo</artifactId>
>   <version>1.0</version>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>         ...
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <activation>
>         ...
>       </activation>
>     </profile>
> </project>
> Paul Spencer

-- 
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-3034) Import a profile into a POM

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98489 ] 

Jason van Zyl commented on MNG-3034:
------------------------------------

Please attache a POM we can actually use to reproduce the problem.

> Import a profile into a POM
> ---------------------------
>
>                 Key: MNG-3034
>                 URL: http://jira.codehaus.org/browse/MNG-3034
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>    Affects Versions: 2.0.6
>            Reporter: Paul Spencer
>
> I am finding that profiles are very powerful. As I make more use of them across projects, many of which are unrelated, I find myself copying a profile from one POM to another. Placing profiles in a POM the is extended is impractical because each change to a profile in the POM will prompt a release cycle of the POM and every project that extends the POM.
> Related thread:
>     http://www.mail-archive.com/users@maven.apache.org/msg67252.html
> Below is how I would expect to use profile importing.
> ***
> * POM of project which imports the profiles cargo_tomcat_remote and
> * cargo_jetty_remote and selenium-integration-test.
> ***
> <project>
>   ...
>   <groupId>com.foo.applications</groupId>
>   <artifactId>webapp_1</artifactId>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <activation>
>         ...
>       </activation>
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
>     <profile>
>       <id>selenium-integration-test</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>selenium</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
> </project>
> ***
> * POM of project which defines 2 profiles, cargo_tomcat_remote and
> * cargo_jetty_remote.
> ***
> <project>
>   ...
>   <groupId>com.foo.profiles</groupId>
>   <artifactId>cargo</artifactId>
>   <version>1.0</version>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>         ...
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <activation>
>         ...
>       </activation>
>     </profile>
> </project>
> Paul Spencer

-- 
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-3034) Import a profile into a POM

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

Paul Spencer commented on MNG-3034:
-----------------------------------

Jason,
This is a request for improvement.  The "problem" is that I am having to cut and paste one profile to many poms and then maintain each copy.  By adding a way to importing a profile, only one copy of the profile needs to be maintained.  Because the imported profile is in POM which is in the repository, reproducibility of the build is maintained be default.

Paul Spencer



> Import a profile into a POM
> ---------------------------
>
>                 Key: MNG-3034
>                 URL: http://jira.codehaus.org/browse/MNG-3034
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>    Affects Versions: 2.0.6
>            Reporter: Paul Spencer
>
> I am finding that profiles are very powerful. As I make more use of them across projects, many of which are unrelated, I find myself copying a profile from one POM to another. Placing profiles in a POM the is extended is impractical because each change to a profile in the POM will prompt a release cycle of the POM and every project that extends the POM.
> Related thread:
>     http://www.mail-archive.com/users@maven.apache.org/msg67252.html
> Below is how I would expect to use profile importing.
> ***
> * POM of project which imports the profiles cargo_tomcat_remote and
> * cargo_jetty_remote and selenium-integration-test.
> ***
> <project>
>   ...
>   <groupId>com.foo.applications</groupId>
>   <artifactId>webapp_1</artifactId>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <activation>
>         ...
>       </activation>
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
>     <profile>
>       <id>selenium-integration-test</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>selenium</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
> </project>
> ***
> * POM of project which defines 2 profiles, cargo_tomcat_remote and
> * cargo_jetty_remote.
> ***
> <project>
>   ...
>   <groupId>com.foo.profiles</groupId>
>   <artifactId>cargo</artifactId>
>   <version>1.0</version>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>         ...
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <activation>
>         ...
>       </activation>
>     </profile>
> </project>
> Paul Spencer

-- 
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-3034) Import a profile into a POM

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

Brett Porter closed MNG-3034.
-----------------------------

         Assignee: Brett Porter
       Resolution: Won't Fix
    Fix Version/s:     (was: Reviewed Pending Version Assignment)

is specific use case is unlikely to be addressed, however full-fledged mix-ins are expected for the POM in a future version.

You might also look at Don Brown's itblast plugin that helps with this use case.

> Import a profile into a POM
> ---------------------------
>
>                 Key: MNG-3034
>                 URL: http://jira.codehaus.org/browse/MNG-3034
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>    Affects Versions: 2.0.6
>            Reporter: Paul Spencer
>            Assignee: Brett Porter
>
> I am finding that profiles are very powerful. As I make more use of them across projects, many of which are unrelated, I find myself copying a profile from one POM to another. Placing profiles in a POM the is extended is impractical because each change to a profile in the POM will prompt a release cycle of the POM and every project that extends the POM.
> Related thread:
>     http://www.mail-archive.com/users@maven.apache.org/msg67252.html
> Below is how I would expect to use profile importing.
> ***
> * POM of project which imports the profiles cargo_tomcat_remote and
> * cargo_jetty_remote and selenium-integration-test.
> ***
> <project>
>   ...
>   <groupId>com.foo.applications</groupId>
>   <artifactId>webapp_1</artifactId>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <activation>
>         ...
>       </activation>
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>cargo</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
>     <profile>
>       <id>selenium-integration-test</id>
>       <groupId>com.foo.profiles</groupId>
>       <artifactId>selenium</artifactId>
>       <version>1.0</version>
>       <!-- used activation rules in imported profile -->
>       ...
>     </profile>
> </project>
> ***
> * POM of project which defines 2 profiles, cargo_tomcat_remote and
> * cargo_jetty_remote.
> ***
> <project>
>   ...
>   <groupId>com.foo.profiles</groupId>
>   <artifactId>cargo</artifactId>
>   <version>1.0</version>
>   ...
>   <profiles>
>     <profile>
>       <id>cargo_tomcat_remote</id>
>         ...
>     </profile>
>     <profile>
>       <id>cargo_jetty_remote</id>
>       <activation>
>         ...
>       </activation>
>     </profile>
> </project>
> Paul Spencer

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