-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b2e734
commit ad7baf1
Showing
1 changed file
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0"?> | ||
<project basedir="." default="all"> | ||
|
||
<property file="build.properties.local" /> | ||
<property file="build.properties" /> | ||
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="${jscompiler}" /> | ||
|
||
<target name="merge"> | ||
<concat destfile="${basedir}/../../build/shapes.js" fixlastline="yes" append="no"> | ||
<fileset dir="${war.dir}/shapes" includes="**/*.js"/> | ||
<fileset dir="${war.dir}/stencils" includes="**/*.js"/> | ||
</concat> | ||
|
||
<java fork="false" classname="Xml2Js" classpath="."> | ||
<arg value="../../src/main/webapp/stencils"/> | ||
<arg value="../../src/main/webapp/js/stencils.min.js"/> | ||
</java> | ||
|
||
<jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${war.dir}/js/shapes-14-6-5.min.js"> | ||
<sources dir="${basedir}/../../build"> | ||
<file name="shapes.js" /> | ||
</sources> | ||
</jscomp> | ||
|
||
<tstamp> | ||
<format property="time.stamp" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/> | ||
</tstamp> | ||
|
||
<delete dir="${basedir}/../../build"/> | ||
</target> | ||
|
||
<target name="app" depends="merge"> | ||
</target> | ||
|
||
<target name="atlas" depends="app"> | ||
<concat destfile="${war.dir}/js/atlas-viewer.min.js" fixlastline="yes" append="no"> | ||
<file name="${basedir}/base-viewer.min.js" /> | ||
<file name="${war.dir}/js/orgchart.min.js" /> | ||
</concat> | ||
|
||
<jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp0.js"> | ||
<sources dir="${war.dir}/connect/common/js"> | ||
<file name="mxReader.js" /> | ||
</sources> | ||
</jscomp> | ||
|
||
<concat destfile="${war.dir}/js/atlas.min.js" fixlastline="yes" append="no"> | ||
<file name="${basedir}/base.min.js" /> | ||
<file name="${war.dir}/js/extensions.min.js" /> | ||
<file name="${basedir}/.tmp0.js" /> | ||
</concat> | ||
|
||
<delete file="${basedir}/.tmp0.js"/> | ||
</target> | ||
|
||
<target name="integrate" depends="atlas"> | ||
<copy file="${war.dir}/js/atlas.min.js" tofile="${war.dir}/js/integrate.min.js" overwrite="true"/> | ||
|
||
<jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp0.js"> | ||
<sources dir="${basedir}/../integrate"> | ||
<file name="Integrate.js" /> | ||
</sources> | ||
</jscomp> | ||
|
||
<concat destfile="${war.dir}/js/integrate.min.js" fixlastline="yes" append="yes"> | ||
<file name="${war.dir}/js/shapes-14-6-5.min.js" /> | ||
<file name="${war.dir}/js/stencils.min.js" /> | ||
<file name="${basedir}/.tmp0.js" /> | ||
</concat> | ||
|
||
<delete file="${basedir}/.tmp0.js"/> | ||
</target> | ||
|
||
<target name="all" depends="integrate"> | ||
<delete file="${war.dir}/js/atlas-viewer.min.js"/> | ||
<delete file="${war.dir}/js/atlas.min.js"/> | ||
</target> | ||
|
||
<!-- ================== Stand-alone war creation ============================= --> | ||
|
||
<path id="javac.class.path"> | ||
<fileset dir="${war.dir}/WEB-INF/lib" /> | ||
</path> | ||
|
||
<target name="javac" description="Java compilation"> | ||
<mkdir dir="${javac.dir}"/> | ||
<javac includeantruntime="false" srcdir="${src.dir}" destdir="${javac.dir}"> | ||
<classpath refid="javac.class.path" /> | ||
</javac> | ||
<copy todir="${javac.dir}" file="${src.dir}/log4j.properties" /> | ||
</target> | ||
|
||
<target name="clean" description="Cleans build directories"> | ||
<delete dir="${javac.dir}"/> | ||
<delete dir="${build.dir}"/> | ||
<delete file="${basedir}/base.min.js"/> | ||
<delete file="${basedir}/base-viewer.min.js"/> | ||
</target> | ||
|
||
<target name="war" depends="app, javac" description="Create the stand-alone war file"> | ||
<zip destfile="${build.dir}/${war.name}" basedir="${war.dir}" > | ||
</zip> | ||
</target> | ||
|
||
</project> |