It's all about the answers!

Ask a question

Using maven style artifacts for deployment with RAF 3.0.0.4


Gerald Gordon (7011419) | asked Nov 17 '12, 6:11 p.m.
edited Nov 17 '12, 6:11 p.m.
 Friends,

I'm trying to accomplish automated deployments of maven artifacts using RAF.

We have three ways to access maven artifacts for deployment in our environment.
  1. Manually upload of the artifact named <component>1.2.3.4.ear/.war/.jar
  2. Use wget to download the file from a maven repository.
  3. Push the maven artifact to RAM and use RAM api to download the artifact as a step in RAF.
Here is my problem.  Most of my developers create maven style application files for deployment such as component>-1-2-3.ear/.war file.  I think there should be a better way for me to deploy this application without having to update the 1-2-3 portion /apps/properties/<component>-1-2-3.properties or /apps/media/<component>-1-2-3.ear/.war application file every time I need to deploy a new version of the application file using a RAF job on an imported environment.

How can I create a template with these requests to deploy war files that generally have the same prefix but different suffixes for file names?  Using RAF I would like a good way to back up the existing war/ear files before deployment of a new application file.

Process I know today:
1. Generate Env using RAF tool.
2. Use RAF eclipse client to import exiting application file from Portal/WAS environment.
3. Update /apps/media and /apps/properties with the appropriate information for each application file <component>1-2-3.properties and corresponding <component>1-2-3.ear/.war.
4. Run execute from RAF eclipse client once.  Then I can run this job from RAF web ui as needed.

I'm trying to avoid creating a script to build a .properties file for every application file that has a different suffix (1-2-3.ear/.war) when I need to deploy an application.

Please let me know if we have a solution to this already.  Is there some sort of Pre/Suffix parameters that RAF 3.0.0.4 understands, in order for me to deploy subsequent maven style app files?

Thanks,

3 answers



permanent link
Bruce Albrecht (6624) | answered Nov 20 '12, 8:26 p.m.
If you are building these artifacts with maven and uploading them to a maven repository, you could use the maven-dependency-plugin to copy them and strip the version.  We don't deploy using RAF, so I can't help you specifically with that, but when we package up our artifacts, we do something like:

if <maven version is snapshot> or <release version not yet built>
mvn install          # build & test artifacts and upload to repository

mvn -Dmdep.stripVersion=true -Dpkg_stg_dir=$pkg_dir -DoutputDirectory=$pkg_dir dependency:copy

Comments
Gerald Gordon commented Nov 20 '12, 9:55 p.m.

Thanks Bruce but my team will be using RAF for large scale deployments to Many complex Prod Envs so we were looking for a solution with RAF.  Having said this, I like the flexibility built into maven to remove the version identifier, this is a neat idea but we also rely on the artifacts version numbers as an added check or audit that the correct code has been deployed to the portal server so we want to keep the artifact numbers in tact. But you did spark an idea, maybe I can deploy using raf by renaming the file prior to deployment to make it fit the template and then rename the artifact filename version number after the installation process has been completed but before we start up the applications.  


permanent link
Ketil Flataker (1) | answered Jan 24 '13, 7:23 a.m.
 Hi Gerald, did you find any solution for this problem ??

permanent link
Gerald Gordon (7011419) | answered Jan 24 '13, 9:09 a.m.
 Hi Ketil,

I built a program on top of the RAF tool that dynamically creates the properties files needed to support maven style artifacts   This ended up being a better solution because we have many different cluster and single node configurations that vary based on the application being deployed.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.