views:

12

answers:

1

I have a war attached to an ear in RAD. I'm using Ivy to manage my project dependencies. My only problem is that when I deploy the ear to my dev instance of WAS through RAD, the deployment doesn't see any dependent libraries from ivy. How can I configure the project so that the ivy dependencies show up when the project is deployed to websphere?

A: 

Ivy is used when building the WAR and EAR files.

For example:

<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]"/>

<war destfile="${war.file}" webxml="${resources.dir}/web.xml">
    <fileset dir="${resources.dir}" excludes="web.xml"/>
    <lib dir="${lib.dir}"/>
</war>

The retrieve command is used to populate a lib directory whose contents are copied into the WAR. (The lib tag ensures the jars are placed under WEB-INF/lib within the WAR)

Update

The ivy retrieve task can be run from the command line, if you just want to download dependencies to a local directory:

java -jar ivy.jar -ivy ivy.xml -retrieve "lib/[artifact].[ext]"
Mark O'Connor
I'm looking for a solution that doesn't require the use of ANT to create a war, because I'm not building the application yet at this step. I'm still developing the application and want the WAS in my RAD environment to pick up the ivy runtime, the way that RAD does with IvyDE
jrizza
You can run ivy from the command line without ANT. I'll update my article
Mark O'Connor