Hi,
It look like it isn’t possible to got a different Deploy Location or Web Context-root when the warName configuration property of plugin ‘maven-war-plugin’ is set.
Because it always pick the warName property instead of the finalName property.
So in this example
myAppDev
is ignored:
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<finalName>myAppDev</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
<configuration>
<warName>${project.artifactId} ${project.version}(${bambooBuildNumber})</warName>
<outputDirectory>D:\builds\myAppDev\</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
The warName
myAppDev_2.10(${bambooBuildNumber})
is useless for dev deploy on the Tomcat runtime. Only the warName is used for bamboo CI.
How is it possible to set the Web Context-root or deploy location in the project pom.xml?