Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="GPClient" default="dist" basedir="./../GrahamsProjClient">
- <description>
- simple example build file
- </description>
- <!-- set global properties for this build -->
- <property name="client.src" location="${basedir}/src"/>
- <property name="client.build" location="${basedir}/build"/>
- <property name="client.dist" location="${basedir}/dist"/>
- <property name="client.done" location="${basedir}/done"/>
- <property name="client.app" location="${basedir}/app"/>
- <property name="client.webinf_classes" location="${basedir}/WEB-INF/classes"/>
- <property name="server.dir" location="${basedir}/../GrahamsProjServer"/>
- <property name="deploy.location" location="${basedir}/../../jboss-as-7.1.1.Final/standalone/deployments"/>
- <path id="lib.class.path">
- <fileset dir="${basedir}">
- <include name="/lib/*.jar"/>
- <!-- <exclude name="jboss-servlet-api_3.0_spec-1.0.0.Final.jar" /> -->
- </fileset>
- <!-- <fileset dir="${basedir}/properties">
- <include name="*.properties"/>
- </fileset>
- <fileset dir="${server.dir}/dist">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${basedir}/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset> -->
- </path>
- <pathconvert property="lib.classpath" pathsep=" ">
- <path refid="lib.class.path"/>
- <mapper>
- <chainedmapper>
- <flattenmapper/>
- <globmapper from="*.jar" to="lib/*.jar"/>
- </chainedmapper>
- </mapper>
- </pathconvert>
- <path id="server.class.path">
- <fileset dir="${server.dir}/dist">
- <include name="*.jar"/>
- </fileset>
- </path>
- <pathconvert property="server.classpath" pathsep=" ">
- <path refid="server.class.path"/>
- <mapper>
- <chainedmapper>
- <flattenmapper/>
- <globmapper from="*.jar" to="../../../GrahamsProjServer/*.jar"/>
- </chainedmapper>
- </mapper>
- </pathconvert>
- <path id="mf.classpath">
- <path refid="${lib.classpath}"/>
- <path refid="${server.classpath}"/>
- </path>
- <path id="war.class.path">
- <fileset dir="${basedir}/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
- <target name="client.init">
- <!-- Create the time stamp -->
- <tstamp/>
- <!-- Create the build directory structure used by compile -->
- <mkdir dir="${client.build}"/>
- <mkdir dir="${client.dist}"/>
- <mkdir dir="${client.done}"/>
- <mkdir dir="${client.app}"/>
- <mkdir dir="${client.webinf_classes}"/>
- <mkdir dir="${client.webinf_classes}/grahamsprojclient/servlet"/>
- </target>
- <target name="client.compile" depends="client.init"
- description="compile the source " >
- <!-- Compile the java code from ${src} into ${dist} -->
- <javac srcdir="${client.src}" destdir="${client.dist}" failonerror="false">
- <classpath>
- <path refid="lib.class.path"/>
- </classpath>
- </javac>
- </target>
- <target name="client.package" depends="client.compile" description="create the jar">
- <!-- <manifestclasspath property="manifest.path" jarfile="${dist}/GrahamsProjClient.jar">
- <classpath refid="mf.classpath"/>
- </manifestclasspath> -->
- <jar destfile="${client.app}/GrahamsProjClient.jar" basedir="${client.dist}" failonerror="false">
- <fileset dir="${basedir}/properties">
- <include name="*.properties"/>
- </fileset>
- <fileset dir="${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="${mf.classpath}"/>
- <attribute name="Main-Class" value="grahamsprojclient.main.Start"/>
- </manifest>
- </jar>
- </target>
- <!--<target name="deploy" depends="package"
- description="generate the distribution" >
- <ear destfile="${deploy.location}/GrahamsProjServer.ear" appxml="${basedir}/META-INF/application.xml" >
- <metainf dir="${basedir}/META-INF"/>
- <fileset dir="${dist}" includes="*.jar"/>
- </ear>
- </target> -->
- <target name="client.clean"
- description="clean up" >
- <!-- Delete the ${build} and ${dist} directory trees -->
- <delete dir="${client.build}"/>
- <delete dir="${client.dist}"/>
- <delete dir="${client.app}"/>
- <delete dir="${client.done}"/>
- <delete dir="${client.webinf_classes}"/>
- <echo message="Deleting files in ${deploy.location}"/>
- <delete>
- <fileset dir="${deploy.location}" >
- <exclude name="*.txt" />
- </fileset>
- </delete>
- </target>
- <target name="client.compile-war-lib">
- <mkdir dir="WEB-INF/classes"/>
- <javac srcdir="${client.src}" destdir="WEB-INF/classes" debug="true" includeAntRuntime="false">
- <classpath refid="war.class.path"/>
- <include name="**/*.java"/>
- </javac>
- </target>
- <target name="client.compile-war" depends="client.init" description="compile the source " >
- <!-- Compile the java code from ${src} into ${dist} -->
- <javac srcdir="${basedir}/src/grahamsprojclient/servlet"
- destdir="${basedir}/WEB-INF/classes/grahamsprojclient/servlet" >
- <classpath>
- <path refid="war.class.path"/>
- </classpath>
- </javac>
- </target>
- <target name="client.build_war" depends="client.package, client.compile-war" description="build war" >
- <war destfile="${client.done}/GrahamsProjClient.war" webxml="WEB-INF/web.xml">
- <metainf dir="${basedir}/META-INF" includes="context.xml" />
- <lib dir="${basedir}/WEB-INF/lib">
- <exclude name="/CopyLibs"/>
- <exclude name="*.ex" />
- </lib>
- <classes dir="${basedir}/WEB-INF/classes/grahamsprojclient/servlet" >
- <exclude name="*.java" />
- </classes>
- <fileset dir="${basedir}" >
- <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>
- <target name="client.deploy_war" depends="client.build_war" description="deploy war">
- <copy file="${client.done}/GrahamsProjClient.war" todir="${deploy.location}" />
- </target>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement