Originally from ticket #849.
Hello,
Can you please suggest and provide the syntax for adding libraries, jars while building the ear?
Thanks and Regards,
Satish
Hi Satish,
Try something along the lines of the following
<property name="foo.jar" location="build/foo.jar" />
<property name="bar.projlib" location="lib/bar-1.2.5.projlib" />
<propertyset id="MyAliases">
<propertyref name="foo.jar" />
<propertyref name="bar.projlib" />
</propertyset>
<tibant:build-ear dir="src/bw"
project="example"
ear="/Build/example"
aliases-refid="MyAliases"
out="build/example-${example.version}.ear"
create-dtl-file="true" />Hello,
I am unable to add jars to the EAR. I have made the changes to the build.xml as suggested by Tom. I have attached the build.xml. Please suggest the corrections.
Thanks and Regards,
Satish Bijinapally
Hi Satish,
The above approach adds the jar files (and design time libraries) to your file aliases, so that the buildear utility can find them. To actually embed the jar files in the EAR that is created, you'll need to include the jar in an `Alias Library`, make sure the `Deploy?` option is checked and make sure the Alias library is included in the `Shared Archive` resources.
Kind regards,
Tom Howard