|
@@ -39,6 +39,10 @@
|
|
|
<echo>To see list of targets, use ant -p</echo>
|
|
<echo>To see list of targets, use ant -p</echo>
|
|
|
</target>
|
|
</target>
|
|
|
|
|
|
|
|
|
|
+ <target name="skip.ivy" description="Do not check dependencies. (Saves laptop battery)">
|
|
|
|
|
+ <property name="ivy.skip" value="true"/>
|
|
|
|
|
+ </target>
|
|
|
|
|
+
|
|
|
<target name="ivy.install" unless="ivy.installed">
|
|
<target name="ivy.install" unless="ivy.installed">
|
|
|
<mkdir dir="${ant.lib}"/>
|
|
<mkdir dir="${ant.lib}"/>
|
|
|
<get dest="${ivy.jar}"
|
|
<get dest="${ivy.jar}"
|
|
@@ -51,16 +55,19 @@
|
|
|
<ivy:dependencytree />
|
|
<ivy:dependencytree />
|
|
|
</target>
|
|
</target>
|
|
|
|
|
|
|
|
- <target name="ivy.resolve.compile" depends="ivy.install">
|
|
|
|
|
|
|
+ <target name="ivy.resolve.compile" unless="ivy.skip" depends="ivy.install">
|
|
|
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" conf="compile"/>
|
|
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" conf="compile"/>
|
|
|
</target>
|
|
</target>
|
|
|
|
|
|
|
|
- <target name="ivy.resolve.war" depends="ivy.install">
|
|
|
|
|
|
|
+ <target name="ivy.resolve.war" unless="ivy.skip" depends="ivy.install">
|
|
|
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" conf="war"/>
|
|
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" conf="war"/>
|
|
|
</target>
|
|
</target>
|
|
|
|
|
|
|
|
- <target name="ivy.resolve.deploy" depends="ivy.install">
|
|
|
|
|
|
|
+ <target name="ivy.resolve.deploy" unless="ivy.skip" depends="ivy.install">
|
|
|
<ivy:retrieve pattern="${ant.lib}/[artifact].[ext]" conf="deploy"/>
|
|
<ivy:retrieve pattern="${ant.lib}/[artifact].[ext]" conf="deploy"/>
|
|
|
|
|
+ </target>
|
|
|
|
|
+
|
|
|
|
|
+ <target name="deploy.load" depends="ivy.resolve.deploy">
|
|
|
<taskdef resource="org/apache/catalina/ant/antlib.xml" uri="antlib:org.apache.catalina.ant"/>
|
|
<taskdef resource="org/apache/catalina/ant/antlib.xml" uri="antlib:org.apache.catalina.ant"/>
|
|
|
<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" />
|
|
<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" />
|
|
|
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" />
|
|
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" />
|
|
@@ -109,7 +116,7 @@
|
|
|
<ivy:cleancache/>
|
|
<ivy:cleancache/>
|
|
|
</target>
|
|
</target>
|
|
|
|
|
|
|
|
- <target name="deploy" depends="war,ivy.resolve.deploy" description="Deploy to tomcat">
|
|
|
|
|
|
|
+ <target name="deploy" depends="war,deploy.load" description="Deploy to tomcat">
|
|
|
<deploy url="http://localhost:8080/manager/text"
|
|
<deploy url="http://localhost:8080/manager/text"
|
|
|
username="${tomcat.username}"
|
|
username="${tomcat.username}"
|
|
|
password="${tomcat.password}"
|
|
password="${tomcat.password}"
|
|
@@ -118,7 +125,7 @@
|
|
|
war="file:./${build.warfile}" />
|
|
war="file:./${build.warfile}" />
|
|
|
</target>
|
|
</target>
|
|
|
|
|
|
|
|
- <target name="undeploy" depends="ivy.resolve.deploy" description="Undeploy from tomcat">
|
|
|
|
|
|
|
+ <target name="undeploy" depends="deploy.load" description="Undeploy from tomcat">
|
|
|
<undeploy url="http://localhost:8080/manager/text"
|
|
<undeploy url="http://localhost:8080/manager/text"
|
|
|
username="${tomcat.username}"
|
|
username="${tomcat.username}"
|
|
|
password="${tomcat.password}"
|
|
password="${tomcat.password}"
|