Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <project name="GrahamsProj1.0" basedir="." default="package">
- <description>Grahams Project Build Script</description>
- <property name="my_basedir" location="."/>
- <property name="final.build.dir" location="./build"/>
- <property name="final.dist.dir" location="./dist"/>
- <property name="client.basedir" location="./../GrahamsProjClient"/>
- <property name="server.basedir" location="./../GrahamsProjServer"/>
- <target name="final.init">
- <mkdir dir="${final.build.dir}"/>
- <mkdir dir="${final.dist.dir}"/>
- </target>
- <!-- ============================================= -->
- <!-- Import Server/Client Build Files -->
- <!-- ============================================= -->
- <import file="${client.basedir}/build-client.xml"/>
- <import file="${server.basedir}/build-server.xml"/>
- <!-- ============================================= -->
- <!-- Housekeeping Targets -->
- <!-- ============================================= -->
- <!-- <target name="-update-build-info" depends="PWClient.-update-client-build-info" /> -->
- <!-- <target name="-prepare" depends="-dependencies,PWServer.-prepare,PWClient.-prepare" /> -->
- <!-- ============================================= -->
- <!-- Create Server Application -->
- <!-- ============================================= -->
- <property name="my_basedir" location="${server.basedir}"/>
- <target name="prepare_server" depends="server.app_package" description="Creates server and moves it to the correct directory.">
- <copy file="${server.dist}/GrahamsProjServer.ear" todir="${final.build.dir}" />
- </target>
- <property name="my_basedir" location="."/>
- <!-- ============================================= -->
- <!-- Create Client Application -->
- <!-- ============================================= -->
- <property name="my_basedir" location="${client.basedir}"/>
- <path id="client.lib.class.path">
- <fileset dir="${client.basedir}">
- <include name="/lib/*.jar"/>
- <!-- <exclude name="jboss-servlet-api_3.0_spec-1.0.0.Final.jar" /> -->
- </fileset>
- </path>
- <pathconvert property="client.lib.classpath" pathsep=" ">
- <path refid="client.lib.class.path"/>
- <mapper>
- <chainedmapper>
- <flattenmapper/>
- <globmapper from="*.jar" to="lib/*.jar"/>
- </chainedmapper>
- </mapper>
- </pathconvert>
- <path id="client.server.classpath">
- <fileset dir="${final.build.dir}">
- <include name="GrahamsProjServer/GrahamsProjServer.jar"/>
- </fileset>
- </path>
- <path id="client.mf.classpath">
- <path refid="${client.lib.classpath}"/>
- <path refid="${client.server.classpath}"/>
- </path>
- <target name="prepare_client" depends="prepare_server" description="Creates client and moves it to the correct directory.">
- <jar destfile="${client.app}/GrahamsProjClient.jar" basedir="${client.dist}">
- <fileset dir="${client.basedir}/properties">
- <include name="*.properties"/>
- </fileset>
- <fileset dir="${client.basedir}">
- <include name="lib/*.jar"/>
- <!-- <exclude name="lib/jboss-servlet-api_3.0_spec-1.0.0.Final.jar" />-->
- </fileset>
- <manifest>
- <attribute name="Class-Path" value="${client.mf.classpath}"/>
- <attribute name="Main-Class" value="grahamsprojclient.main.Start"/>
- </manifest>
- </jar>
- <javac srcdir="${client.basedir}/src/grahamsprojclient/servlet"
- destdir="${client.basedir}/WEB-INF/classes/grahamsprojclient/servlet" >
- <classpath>
- <path refid="war.class.path"/>
- </classpath>
- </javac>
- <war destfile="${final.build.dir}/GrahamsProjClient.war" webxml="${client.basedir}/WEB-INF/web.xml">
- <metainf dir="${client.basedir}/META-INF" includes="context.xml" />
- <lib dir="${client.basedir}/WEB-INF/lib">
- <exclude name="/CopyLibs"/>
- <exclude name="*.ex" />
- </lib>
- <classes dir="${client.basedir}/WEB-INF/classes/grahamsprojclient/servlet" >
- <exclude name="*.java" />
- </classes>
- <fileset dir="${clientbasedir}" >
- <include name="GrahamsProjClient-webstart.jnlp"/>
- <include name="app/GrahamsProjClient.jar"/>
- <include name="GrahamsProjStartAppPage.html"/>
- <!-- <include name="lib/*.jar"/>
- <include name="lib/jboss-servlet-api_3.0_spec-1.0.0.Final.jar"/> -->
- </fileset>
- </war>
- </target>
- <property name="my_basedir" location="."/>
- <!-- ============================================= -->
- <!-- Package Application -->
- <!-- ============================================= -->
- <target name="full_package" description="Package Grahams Project as a single deployable file.">
- <mkdir dir="${basedir}/dist" />
- <jar jarfile="${basedir}/dist/GrahamsProj-app.ear">
- <metainf dir="${basedir}/META-INF">
- <include name="application.xml"/>
- </metainf>
- <fileset file="${basedir}/../GrahamsProjServer/dist/GrahamsProjServer.ear" />
- <fileset file="${basedir}/../GrahamsProjClient/done/GrahamsProjClient.war" />
- </jar>
- </target>
- <!-- ============================================= -->
- <!-- Deployment Targets -->
- <!-- ============================================= -->
- <target name="full_deploy" depends="full_package" description="Deploy PROPworks to the provided JBoss deploy directory.">
- <copy file="${basedir}/dist/GrahamsProj-app.ear" todir="${deploy.location}" />
- </target>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement