0

My organization wants to put "configuration" of the container (such as JMS resources and datasources) into source control. I'd like haven Maven be able to execute this as a goal. This isn't far from the underlying ideas behind liquibase, where you can update your schema with mvn liquibase:update.

I'd like something that could be like:

mvn container:config -Pdev

and it would go out to the dev server and perhaps add a datasource to the server.xml. Bonus points if the solution is portable across GlassFish.

Anyone know of a tool like this?

Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84

2 Answers2

0

No, there does not appear to be a ready-made tool that does this. You probably will have to do something with Maven Antrun Plugin that executes a script to logon to the Tomcat server (i.e. via ssh) and manipulate the server.xml file directly.

I might use a combination of Ant SCP Task and XML Task

noahlz
  • 10,202
  • 7
  • 56
  • 75
0

If you want to put run-time configuration under version control consider using tools like:

It's possible to use Maven to run your deployments, but you'd be better advised to deploy your application to a Maven repository (like Nexus) and then download from there during deployment. That way you avoid re-compiling your code everytime you want to install your application.

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • Agreed, Maven is a great build tool - not so much for runtime configuration management. BTW another option is PalletOps - http://palletops.com/ – noahlz Oct 08 '12 at 19:26
  • @noahz There are plenty of options. The more I work with deployments the more I think a dedicated solution is required. For an interesting open source tool chain (plus reasons why) I recommend reading the following link: http://dev2ops.org/2012/05/using-rundeck-and-chef-to-build-devops-toolchains-at-chefcon/ – Mark O'Connor Oct 08 '12 at 19:32