Maven - Separating Deployment & Project Maven - Separating Deployment & Project jenkins jenkins

Maven - Separating Deployment & Project


I think you have to solutions.

  1. Just add the beanstalk-maven-plugin definition to your regular pom.xml. The configuration can be stored in separate properties file or provided via system properties in command line (-D option). Add beanstalk goal to command line of maven in Jenkins. So, each build will be deployed on beanstalk. Alternatively you can define yet another project in Jenkins that just runs the deployment without compilation. You can run this deployment project on scheduled basis or via projects dependencies in Jankins.
  2. Create yet another maven project. It will just run beanstalk plugin. I personally do not see serious advantages to do this.


I think about three things:

a. I'm not sure (I'm admit I was a bit busy trying to come up with 0.2.7-RC7), but I think the Elastic Beanstalk Configuration Files are supported in Java.

So it perhaps could be a good idea to separate (I admit managing config in Beanstalker is Boring)

b. Another option is using war overlays in maven-war-plugin's overlay feature, and create a war which depends on your other war.

In my personal case, if you ask, I do have a separate deployment profile in Maven, and that feature often come in handy