I am using WebSphere 7 and trying to deploy war from MyEclipse (Server > WebSphere 7 > right click > Add Deployment).
I am using below maven war plug-in:
<groupId>com.xxx.my.app</groupId>
<artifactId>my-app</artifactId>
<packaging>war</packaging>
<name>my-app</name>
<build>
<finalName>my-app-context-root</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
</plugin>
</plugins>
</build>
To change context root of my war I tried below options:
First option:
<properties>
<m2eclipse.wtp.contextRoot>my-app-context-root</m2eclipse.wtp.contextRoot>
</properties>
Second Option:
<finalName>my-app-context-root</finalName>
But no Luck so for with these options. Whenever I deploy my application/war from MyEclipse and check context root in WebSphere server, WebSphere still shows the context root as 'my-app' (which is mentioned in name tag) not 'my-app-context-root'.
deploy your war file or application in myeclipse tomcat server and right click on the project folder, select properties and go to web option from the MyEclipse menu. there you can change the context-root of an application. The below link may helpful to you.