Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3034

Import a profile into a POM

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.6
    • None
    • Profiles
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              paulsp Paul Spencer
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: