- This topic has 3 replies, 2 voices, and was last updated 10 years ago by support-pradeep.
-
AuthorPosts
-
rspanParticipantHi,
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?
support-pradeepMemberrspan,
Please check this link which describes how to change the context root. You can see that it is related to maven and not a MyEclipse issue. Check if Maven profiles might help you in this case.
Please let us know if there are any MyEclipse features that are causing this problem.
rspanParticipantThank you.
Setting the property
<m2eclipse.wtp.contextRoot>MyAppDev</m2eclipse.wtp.contextRoot>
Did the trick.
support-pradeepMemberrspan,
Glad that you could get it working and thanks for letting us know.
-
AuthorPosts