Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ajdt-dev] Using Ant

Hi Vinodh,

 

I don’t see how you are actually compiling the source files in this ant script. I.e., you probably want to use the iajc ant to compile the MYEJB.jar.

 

In past when I’ve build WebSphere EJB’s using the AspectJ compiler, I compiled them with the iajc ant task, then used the jar task to build a jar from them, then used a jar task to package the jars into ear, and then used ejbdeploy to add stubs & skeletons to this built ear.

 

 


From: ajdt-dev-bounces@xxxxxxxxxxx [mailto:ajdt-dev-bounces@xxxxxxxxxxx] On Behalf Of vinodh.t.subbiah@xxxxxxxxxxxx
Sent: Thursday, April 13, 2006 10:26 AM
To: ajdt-dev@xxxxxxxxxxx
Subject: [ajdt-dev] Using Ant

 


Hi All,
 Can anyone help me with ant task for AspectJ1.5 version.Also how do I compile my EJB?
I have the following target defined for compiling my EJBs.But If i have to compile using AspectJ compiler then how to change it?
Though the target is for Windows/Linux currently I like to try in Windows only.
Code :

        <!--                                                   -->
        <!-- Compile the EJBs                                  -->
        <!--                                                   -->
        <!--                                                   -->
        <target name="ejbCompile" description="Compile the EJBs">
                <mkdir dir="${temp.dir}"/>
                <pathconvert targetos="windows" property="libPath.windows" refid="libEJBPath"/>
                <pathconvert targetos="unix" property="libPath.linux" refid="libEJBPath"/>
                <property name="libPath.windows.quotes" value="&quot;${libPath.windows}&quot;"/>
                <property name="libPath.linux.quotes" value="&quot;${libPath.linux}&quot;"/>
                <!--echo message="-cp ${libPath.windows.quotes}"/-->
                <exec dir="${basedir}" executable="C:\WebSphere5\AppServer\bin/ejbdeploy.bat" os="Windows XP, Windows 2000">
                        <arg value="${dist.dir}/lib/MYEJB.jar"/>
                        <arg value="${temp.dir}"/>
                        <arg value="${dist.dir}/lib/MYEJBClient.jar"/>
                        <arg value="-cp"/>
                        <arg path="${libPath.windows.quotes}"/>
                </exec>
                <exec dir="${basedir}" executable="/opt/WebSphere5/AppServer/bin/ejbdeploy.sh" os="Linux">
                        <arg value="${dist.dir}/lib/MYEJB.jar"/>
                        <arg value="${temp.dir}"/>
                        <arg value="${dist.dir}/lib/MYEJBClient.jar"/>
                        <arg value="-cp"/>
                        <arg path="${libPath.linux.quotes}"/>
                </exec>
                <!-- Replace the MYEJB.jar with the compiled one -->
                <copy tofile="${dist.dir}/lib/MYEJB.jar" file="${dist.dir}/lib/MYEJBClient.jar" overwrite="true"/>
                <!-- delete the client jar, recreate it from the MYEJB.jar, dropping the MANIFEST.MF file -->
                <delete file="${dist.dir}/lib/MYEJBClient.jar"/>
                <zip destfile="${dist.dir}/lib/MYEJBClient.jar">
                        <zipfileset src="">"${dist.dir}/lib/MYEJB.jar">
                                <exclude name="**/MANIFEST.MF"/>
                        </zipfileset>
                </zip>
        </target>


For Web Interface
<target name="compileMYWeb" depends="init">
                <javac encoding="ISO-8859-1" debug="on" destdir="${MYWeb.build.dir}" nowarn="${build.compiler.nowarn}" deprecation="${build.compiler.deprecation}">
                        <src path="${MYWeb}"/>
                        <exclude name="**/UnitTest*.java"/>
                        <classpath refid="libPath"/>
                </javac>
                <copy todir="${MYWeb.build.dir}">
                        <fileset dir="${MYWeb}/src">
                                <include name="**/*.properties"/>
                        </fileset>
                </copy>
</target>

Vinodh Subbiah

Retail Shared Infrastructure Team

JPM

614 213 1574 (W)

602 403 8451(M)

vinodhts@xxxxxxxxx

 

 

 

 


Back to the top