Build two RPMs from two active profiles from a single "maven install" command?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Build two RPMs from two active profiles from a single "maven install" command?

Johnson, Jonathan

Is it possible to build two or more RPMs when a maven module is built? 

 

Using:

   rpm-maven-plugin: 2.1-alpha-1

   Apache Maven 2.2.1

   Java: 1.6.0_20

   OS: "linux" version: "2.6.18-128.2.1.el5"

 

I have a module with two active profiles (A and B).  Both profiles are verified as active with “mvn help:active-profiles”.  When executing a “mvn install” only the last ‘B’ RPM is created.  If the profile order of A and B are swapped then the last ‘A’ RPM is created.  With both active profiles I would like to produce both RPMs with one “mvn install” command.  Attempting for force the profiles with –PA,B has no effect, both profiles are active but only the last, single RPM is created.  Is there a way for both RPM creations to occur?

 

The reason for two RPMs is we have two separate installations of a RPM for the same application on different systems.  Each installation has a different set of RPM requirements and settings.  The jar files are to be the same between the two installation flavors.

 

Here is the RPM plugin configuration where only the last RPM configuration occurs:

 

    <profiles>

 

        <!-- RPM construction A -->

        <profile>

            <id>A</id>

            <activation>

                <os>

                    <family>unix</family>

                </os>

            </activation>

            <build>

                <plugins>

                    <plugin>

                        <groupId>org.codehaus.mojo</groupId>

                        <artifactId>rpm-maven-plugin</artifactId>

                        <configuration>

                            <name>A</name>

                        […]

                    </plugin>

                </plugins>

            </build>

        </profile>

 

        <!-- RPM construction for B ->

        <profile>

            <id>B</id>

            <activation>

                <os>

                    <family>unix</family>

                </os>

            </activation>

            <build>

                <plugins>

 

                    <plugin>

                        <groupId>org.codehaus.mojo</groupId>

                        <artifactId>rpm-maven-plugin</artifactId>

                        <configuration>

                            <name>B</name>

                        […]

                    </plugin>

                </plugins>

            </build>

        </profile>

 

</profiles>

 

 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Virus_Summary.txt (642 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Build two RPMs from two active profiles from a single "maven install" command?

Izek Greenfield
This post has NOT been accepted by the mailing list yet.
Have you find solution for that issue?