Is there any way I can use two different profiles in settings.xml file to execute two different builds on different servers? For eg: In my settings.xml file I have two profiles:
<profile>
<id>test1</id>
<properties>
<liferay.version>6.2.10.9</liferay.version>
<liferay.maven.plugin.version>6.2.10.6</liferay.maven.plugin.version>
<liferay.auto.deploy.dir>Server1 Details</liferay.auto.deploy.dir>
<liferay.app.server.deploy.dir>Server1 Details</liferay.app.server.deploy.dir>
<liferay.app.server.lib.global.dir>Server1 Details</liferay.app.server.lib.global.dir>
<liferay.app.server.portal.dir>Server1 Details</liferay.app.server.portal.dir>
</properties>
</profile>
<profile>
<id>test2</id>
<properties>
<liferay.version>6.2.10.9</liferay.version>
<liferay.maven.plugin.version>6.2.10.6</liferay.maven.plugin.version>
<liferay.auto.deploy.dir>Server2 Details</liferay.auto.deploy.dir>
<liferay.app.server.deploy.dir>Server2 Details</liferay.app.server.deploy.dir>
<liferay.app.server.lib.global.dir>Server2 Details</liferay.app.server.lib.global.dir>
<liferay.app.server.portal.dir>Server2 Details</liferay.app.server.portal.dir>
</properties>
</properties>
</profile>
<activeProfiles>
<activeProfile>test1</activeProfile>
<activeProfile>test2</activeProfile>
</activeProfiles>
Now, I want "test1" profile for one project and "test2" for another project and I want my pom.xml build properties to be fetched from settings.xml profile's properties.
If I keep both profile in "activeProfiles", my both projects pick "test2" details and build & deploy to wrong server.
In pom.xml I'm using build>plugins>configurations like this:
<configuration>
<autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir>
<appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir>
<appServerLibGlobalDir>${liferay.app.server.lib.global.dir} </appServerLibGlobalDir>
<appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir>
<liferayVersion>${liferay.version}</liferayVersion>
<pluginName>portlet-name</pluginName>
<pluginType>portlet</pluginType>
</configuration>
Please help!
Thanks in advance!