adam
adam

Reputation: 1087

tomcat 7 parallel deployment directory problems

We're using tomcat7 and trying to get parallel deployment to work (Get maven to do parallel deployments to Tomcat). The crux of our current issue is as follows:

app deploys to:

.../webapps/app##1234.war

and unpacks to:

.../webapps/app##1234/

the issue is that on load, the app looks for resources at:

.../webapps/app/

We're deploying using the maven WAR plugin and copying the WAR file into the appropriate location. We're naming the WAR file based on the timestamp and everything's built based on that. As far as we can tell, there's no hard-coding of the path in any of our files. How do we tell tomcat to link the context and path properly?

Tomcat's host entry:

We're not defining anything in a context file for the app.

Upvotes: 0

Views: 499

Answers (2)

adam
adam

Reputation: 1087

There appear to be two root causes of the issue:

  • Sitemesh2 does not support parallel deployment due to how it looks for paths on the filesystem
  • the session timeout was set to be too long so the un-deployment process was not happening fast enough.

Upvotes: 1

Mahender Yadav
Mahender Yadav

Reputation: 344

Go through the link: http://maven.apache.org/plugins-archives/maven-deploy-plugin-2.7/examples/disabling-timestamps-suffix.html

Disable timestamps suffix in an artifact

By default, when a snapshot version of an artifact is deployed to a repository, a timestamp is suffixed to it. To disable the addition of timestamp to the artifact, set the uniqueVersion parameter to false.

mvn deploy:deploy-file -Durl=file:///C:/m2-repo \
                   -DrepositoryId=some.id \
                   -Dfile=your-artifact-1.0.jar \
                   -DpomFile=your-pom.xml \
                   -DuniqueVersion=false

Upvotes: 0

Related Questions