[jboss-svn-commits] JBL Code SVN: r6658 - labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 6 12:46:54 EDT 2006


Author: tfennelly
Date: 2006-10-06 12:46:51 -0400 (Fri, 06 Oct 2006)
New Revision: 6658

Modified:
   labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/loanbroker.properties.template
Log:
Fixes to the loanbroker

Modified: labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml	2006-10-06 16:42:55 UTC (rev 6657)
+++ labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml	2006-10-06 16:46:51 UTC (rev 6658)
@@ -160,7 +160,7 @@
 		<javac srcdir="ant/src" destdir="ant/classes" />
 	</target>
 
-	<target name="configure" depends="compile-antx">
+	<target name="configure" depends="clean,compile-antx">
 		<taskdef name="touri" classname="org.jboss.antx.ToURI" classpath="ant/classes"/>
 		<taskdef name="strreplace" classname="org.jboss.antx.StringReplace" classpath="ant/classes"/>
 
@@ -169,7 +169,30 @@
 		<strreplace string="${cwd.dir.tmp}" find="\" replace="/" property="cwd.dir" />
 
 		<property name="trail.runtime.dir" value="TrailBlazer-rtfiles"/>
+		
+		<available file="config.cache" property="config.cache.available"/>
+		<ant target="check.create.default.config_cache" />
 
+		<ant target="capture.user.input" />
+
+		<mkdir dir="${trail.runtime.dir}"/>
+		<mkdir dir="${trail.runtime.dir}/BankInput/outgoing"/>
+		<mkdir dir="${trail.runtime.dir}/notification_output_files"/>
+		<mkdir dir="${trail.runtime.dir}/outgoing/errorDir"/>
+		<mkdir dir="${trail.runtime.dir}/outgoing/inputDoneDir"/>
+
+		<ant target="deploy"/>
+
+		<echo message="" />
+		<echo message="" />
+		<input message="That's it, the Trailblazer is now configured!  You can reconfigure the Trailblazer at any time by re-running this script. ${line.separator}Press enter to finish..." />
+		<echo message="" />
+		<echo message="" />
+	</target>
+
+	<target name="capture.user.input">
+		<property file="config.cache"/>
+		
 		<echo message="----------------------------------------------------------------------------------------------------------------" />
 		<echo message="|                                                                                                              |" />
 		<echo message="|                  J B O S S    E S B    T R A I L B L A Z E R    C O N F I G U R A T I O N                    |" />
@@ -179,68 +202,76 @@
 		<echo message="" />
 		<input message="This script will help you configure your local project for running the JBoss ESB LoanBroker Trailblazer.  You can reconfigure the Trailblazer at any time by re-running this script. ${line.separator}Press enter to start..." />
 		<echo message="" />
-		<input addproperty="jndi.host" message='Enter the host address of the JBoss Application Server on which your deployed JBoss ESB is running (for "localhost" simply press return):' defaultvalue="localhost" />
+		<input addproperty="jndi.host.frominput" message='Enter the host address of the JBoss Application Server on which your deployed JBoss ESB is running (for "${jndi.host}" simply press return):' defaultvalue="${jndi.host}" />
 		<echo message="" />
-		<input addproperty="jboss.as.installdir" message='Enter the path to the root of your local JBoss Application Server Installation (required for access to JBoss libraries):' />
+		<input addproperty="jboss.as.installdir.frominput" message='Enter the path to the root of your local JBoss Application Server Installation (for "${jboss.as.installdir}" simply press return)(required for access to JBoss libraries):' defaultvalue="${jboss.as.installdir}" />
 		<echo message="" />
 		<echo message="" />
 		<input message="The following questions will configure the email notification parameters required by the Trailblazer.${line.separator}Press enter to continue..." />
 		<echo message="" />
-		<input addproperty="smtp.host" message='Enter the SMTP Host Name (for "localhost" simply press return):' defaultvalue="localhost" />
+		<input addproperty="smtp.host.frominput" message='Enter the SMTP Host Name (for "${smtp.host}" simply press return):' defaultvalue="${smtp.host}" />
 		<echo message="" />
-		<input addproperty="smtp.port" message='Enter the SMTP Host Port (for "25" simply press return):' defaultvalue="25" />
+		<input addproperty="smtp.port.frominput" message='Enter the SMTP Host Port (for "${smtp.port}" simply press return):' defaultvalue="${smtp.port}" />
 		<echo message="" />
-		<input addproperty="smtp.user" message='Enter the SMTP User Name of your user account on "${smtp.host}":' />
+		<input addproperty="smtp.user.frominput" message='Enter the SMTP User Name of your user account on "${smtp.host.frominput}" (for "${smtp.user}" simply press return):' defaultvalue="${smtp.user}" />
 		<echo message="" />
-		<input addproperty="smtp.password" message='Enter the password associated with your SMTP User account "${smtp.user}":'/>
+		<input addproperty="smtp.password.frominput" message='Enter the password associated with your SMTP User account "${smtp.user.frominput}" (for "${smtp.password}" simply press return):' defaultvalue="${smtp.password}" />
 		<echo message="" />
-		<input addproperty="smtp.auth" message='Is authentication of the SMTP User account "${smtp.user}" required by your SMTP host "${smtp.host}":' validargs="true,false" />
+		<input addproperty="smtp.auth.frominput" message='Is authentication of the SMTP User account "${smtp.user.frominput}" required by your SMTP host "${smtp.host.frominput}" (for "${smtp.auth}" simply press return): (true,false)' defaultvalue="${smtp.auth}" />
 		<echo message="" />
-		<input addproperty="smtp.from" message='Enter the "From" address for email notifications from your user account "${smtp.user}" on "${smtp.host}":'/>
-
-		<mkdir dir="${trail.runtime.dir}"/>
-		<mkdir dir="${trail.runtime.dir}/BankInput/outgoing"/>
-		<mkdir dir="${trail.runtime.dir}/notification_output_files"/>
-		<mkdir dir="${trail.runtime.dir}/outgoing/errorDir"/>
-		<mkdir dir="${trail.runtime.dir}/outgoing/inputDoneDir"/>
-
+		<input addproperty="smtp.from.frominput" message='Enter the "From" address for email notifications from your user account "${smtp.user.frominput}" on "${smtp.host.frominput}" (for "${smtp.from}" simply press return):' defaultvalue="${smtp.from}" />
+		
+		<ant target="create.config_cache" />
+		<ant target="filter-files" />
+	</target>
+	
+	<target name="filter-files">
 		<ant target="filter-file">
-			<property name="file" value="loanbroker.properties.template"/>
+			<property name="file" value="loanbroker.properties.template"/>
 			<property name="toFile" value="loanbroker.properties"/>
 		</ant>
 		<ant target="filter-file">
-			<property name="file" value="conf/LoanBrokerConfig.xml.template"/>
+			<property name="file" value="conf/LoanBrokerConfig.xml.template"/>
 			<property name="toFile" value="conf/LoanBrokerConfig.xml"/>
 		</ant>
 		<ant target="filter-file">
-			<property name="file" value="banks/bank.properties.template"/>
+			<property name="file" value="banks/bank.properties.template"/>
 			<property name="toFile" value="banks/bank.properties"/>
 		</ant>
-
-		<echo message="" />
-		<echo message="" />
-		<input message="That's it, the Trailblazer is now configured!  You can reconfigure the Trailblazer at any time by re-running this script. ${line.separator}Press enter to finish..." />
-		<echo message="" />
-		<echo message="" />
-
 	</target>
-
+	
 	<target name="filter-file">
 		<copy file="${file}" tofile="${toFile}" overwrite="true">
-			<filterset>
-				<filter token="cwd.uri" value="${cwd.uri}"/>
-				<filter token="cwd.dir" value="${cwd.dir}"/>
-				<filter token="trail.runtime.dir" value="${trail.runtime.dir}"/>
-				<filter token="jndi.host" value="${jndi.host}"/>
-				<filter token="jboss.as.installdir" value="${jboss.as.installdir}"/>
-				<filter token="smtp.host" value="${smtp.host}"/>
-				<filter token="smtp.port" value="${smtp.port}"/>
-				<filter token="smtp.from" value="${smtp.from}"/>
-				<filter token="smtp.user" value="${smtp.user}"/>
-				<filter token="smtp.password" value="${smtp.password}"/>
-				<filter token="smtp.auth" value="${smtp.auth}"/>
-			</filterset>
+			<filterset filtersfile="config.cache" />
 		</copy>
 	</target>
 
+	<target name="create.config_cache">
+		<delete file="config.cache" />
+		<echo message="cwd.dir=${cwd.dir}${line.separator}" file="config.cache" append="true" />
+		<echo message="trail.runtime.dir=${trail.runtime.dir}${line.separator}" file="config.cache" append="true" />
+		<echo message="jndi.host=${jndi.host.frominput}${line.separator}" file="config.cache" append="true"/>
+		<strreplace string="${jboss.as.installdir.frominput}" find="\" replace="/" property="jboss.as.installdir.fixedup" />
+		<echo message="jboss.as.installdir=${jboss.as.installdir.fixedup}${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.host=${smtp.host.frominput}${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.port=${smtp.port.frominput}${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.from=${smtp.from.frominput}${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.user=${smtp.user.frominput}${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.password=${smtp.password.frominput}${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.auth=${smtp.auth.frominput}${line.separator}" file="config.cache" append="true" />
+	</target>
+
+	<target name="check.create.default.config_cache" unless="config.cache.available">
+		<echo message="cwd.dir=${cwd.dir}${line.separator}" file="config.cache" append="true" />
+		<echo message="trail.runtime.dir=${trail.runtime.dir}${line.separator}" file="config.cache" append="true" />
+		<echo message="jndi.host=localhost${line.separator}" file="config.cache" append="true" />
+		<echo message="jboss.as.installdir=/jboss-4.0.4.GA${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.host=localhost${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.port=25${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.user=${user.name}${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.password=password${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.auth=true${line.separator}" file="config.cache" append="true" />
+		<echo message="smtp.from=${user.name}@localhost${line.separator}" file="config.cache" append="true" />
+	</target>
+	
 </project>

Modified: labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/loanbroker.properties.template
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/loanbroker.properties.template	2006-10-06 16:42:55 UTC (rev 6657)
+++ labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/loanbroker.properties.template	2006-10-06 16:46:51 UTC (rev 6658)
@@ -9,7 +9,7 @@
 # out and are building the LoanBroker from inside the ESB Project
 # Structure.  If you've checked out the LoanBroker seperately, you'll need
 # to modify this property.
-org.jboss.soa.esb.samples.loanbroker.esb_home=../../../
+org.jboss.soa.esb.samples.loanbroker.esb_home=../../
 
 # Is this an ESB build from source, or a distribution?
 org.jboss.soa.esb.buildfrom.distribution=no




More information about the jboss-svn-commits mailing list