0

I'm searching for something that can deploy on an application server (tomcat) a war and its relative context.xml file and/or a properties file for the application. The problem is that the properties file should be in classpath of the application context (in conf/Catalina/localhost).

To make this i've found the Cargo Maven Plugin that seems what I need, but how can I make the deployment of the conf files in a remote server? I'm not sure that this is possible...

otherwise you know someother way to do this?

write in short i need somenthing to make mvn goal:install -P production and the project is installed in a remote server without do nothing.

rascio
  • 8,968
  • 19
  • 68
  • 108

1 Answers1

0

It's possible. You just have to bundle both files in your WAR file. The context.xml sits in META-INF/context.xml and the properties file under WEB-INF/classes.

Community
  • 1
  • 1
Benjamin Muschko
  • 32,442
  • 9
  • 61
  • 82
  • the problem is I need to have the properties file out of the war, so the better solution is to put it in the tomcat classpath... – rascio Jun 29 '11 at 11:08
  • You want to have it outside of the WAR to be able to change the values or what is the reason behind it? – Benjamin Muschko Jun 29 '11 at 11:11
  • yes because who manage the configuration don't want to recompile and redeploy when only the configuration change – rascio Jun 29 '11 at 11:18
  • You'd only have to copy the file once right? So you can either copy it manually or use the [Maven Wagon plugin](http://mojo.codehaus.org/wagon-maven-plugin/usage.html) to upload it. – Benjamin Muschko Jun 29 '11 at 11:29