You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/09/15 18:41:35 UTC
svn commit: r446653 - in /incubator/roller/trunk: ant.properties build.xml
custom/custom-build-business.xmlf custom/custom-gen-beans.xmlf
custom/custom-gen-business.xmlf custom/custom-jars.xmlf
custom/custom-src-beans.xmlf
Author: agilliland
Date: Fri Sep 15 09:41:34 2006
New Revision: 446653
URL: http://svn.apache.org/viewvc?view=rev&rev=446653
Log:
a bit of cleanup to the build.xml file to support greater flexibility for customizations of the business layer build.
- custom-gen-business can now contain more than just a fileset, so users can do any kind of generation work for the business layer.
- custom-build-business can now contain more than just a fileset, so users can do any kind of build work fo the business layer.
- also added a build.sourcelevel property and applied it to all calls to 'javac' to ensure that source is built against the desired jdk source level.
Added:
incubator/roller/trunk/custom/custom-build-business.xmlf
- copied, changed from r443430, incubator/roller/trunk/custom/custom-src-beans.xmlf
incubator/roller/trunk/custom/custom-gen-business.xmlf
- copied, changed from r443430, incubator/roller/trunk/custom/custom-gen-beans.xmlf
Removed:
incubator/roller/trunk/custom/custom-gen-beans.xmlf
incubator/roller/trunk/custom/custom-src-beans.xmlf
Modified:
incubator/roller/trunk/ant.properties
incubator/roller/trunk/build.xml
incubator/roller/trunk/custom/custom-jars.xmlf
Modified: incubator/roller/trunk/ant.properties
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/ant.properties?view=diff&rev=446653&r1=446652&r2=446653
==============================================================================
--- incubator/roller/trunk/ant.properties (original)
+++ incubator/roller/trunk/ant.properties Fri Sep 15 09:41:34 2006
@@ -7,6 +7,7 @@
# compile time settings
build.debug=true
+build.sourcelevel=1.4
build.deprecation=false
Modified: incubator/roller/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/build.xml?view=diff&rev=446653&r1=446652&r2=446653
==============================================================================
--- incubator/roller/trunk/build.xml (original)
+++ incubator/roller/trunk/build.xml Fri Sep 15 09:41:34 2006
@@ -17,18 +17,18 @@
directory of this distribution.-
-->
<!DOCTYPE project [
- <!ENTITY properties SYSTEM "properties.xmlf">
- <!ENTITY custom-gen-web SYSTEM "custom/custom-gen-web.xmlf">
- <!ENTITY custom-gen-beans SYSTEM "custom/custom-gen-beans.xmlf">
- <!ENTITY custom-jars SYSTEM "custom/custom-jars.xmlf">
- <!ENTITY custom-src-beans SYSTEM "custom/custom-src-beans.xmlf">
- <!ENTITY custom-src-web SYSTEM "custom/custom-src-web.xmlf">
- <!ENTITY custom-src-tests SYSTEM "custom/custom-src-tests.xmlf">
- <!ENTITY custom-web SYSTEM "custom/custom-web.xmlf">
- <!ENTITY custom-dbscripts SYSTEM "custom/custom-dbscripts.xmlf">
- <!ENTITY custom-pre-dbtest SYSTEM "custom/custom-pre-dbtest.xmlf">
- <!ENTITY custom-post-dbtest SYSTEM "custom/custom-post-dbtest.xmlf">
- <!ENTITY custom-ant SYSTEM "custom/custom-ant.xmlf">
+ <!ENTITY properties SYSTEM "properties.xmlf">
+ <!ENTITY custom-ant SYSTEM "custom/custom-ant.xmlf">
+ <!ENTITY custom-jars SYSTEM "custom/custom-jars.xmlf">
+ <!ENTITY custom-gen-business SYSTEM "custom/custom-gen-business.xmlf">
+ <!ENTITY custom-build-business SYSTEM "custom/custom-build-business.xmlf">
+ <!ENTITY custom-gen-web SYSTEM "custom/custom-gen-web.xmlf">
+ <!ENTITY custom-src-web SYSTEM "custom/custom-src-web.xmlf">
+ <!ENTITY custom-web SYSTEM "custom/custom-web.xmlf">
+ <!ENTITY custom-src-tests SYSTEM "custom/custom-src-tests.xmlf">
+ <!ENTITY custom-dbscripts SYSTEM "custom/custom-dbscripts.xmlf">
+ <!ENTITY custom-pre-dbtest SYSTEM "custom/custom-pre-dbtest.xmlf">
+ <!ENTITY custom-post-dbtest SYSTEM "custom/custom-post-dbtest.xmlf">
]>
<!-- ********************************************************************* -->
<!-- Ant build script for Roller main branch -->
@@ -98,8 +98,8 @@
</target>
<!-- ============================================== -->
-<!-- generate Hibernate mappings -->
-<target name="gen-hibernate" description="XDoclet Generate Hibernate mappings">
+<!-- generate code/files for the business layer -->
+<target name="gen-business" description="Generate business layer resources">
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"
@@ -112,14 +112,18 @@
excludedtags="@version,@author"
addedtags="@xdoclet-generated at ${TODAY}"
force="true">
+
<fileset dir="${ro.src}" includes="org/apache/roller/pojos/WeblogTemplate.java" />
<fileset dir="${ro.src}" includes="org/apache/roller/pojos/*Data.java" />
<fileset dir="${ro.src}" includes="org/apache/roller/pojos/*Assoc.java" />
- <fileset dir="${ro.src}" includes="org/apache/roller/business/*Data.java" />
- &custom-gen-beans;
+
<hibernate validatexml="true" version="3.0"/>
+
</hibernatedoclet>
+ <!-- allow for custom generation work -->
+ &custom-gen-business;
+
</target>
@@ -278,7 +282,7 @@
<!-- Compile and jar Business Tier classes -->
<!-- ********************************************************************* -->
-<target name="build-business" depends="gen-hibernate">
+<target name="build-business" depends="gen-business">
<mkdir dir="${build.generated.business}"/>
<mkdir dir="${build.compile.business}"/>
@@ -293,26 +297,33 @@
ro.buildTime=${ro.buildTime}
ro.buildUser=${user.name}
</echo>
-
- <javac debug="${build.debug}"
- source="1.4"
- destdir="${build.compile.business}"
- excludes="org/apache/roller/ui/**, org/apache/roller/webservices/**" >
+
+ <!-- compile roller business classes -->
+ <javac destdir="${build.compile.business}"
+ excludes="org/apache/roller/ui/**, org/apache/roller/webservices/**"
+ debug="${build.debug}"
+ source="${build.sourcelevel}"
+ deprecation="${build.deprecation}">
<src path="${ro.src}" />
<src path="${build.generated.business}"/>
- &custom-src-beans;
+
<classpath>
<path refid="business.path"/>
&custom-jars;
</classpath>
</javac>
- <!-- Copy class resources -->
- <copy todir="${build.compile.business}/org/apache/roller/model">
- <fileset dir="${build.generated.business}" includes="*.hbm.xml"/>
+ <!-- Copy resources -->
+ <copy todir="${build.compile.business}">
+ <fileset dir="${ro.src}"
+ excludes="**/*.java, **/*.html, **/*.png, org/apache/roller/ui/**, org/apache/roller/webservices/**" />
+ <fileset dir="${build.generated.business}" excludes="**/*.java" />
</copy>
+ <!-- allow for custom build work -->
+ &custom-build-business;
+
<!-- Jar up the business layer -->
<jar basedir="${build.compile.business}"
jarfile="${build.lib}/roller-business.jar"/>
@@ -329,7 +340,7 @@
<mkdir dir="${build.compile.web}" />
<javac debug="${build.debug}"
- source="1.4"
+ source="${build.sourcelevel}"
destdir="${build.compile.web}"
includes="org/apache/roller/ui/**, org/apache/roller/webservices/**, org/apache/roller/util/rome/**" >
@@ -783,7 +794,7 @@
<mkdir dir="${build.tests}/WEB-INF/classes/themes" />
<javac srcdir="${ro.tests}"
- source="1.4"
+ source="${build.sourcelevel}"
destdir="${build.tests}/WEB-INF/classes"
includeantruntime="false"
debug="true" optimize="false" verbose="false" deprecation="false">
@@ -1087,7 +1098,7 @@
webXmlFragment="${build.webapp}/WEB-INF/generated_web.xml"
outputDir="${ro.build}/jspc" />
<mkdir dir="${ro.build}/jspc.classes"/>
- <javac source="1.4" debug="true" srcdir="${ro.build}/jspc" excludes="**/header_jsp.*"
+ <javac source="${build.sourcelevel}" debug="true" srcdir="${ro.build}/jspc" excludes="**/header_jsp.*"
destdir="${ro.build}/jspc.classes" fork="true">
<classpath refid="jsp.compile.path"/>
</javac>
Copied: incubator/roller/trunk/custom/custom-build-business.xmlf (from r443430, incubator/roller/trunk/custom/custom-src-beans.xmlf)
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/custom/custom-build-business.xmlf?view=diff&rev=446653&p1=incubator/roller/trunk/custom/custom-src-beans.xmlf&r1=443430&p2=incubator/roller/trunk/custom/custom-build-business.xmlf&r2=446653
==============================================================================
--- incubator/roller/trunk/custom/custom-src-beans.xmlf (original)
+++ incubator/roller/trunk/custom/custom-build-business.xmlf Fri Sep 15 09:41:34 2006
@@ -1,8 +1,18 @@
-<!--
-Custom classes to include in back-end compilation (rollerbeans.jar)
-NOTE: your classes MUST NOT be under the package org.roller.presentation.
--->
-<!-- Uncomment this to compile experimental JDO backend
-<src path="${basedir}/sandbox/jdobackend/src" />
- -->
+<!-- Do custom build work for business layer -->
+
+<!-- EXAMPLE: compile jdobackend from sandbox
+<javac destdir="${build.compile.business}"
+ debug="${build.debug}"
+ source="${build.sourcelevel}"
+ deprecation="${build.deprecation}">
+
+ <src path="sandbox/jdobackend/src" />
+
+ <classpath>
+ <path refid="business.path"/>
+ &custom-jars;
+ </classpath>
+
+</javac>
+-->
Copied: incubator/roller/trunk/custom/custom-gen-business.xmlf (from r443430, incubator/roller/trunk/custom/custom-gen-beans.xmlf)
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/custom/custom-gen-business.xmlf?view=diff&rev=446653&p1=incubator/roller/trunk/custom/custom-gen-beans.xmlf&r1=443430&p2=incubator/roller/trunk/custom/custom-gen-business.xmlf&r2=446653
==============================================================================
--- incubator/roller/trunk/custom/custom-gen-beans.xmlf (original)
+++ incubator/roller/trunk/custom/custom-gen-business.xmlf Fri Sep 15 09:41:34 2006
@@ -1,8 +1,23 @@
-<!-- Custom classes to include in Hibernate mapping file generation, for example:
-<fileset dir="${basedir}/custom/src" includes="**/*Data.java" />
+<!-- Do custom code/resource generation for business layer -->
+
+<!-- EXAMPLE: generate JDO mappings
+<taskdef name="jdodoclet"
+ classname="xdoclet.modules.jdo.JdoDocletTask"
+ classpathref="xdoclet.path" />
+
+<jdodoclet
+ destdir="${build.compile.business}"
+ mergedir="./metadata/xdoclet"
+ excludedtags="@version,@author"
+ addedtags="@xdoclet-generated at ${TODAY}"
+ force="true">
+
+ <fileset dir="${ro.src}" includes="org/apache/roller/pojos/WeblogTemplate.java" />
+ <fileset dir="${ro.src}" includes="org/apache/roller/pojos/*Data.java" />
+ <fileset dir="${ro.src}" includes="org/apache/roller/pojos/*Assoc.java" />
-<fileset dir="${basedir}/sandbox/planetroller/src"
- includes="**/*Data.java,**/*Assoc.java" />
+ <jdometadata jdoSpec="2.0" />
+
+</jdodoclet>
-->
-
Modified: incubator/roller/trunk/custom/custom-jars.xmlf
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/custom/custom-jars.xmlf?view=diff&rev=446653&r1=446652&r2=446653
==============================================================================
--- incubator/roller/trunk/custom/custom-jars.xmlf (original)
+++ incubator/roller/trunk/custom/custom-jars.xmlf Fri Sep 15 09:41:34 2006
@@ -1,4 +1,6 @@
-<!--
-Custom jars to be added to both rollerbeans and rollerweb compiles, for example:
+
+<!-- Custom jars added to Roller's standard set -->
+
+<!-- EXAMPLE: jdobackend libraries
<fileset dir="${basedir}/sandbox/jdobackend/lib" includes="*.jar" />
-->