[weld-commits] Weld SVN: r5256 - examples/trunk.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Dec 9 15:15:11 EST 2009


Author: sboscarine
Date: 2009-12-09 15:15:11 -0500 (Wed, 09 Dec 2009)
New Revision: 5256

Modified:
   examples/trunk/build.xml
Log:
updated to use JBOSS_HOME or CATALINA_HOME



Modified: examples/trunk/build.xml
===================================================================
--- examples/trunk/build.xml	2009-12-09 18:52:30 UTC (rev 5255)
+++ examples/trunk/build.xml	2009-12-09 20:15:11 UTC (rev 5256)
@@ -1,12 +1,21 @@
 <project basedir="." name="example.build.script" default="restart">
-
+	<!--
+		Running this build requires that you set JBOSS_HOME to run on JBoss 6 
+		or CATALINA_HOME to run on Tomcat 6 as an environment variable in your OS.
+	-->
 	<dirname property="wbexamples.dir" file="${ant.file.example.build.script}" />
 
 	<property name="maven.dir" location="${wbexamples.dir}/lib/maven" />
 
+	<!-- preserve local build.properties if they're still being used -->
 	<property file="${wbexamples.dir}/../jboss-as/local.build.properties" />
-	<property file="${wbexamples.dir}/local.build.properties" />
-	<property file="${wbexamples.dir}/build.properties" />
+	<property file="${wbexamples.dir}/local.build.properties" />	 
+	
+	<!-- Use CATALINA_HOME or JBOSS_HOME from OS if no local values are set -->
+	<property environment="env"/><!-- assign OS environment variables to an object visible to ANT -->
+	<property name="jboss.home" value="${env.JBOSS_HOME}" /> 
+	<property name="tomcat.home" value="${env.CATALINA_HOME}" />
+	
 	<property file="${wbexamples.dir}/../jboss-as/build.properties" />
 
 	<property name="final.url" value="http://localhost:8080/${example.name}" />
@@ -37,17 +46,17 @@
 		</maven>
 	</target>
 
-   <target name="clean">
-      <maven target="clean" basedir="${basedir}">
-         <arg line="-f ${pom.file}" />
-      </maven>
-   </target>
+	<target name="clean">
+		<maven target="clean" basedir="${basedir}">
+			<arg line="-f ${pom.file}" />
+		</maven>
+	</target>
 
-    <target name="tomcat.package">
-        <maven target="install" basedir="${basedir}">
-           <arg line="-f ${pom.file} -Ptomcat" />
-        </maven>
-    </target>
+	<target name="tomcat.package">
+		<maven target="install" basedir="${basedir}">
+			<arg line="-f ${pom.file} -Ptomcat" />
+		</maven>
+	</target>
 
 	<target name="explode" depends="package">
 		<mkdir dir="${jboss.home}/server/default/deploy/${example.name}.${type}" />
@@ -87,6 +96,7 @@
 
 	<target name="restart" depends="restart.war, restart.ear">
 		<echo message="The app can be accessed at ${final.url}" />
+		<echo message="The app can be accessed at ${jboss.home}" />
 	</target>
 
 	<target name="undeploy">



More information about the weld-commits mailing list