maven - build multiple modules multiple times in parent pom -
there several applications need built , packaged number of modules.
in parent pom, i'm using profile invoke builds different apps.
root parent/ pom.xml modulea/ pom.xml moduleb/ pom.xml modulec/ pom.xml for example, app "profile-1" need subset of existing modules built , put tar ball. tar contain several jars , different config files pulled target/ of sub modules.
i'm using shell script invoked using exec-maven-plugin put tar.
the problem i'm facing that, in 1 application, need build same module multiple times different maven parameters.
what best way this?
<profiles> <profile> <id>profile-1</id> <modules> <module>../modulea</module> <module>../moduleb</module> <!-- <module>../modulec</module> --> </modules> <properties> <global.version>0.0.1-snapshot</global.version> </properties> <build> <!-- use maven exec plugin run shell script generates tar ball picking jars , config files different modules target dirs --> <plugins> </plugins> </build> <profile> </profiles> a sample sub module pom
<groupid>com.test</groupid> <artifactid>modulec</artifactid> <packaging>bundle</packaging> <version>${global.version}</version> <name>test :: ${project.artifactid} :: ${name} </name> <parent> <groupid>com.test</groupid> <artifactid>parent</artifactid> <version>${global.version}</version> <relativepath>../parent</relativepath> </parent> things tried:
1) can separate multiple profiles , invoke them -pprofile-1,profile-2?
did not work me doing wrong.
2) have shell script has mvn command line build modulec in different ways.
- though pass in "-dglobal_version", modulec run mvn command line not seem find parent in repository.
i tried doing "-n" build put parent pom in repository before building application did not help.
Comments
Post a Comment