<fail if="test.failed"> Unit tests failed. For error messages, check the log files in ${test.dir}/data or run "ant test-reports" to generate reports at ${test.dir}/reports.</fail> </target>
<target name="test-web" depends="compile" description="Runs jWebUnit tests in a running server"> <property name="testcase" value="WebTest"/> <antcall target="test"/> </target>
<target name="deploywar" depends="war" description="Deploy application as a WAR file"> <copy todir="${deploy.dir}" preservelastmodified="true" file="${dist.dir}/${webapp.name}.war"/> </target>
INSERT INTO app_user (id, first_name, last_name) values (5, 'Julie', 'Raible'); INSERT INTO app_user (id, first_name, last_name) values (6, 'Abbie', 'Raible');
</sql> </target>
<!-- Create a new project using this one as a template --> <target name="new" depends="clean" description="creates a new project with the specified name"> <fail unless="app.name">Please specify an app.name using -Dapp.name=NAME</fail> <echo level="info">Creating new application named '${app.name}'...</echo> <copy todir="../${app.name}"> <fileset dir="${basedir}"> <exclude name="${dist.dir}/**"/> <exclude name="db/**"/> <exclude name="sandbox/**"/> <exclude name="${webapp.name}*"/> <exclude name="*.log"/> <exclude name=".#**"/> <exclude name="*.sh"/> <exclude name="www/**"/> <include name="**"/> </fileset> </copy>
<!-- Replace current app.name with new app.name --> <replaceregexp flags="g"> <regexp pattern="equinox-struts"/> <substitution expression="${app.name}"/> <fileset dir="../${app.name}"> <include name="build.xml"/> <include name="extras/maven/project.xml"/> <include name=".project"/> <include name="**/*WebTest.java"/> </fileset> </replaceregexp>