2 Star 0 Fork 0

wangwinterice / cttic_oa

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
build.xml 4.68 KB
Copy Edit Web IDE Raw Blame History
3409906634@qq.com authored 2017-04-25 11:17 . 新增jar包
<?xml version="1.0" encoding="GBK"?>
<project name="cttic_oa" default="delete" basedir=".">
<property name="src.dir" value="./src" />
<property name="jsp.dir" value="./WebContent" />
<property name="target.dir" value="./build" />
<property name="lib.dir" value="./WebContent/WEB-INF/lib" />
<property name="app_version" value="0.1" />
<property name="app_name" value="cttic" />
<property name="app_company" value="CTTIC Ltd" />
<!--temp dirs-->
<property name="target.classes.dir" value="${target.dir}/temp.classes" />
<property name="target.web.dir" value="${target.dir}/temp.web" />
<property name="target.release.dir" value="${target.dir}/release" />
<!--build date-->
<tstamp>
<format property="day" pattern="yyyyMMdd" />
<format property="time" pattern="HHmmss" />
<format property="dt" pattern="yyyyMMddHHmmssSSS" />
</tstamp>
<property name="releaseVersion" value="V${app_version}built${day}" />
<!--classpath-->
<path id="project.class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<!-- clean the release target dir -->
<target name="clean" description="removes build artifacts">
<echo message="begin clean the release target dir..." />
<mkdir dir="${target.dir}" />
<delete includeemptydirs="true">
<fileset dir="${target.dir}">
<include name="**/*" />
</fileset>
</delete>
<echo message="end clean the release target dir..." />
</target>
<!--mk dir-->
<target name="mkdirs" depends="clean">
<echo message="begin create temp dirs" />
<mkdir dir="${target.dir}" />
<mkdir dir="${target.classes.dir}" />
<mkdir dir="${target.web.dir}" />
<mkdir dir="${target.release.dir}" />
<echo message="end create temp dirs" />
</target>
<!--compile all the java sources
<target name="javac" depends="mkdirs">
<echo message="compile all the java sources..." />
<javac srcdir="${src.dir}" destdir="${target.classes.dir}" source="1.7" target="1.7" debug="true" nowarn="yes" fork="true" memoryMaximumSize="1024m" encoding="UTF-8" includeantruntime="no">
<classpath refid="project.class.path" />
</javac>
<echo message="compiled successful..." />
</target>
-->
<!--package core jar
<target name="package core jar" depends="javac">
<echo message="begin package core jar.." />
<jar destfile="${target.release.dir}/${app_name}-${releaseVersion}-core.jar" basedir="${target.classes.dir}">
<manifest>
<attribute name="Built-By" value="CTTIC Ltd" />
<section name="${app_name}">
<attribute name="Specification-Title" value="${app_name}" />
<attribute name="Specification-Version" value="${app_version}" />
<attribute name="Specification-Vendor" value="${app_company}" />
<attribute name="Specification-Date" value="${dt}" />
<attribute name="Implementation-Title" value="${app_name}" />
<attribute name="Implementation-Version" value="${app_version}" />
<attribute name="Implementation-Vendor" value="${app_company}" />
</section>
</manifest >
</jar>
<echo message="end package core jar.." />
</target>
-->
<!--copy project html dir to web dir-->
<target name="copy html" depends="mkdirs">
<echo message="start copy html to web..." />
<copy todir="${target.web.dir}">
<fileset dir="${jsp.dir}">
</fileset>
</copy>
<copy todir="${target.web.dir}/WEB-INF/lib">
<fileset dir="${target.release.dir}">
</fileset>
</copy>
<echo message="end copy html to web..." />
</target>
<!--package war-->
<target name="package war" depends="copy html">
<echo message="start packaging ${app_name}.war..." />
<jar jarfile="${target.dir}/${app_name}.war">
<manifest>
<attribute name="Built-By" value="CTTIC Ltd" />
<section name="${app_name}">
<attribute name="Specification-Title" value="${app_name}" />
<attribute name="Specification-Version" value="${app_version}" />
<attribute name="Specification-Vendor" value="${app_company}" />
<attribute name="Specification-Date" value="${dt}" />
<attribute name="Implementation-Title" value="${app_name}" />
<attribute name="Implementation-Version" value="${app_version}" />
<attribute name="Implementation-Vendor" value="${app_company}" />
</section >
</manifest >
<fileset dir="${target.web.dir}">
<include name="**/*" />
</fileset>
</jar>
<echo message="end packaged ${app_name}.war..." />
</target>
<!-- clean the release target dir -->
<target name="delete" depends="package war">
<echo message="begin delete the release target dir..." />
<mkdir dir="${target.dir}" />
<delete includeemptydirs="true">
<fileset dir="${target.dir}">
<exclude name="*.war" />
</fileset>
</delete>
<echo message="end delete the release target dir..." />
</target>
</project>

Comment ( 0 )

Sign in for post a comment

Java
1
https://gitee.com/wangwinterice/cttic_oa.git
git@gitee.com:wangwinterice/cttic_oa.git
wangwinterice
cttic_oa
cttic_oa
master

Search