Adding dependency jar files, Adding dependency, Files – HP Integrity NonStop H-Series User Manual

Page 420

Advertising
background image

<mkdir dir="${dest.dir.classes}/lib"/>

<antcall target="copy.jars"/>
</target>

<target name="generate.service" depends="prepare">

<copy file="WebContent/META-INF/services.xml" tofile="${dest.dir.classes}/META-INF/services.xml"
overwrite="true" />
<copy file="WebContent/WEB-INF/applicationContext.xml" tofile="${dest.dir.classes}/applicationContext.xml"
overwrite="true" />
<copy file="WebContent/WEB-INF/jdbc.properties" tofile="${dest.dir.classes}/jdbc.properties"
overwrite="true" />

<javac debug="on" srcdir="src" destdir="${dest.dir.classes}"
includes="com/hp/empinfo/domain/**,com/hp/empinfo/service/**">
<classpath refid="build.class.path" />
</javac>

<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/${service-name}.aar" />

</target>

<target name="copy.jars">
<copy todir="${dest.dir.classes}/lib">
<fileset dir="${spring.home}/dist/modules">
<include name="spring-core.jar"/>
<include name="spring-context.jar"/>
<include name="spring-beans.jar"/>
</fileset>
</copy>
</target>
</project>

3.

Edit the

build.xml

file to specify the values of

<Axis2 Home>

and

<Spring Home>

as

shown:

<property name="axis2.home" value="<Axis2 Home>" />
<property name="spring.home" value="<Spring Home>" />

For example, if

<Axis2 Home>

is

C:\axis2-1.4.1 and <Spring Home>

is

C:\spring-framework-2.5.5

, edit the above lines as shown:

<property name="axis2.home" value=" C:\axis2-1.4.1" />
<property name="spring.home" value=" C:\spring-framework-2.5.5 " />

Adding Dependency

JAR

Files

To expose EmpInfo as an Axis2/Java web service, the following

JAR

files, other than the ones

added while developing EmpInfo application, must be added in the EmpInfo project library:

Table 21-1 Dependency

JAR

Files

Source Location

Dependency

JAR

Files

<Axis2 Home>\lib

axiom-api-1.2.7.jar

<Axis2 Home>\lib

axis2-kernel-1.4.1.jar

The EmpInfo application is now modified to integrate Axis2/Java.

Figure 21-2

shows the EmpInfo: Project Explorer View.

420

Integrating Axis2/Java into Spring

Advertising
This manual is related to the following products: