You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2006/11/21 16:51:19 UTC
svn commit: r477710 - in /incubator/roller/trunk: ant.properties build.xml
custom/custom-ant.xmlf
Author: snoopdave
Date: Tue Nov 21 07:51:18 2006
New Revision: 477710
URL: http://svn.apache.org/viewvc?view=rev&rev=477710
Log:
Eliminating personal directory, making JUnit haltonerror configurable
Modified:
incubator/roller/trunk/ant.properties
incubator/roller/trunk/build.xml
incubator/roller/trunk/custom/custom-ant.xmlf
Modified: incubator/roller/trunk/ant.properties
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/ant.properties?view=diff&rev=477710&r1=477709&r2=477710
==============================================================================
--- incubator/roller/trunk/ant.properties (original)
+++ incubator/roller/trunk/ant.properties Tue Nov 21 07:51:18 2006
@@ -9,13 +9,37 @@
build.debug=true
build.sourcelevel=1.4
build.deprecation=false
+junit.haltonerror=false
-# The following properties (with your own appropriate values)
-# are required if using the deploy-tomcat target.
-#staging=../build/roller
-#webapp.name=roller
-catalina.home=/export/home/dave/tomcat/
+# ----------------------------------------------------------------------------
+# Optional properties for custom builds
+# ----------------------------------------------------------------------------
-# Path to Roller source, needed by our custom Netbeans actions
+# Path to Roller source, needed by custom Netbeans tasks
project.dir=/Users/dave/roller_trunk
+
+# Path to Roller Support project, needed by some custom builds
+build.rollersupport=/Users/dave/src/roller_java_net/roller_support
+
+# Deploy to Glassfish properties
+glassfish.home=/Users/dave/glassfish
+asant.passwordfile=/Users/dave/.asant-passwordfile
+
+# Depoy to local Tomcat properties
+catalina.home=/export/home/dave/tomcat/
+catalina.host=localhost
+catalina.port=8080
+catalina.username=admin
+catalina.password=admin
+
+# Deploy to remote ISP properties
+ftp.host=
+ftp.remotedir=
+ftp.username=
+ftp.password=
+
+# Depoy to local Resin properties
+resin.home=c:\\resin
+resin.username=
+resin.password=
\ No newline at end of file
Modified: incubator/roller/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/build.xml?view=diff&rev=477710&r1=477709&r2=477710
==============================================================================
--- incubator/roller/trunk/build.xml (original)
+++ incubator/roller/trunk/build.xml Tue Nov 21 07:51:18 2006
@@ -938,7 +938,7 @@
&custom-pre-dbtest;
- <junit fork="true" dir="${build.tests}" printsummary="on" showOutput="false">
+ <junit fork="true" dir="${build.tests}" printsummary="on" showOutput="true">
<classpath>
<path refid="tests.run.path"/>
</classpath>
@@ -948,7 +948,7 @@
<jvmarg value="-Dro.build=${ro.build}"/>
<jvmarg value="-Droller.custom.config=${build.tests}/roller-custom.properties"/>
<formatter type="xml"/>
- <batchtest toDir="${build.reports}/business/xml" haltonerror="true">
+ <batchtest toDir="${build.reports}/business/xml" haltonerror="${junit.haltonerror}">
<fileset dir="${build.compile.tests}">
<!-- core services. no reliance on users or weblogs -->
@@ -1115,26 +1115,6 @@
<path refid="tests.run.path"/>
</classpath>
</java>
-</target>
-
-<!-- ********************************************************************* -->
-<!-- EXAMPLE targets -->
-<!-- ********************************************************************* -->
-
-<target name="deploy-tomcat" depends="stage-webapp" >
- <ant dir="./personal" target="deploy-tomcat" />
-</target>
-<target name="deploy-resin" depends="stage-webapp" >
- <ant dir="./personal" target="deploy-resin" />
-</target>
-<target name="deploy-isp" depends="stage-webapp" >
- <ant dir="./personal" target="deploy-isp" />
-</target>
-<target name="clean-isp">
- <ant dir="./personal" target="clean-isp" />
-</target>
-<target name="official-release" depends="tests,apache-release" >
- <ant dir="./personal" target="official-release" />
</target>
<!-- ********************************************************************* -->
Modified: incubator/roller/trunk/custom/custom-ant.xmlf
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/custom/custom-ant.xmlf?view=diff&rev=477710&r1=477709&r2=477710
==============================================================================
--- incubator/roller/trunk/custom/custom-ant.xmlf (original)
+++ incubator/roller/trunk/custom/custom-ant.xmlf Tue Nov 21 07:51:18 2006
@@ -1,6 +1,11 @@
<!-- Additional Ant tasks to include in build script -->
+
+<!-- ====================================================================== -->
+<!-- Example Netbeans debugging targets -->
+<!-- ====================================================================== -->
+
<!-- Netbeans debug single class
-->
<target name="debug-selected-files" if="netbeans.home" depends="build-tests"
@@ -56,6 +61,50 @@
<antcall target="stop-db" />
</target>
+<!--
+<target name="debug" depends="compile, deploy" if="netbeans.home" description="Debug Project">
+ <nbjpdaconnect name="${app.name}" host="${jpda.host}" address="${jpda.address}" transport="dt_socket">
+ <classpath refid="${run.classpath}"/>
+ <sourcepath refid="${debug.sourcepath}"/>
+ </nbjpdaconnect>
+ <nbbrowse url="${client.url}"/>
+</target>
+-->
+
+
+<!-- ====================================================================== -->
+<!-- Glassfish deployment example -->
+<!-- ====================================================================== -->
+
+<!-- up to date as of Nov. 17, 2006 -->
+
+<!-- Glassfish targets assume you're runnign with "asant" -->
+
+<target name="deploy-glassfish" depends="stage-webapp">
+ <jar basedir="${build.webapp}" destfile="roller.war" includes="**/**" />
+ <sun-appserv-deploy
+ file="roller.war"
+ passwordfile="${asant.passwordfile}"
+ asinstalldir="${glassfish.home}" />
+</target>
+
+<target name="undeploy-glassfish">
+ <sun-appserv-undeploy
+ file="roller.war"
+ passwordfile="${asant.passwordfile}"
+ asinstalldir="${glassfish.home}" />
+</target>
+
+<target name="redeploy-glassfish" depends="build">
+ <jar basedir="${build.webapp}" destfile="roller.war" includes="**/**" update="yes" />
+ <sun-appserv-update file="roller.war" />
+</target>
+
+
+<!-- ====================================================================== -->
+<!-- Other examples -->
+<!-- ====================================================================== -->
+
<!-- generate JDO mappings
<target name="gen-jdomappings" description="XDoclet Generate JDO mappings">
<taskdef name="jdodoclet"
@@ -102,13 +151,164 @@
</target>
-->
-<!--
-<target name="debug" depends="compile, deploy" if="netbeans.home" description="Debug Project">
- <nbjpdaconnect name="${app.name}" host="${jpda.host}" address="${jpda.address}" transport="dt_socket">
- <classpath refid="${run.classpath}"/>
- <sourcepath refid="${debug.sourcepath}"/>
- </nbjpdaconnect>
- <nbbrowse url="${client.url}"/>
+<!-- ====================================================================== -->
+<!-- Tomcat deployment example -->
+<!-- ====================================================================== -->
+
+<!-- out of date -->
+
+<target name="deploy-tomcat">
+
+ <!-- Fixup the web.xml so that it is ready for deployment -->
+ <replace file="${staging}/WEB-INF/web.xml"
+ token="<!-- TOMCAT_RESOURCE_REF -->">
+ <replacevalue><![CDATA[
+ <resource-ref>
+ <res-ref-name>jdbc/rollerdb</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ ]]></replacevalue>
+ </replace>
+ <fixcrlf srcdir="${staging}/WEB-INF" eol="lf" includes="**/*.xml" />
+
+ <!-- ask Tomcat manager to UN-DEPLOY Roller
+ <get src="http://localhost:${catalina.port}/manager/remove?path=/${webapp.name}"
+ dest="remove-out.txt"
+ username="${catalina.username}" password="${catalina.password}" />
+ <loadfile property="remove-out" srcFile="remove-out.txt"/>
+ <echo>${remove-out}</echo> -->
+
+ <!-- copy Roller files to Tomcat directory -->
+ <mkdir dir="${catalina.home}/webapps/${webapp.name}"/>
+ <copy todir="${catalina.home}/webapps/${webapp.name}">
+ <fileset dir="${staging}" includes="**/**"/>
+ </copy>
+
+ <!-- ask Tomcat manager to RE-DEPLOY Roller
+ <get src="http://localhost:${catalina.port}/manager/install?path=/${webapp.name}&war=file://${catalina.home}/webapps/${webapp.name}"
+ dest="install-out.txt"
+ username="${catalina.username}" password="${catalina.password}" />
+ <loadfile property="install-out" srcFile="install-out.txt"/>
+ <echo>${install-out}</echo> -->
+
+</target>
+
+
+<!-- ====================================================================== -->
+<!-- Resin deployment example -->
+<!-- ====================================================================== -->
+
+<!-- out of date -->
+
+<target name="deploy-resin">
+
+ <property name="webapps" value="${resin.home}/webapps"/>
+
+ <replace file="${staging}/WEB-INF/web.xml"
+ token="<!-- RESIN_LOGGER -->">
+ <replacevalue><![CDATA[
+ <access-log href="WEB-INF/logs/access.log" />
+ <stdout-log href="WEB-INF/logs/stdout.log" />
+ <stderr-log href="WEB-INF/logs/error.log" />
+ <resource-ref>
+ <res-ref-name>jdbc/rollerdb</res-ref-name>
+ <res-type>javax.sql.ConnectionPoolDataSource</res-type>
+ <init-param driver-name="org.gjt.mm.mysql.jdbc2.optional.MysqlConnectionPoolDataSource"/>
+ <init-param serverName="localhost"/>
+ <init-param user="${resin.username}"/>
+ <init-param password="${resin.password}"/>
+ <init-param port="3306"/>
+ <init-param databaseName="roller" />
+ </resource-ref>
+ ]]></replacevalue>
+ </replace>
+
+ <replace file="${staging}/WEB-INF/web.xml"
+ token="<!-- RESIN_AUTHENTICATOR -->">
+ <replacevalue><![CDATA[
+ <authenticator>
+ <class-name>com.caucho.http.security.XmlAuthenticator</class-name>
+ <init-param user="${resin.username}:${resin.password}:editor" />
+ </authenticator>
+ ]]></replacevalue>
+ </replace>
+
+ <fixcrlf srcdir="${staging}/WEB-INF" eol="lf" includes="**/*.xml" />
+
+ <copy todir="${staging}">
+ <fileset dir="../docs" includes="**/*.html"/>
+ <fileset dir="../docs" includes="**/*.gif"/>
+ <fileset dir="../docs" includes="**/*.jpg"/>
+ </copy>
+
+ <copy todir="${staging}/WEB-INF" overwrite="yes" >
+ <fileset dir="./resin" includes="velocity.properties"/>
+ <fileset dir="./resin" includes="database.xml"/>
+ </copy>
+
+ <mkdir dir="${webapps}/roller"/>
+ <copy todir="${webapps}/roller">
+ <fileset dir="${staging}" includes="**/**"/>
+ </copy>
+
+</target>
+
+
+<!-- ********************************************************************* -->
+<!-- Remote ISP via FTP deployment -->
+<!-- ********************************************************************* -->
+
+<!-- out of date -->
+
+<target name="deploy-isp">
+
+ <replace file="${staging}/WEB-INF/web.xml"
+ token="<!-- TOMCAT_RESOURCE_REF -->">
+ <replacevalue><![CDATA[
+ <resource-ref>
+ <res-ref-name>jdbc/rollerdb</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ ]]></replacevalue>
+ </replace>
+
+ <fixcrlf srcdir="${staging}/WEB-INF" eol="lf" includes="**/*.xml" />
+
+ <ftp server="${ftp.host}"
+ remotedir="/public_html"
+ userid="${ftp.username}"
+ password="${ftp.password}"
+ ignoreNoncriticalErrors="yes"
+ depends="yes"
+ verbose="yes">
+ <fileset dir="${staging}">
+
+ <!-- copy everything
+ <include name="**"/>
+ -->
+
+ <!-- copy only code changes -->
+ <exclude name="**/web.xml"/>
+ <exclude name="**/roller-config.xml"/>
+ <exclude name="**/oscache.propertiesl"/>
+ <exclude name="**/log4j.properties"/>
+ <include name="**/*.xml"/>
+ <include name="**/*.vm"/>
+ <include name="**/*.tld"/>
+ <include name="**/*.css"/>
+ <include name="**/*.html"/>
+ <include name="**/*.htm"/>
+ <include name="**/*.jsp"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.png"/>
+ <include name="**/WEB-INF/lib/rollerweb.jar"/>
+ <include name="**/WEB-INF/lib/rollerbeans.jar"/>
+
+ <exclude name="**/newuser.jsp"/>
+
+ </fileset>
+ </ftp>
</target>
--->