Deployment and Versioning Best Practices
First a little background, then several questions below. I am a recent convert from the .NET world, so I am still picking up on AEM, Java, Maven, etc. We are using 6.3 and created our project solution using archetype 12. Most development is happening on local workstations between AEM and Eclipse. The source is being stored in a GitHub repo. We have Jenkins set up in our development environment which nightly builds and deploys the solution to our test AEM environment. The stage and production environments sit in a different lab environment that we can not connect into remotely.
1. Right now when we want to deploy a release to the stage environment we send the latest core JAR as well as the latest ui.app zip and ui.content zip. The team installs the jar in both author and publish using the web console and then uploads/installs the two zips through the crx package manager on author and replicates them to publish.
a. Is this the right way to deploy these builds to a separate environment? It seems like there should be an easier way, but maybe this is correct. I noticed that the ui.content zip contains a reference to the jar as if it would install that when uploaded/installed through package manager, but when I tested that theory it did not update the pre-existing JAR with the new version. This could be because of the SNAPSHOT versioning we are using (discussed below), not sure.
b. Is there a way to deploy everything in one package? If I could get the zip to install the jar is there a way to get it to install the ui.apps zip too or would I need to change the organization of the solution somehow?
c. Is manually installing these the right way they should go about it or is there a better alternative though scripting?
2. Along the way developing we discovered the jars were not being updated during deployments. After doing some reading we changed all the versions to include -SNAPSHOT in the pom files and this fixed that issue. However, not having versions in stage/prod of the packages seems wrong.
a. Whats the best way to handle development vs stage/prod systems? Should Jenkins be changing the versions or is it typically done manually when you want to deploy a good build and then re-built?
b. If/When you change the version does it require udpates to all the POM files? I noticed some reference others by version number.
c. Is there a script or something in Maven that can update the version that I am un-aware of?
Thanks,
Doug
