Post

1 follower Follow
0
Avatar

Specify contextRoot when using the maven-deployit-plugin

Hi

This feels like a dumb question, but when I use the maven-deployit-plugin 3.7.1 to deploy to WAS, how do I specify the contextRoot property?

Thanks

Marius

Marius Venter Answered

Post is closed for comments.

2 comments

0
Avatar

Hi Marius

Not such a stupid question at all! First, I'm assuming you're talking about WAR files here, because for EAR files the context root is obviously part of your EAR - specified in application.xml.

For WARs, though, you will indeed not find a "contextRoot" property on a generic jee.War, because whether the context root can be specified or overridden depends on the target platform.

If you're deploying to WebSphere you can declare your WAR file in your deployment package as a was.War rather than a jee.War. You can then set its contextRoot property [1] as follows:

Name: myWar-1.0.war

CI-Type: was.War

CI-Name: myWar

CI-contextRoot: /my-context-root

 

Hope this helps!

 

Andrew

[1] http://docs.xebialabs.com/releases/3.7/was-plugin/wasPluginManual.html#waswar

XebiaLabs Support 0 votes