Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Using maven style artifacts for deployment with RAF 3.0.0.4

 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,

0 votes



3 answers

Permanent link
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

0 votes

Comments

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
 Hi Gerald, did you find any solution for this problem ??

0 votes


Permanent link
 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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121
× 382

Question asked: Nov 17 '12, 6:11 p.m.

Question was seen: 5,844 times

Last updated: Jan 24 '13, 9:09 a.m.

Confirmation Cancel Confirm