Änderung im BUILD system:

Datei project.xml ist jetzt Teil des Bundle und ersetzt dort
application.cfg. 

Die Liste der Module für load-bundle wird jetzt aus project.xml
extrahiert. Damit entfällt das lästige synchronisieren der beiden
Dateien. 

Kopieren einer project.xml in das Basisverzeichnis (trunk) 
entfällt ersatzlos. ant configure ect. greifen auf die 
neue Position der Datei zu.


git-svn-id: https://svn.libreccm.org/ccm/trunk@1046 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-08-02 19:21:40 +00:00
parent d9591bb12f
commit 988b430bd1
10 changed files with 69 additions and 112 deletions

View File

@ -7,6 +7,11 @@
xmlns:ccm="http://ccm.redhat.com/ccm-project"
exclude-result-prefixes="ccm common">
<!-- =========================
CURRENTLY NO LONGER USED.
========================= -->
<xsl:output method="text" />
<xsl:template match="ccm:project">

View File

@ -5,6 +5,10 @@
xmlns:ccm="http://ccm.redhat.com/ccm-project"
exclude-result-prefixes="ccm">
<!-- =========================
CURRENTLY NO LONGER USED.
========================= -->
<xsl:output method="text"
encoding="UTF-8"
indent="yes"

View File

@ -12,12 +12,16 @@
indent="yes"
xalan:indent-amount="4"/>
<!-- gets project.xml as input file and combines its content and the content
of the file application.xml of each modules included in the build
(tag ccm:build) into one (temporary) output file .tmp.project.xml for
further processing by xalan and build-template.xsl -->
<xsl:template match="ccm:project">
<xsl:element name="ccm:project">
<xsl:copy-of select="@*"/>
<xsl:copy-of select="*"/>
<xsl:for-each select="/ccm:project/ccm:build/ccm:application">
<xsl:copy-of select="document(concat(@name,'/application.xml'),/ccm:project)"/>
<xsl:copy-of select="document(concat('../../../../',@name,'/application.xml'),/ccm:project)"/>
</xsl:for-each>
</xsl:element>
</xsl:template>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:common="http://exslt.org/common"
xmlns:xalan="http://xml.apache.org/xslt"
xmlns:ccm="http://ccm.redhat.com/ccm-project"
exclude-result-prefixes="ccm common">
<xsl:output method="text"
encoding="UTF-8"
indent="no" />
<!-- gets bundle's file project.xml as input and extracts the names of the
modules to be included in the build (tag ccm:application child of
ccm:build) into a (temporary) output file .tmp.applications.list as a
space delimited list of names for further processing -->
<xsl:template match="ccm:project">
<xsl:element name="ccm:project">
<xsl:for-each select="/ccm:project/ccm:build/ccm:application">
<xsl:value-of select="concat(@name,' ')"/>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

View File

@ -27,7 +27,7 @@ See http://aplaws.org
Java 6.x
Ant 1.7.x
Oracle 10g RDBMS or PostgresQL up to version 8.2
Oracle 10g RDBMS or PostgresQL up to version 8.4
3. HOW TO USE

View File

@ -3,10 +3,10 @@
## The defaults are shown commented out
## Usually you will define your own specific bundle!
#ccm.bundle.folder=${ccm.project.dir}/ccm-ldn-aplaws/bundles/devel
#ccm.bundle.folder=${ccm.project.dir}/ccm-ldn-aplaws/bundles/complete
ccm.upgrade.package=ccm-xxx
ccm.upgrade.from.version=x.x.x
ccm.upgrade.to.version=y.y.y
#ccm.upgrade.package=ccm-xxx
#ccm.upgrade.from.version=x.x.x
#ccm.upgrade.to.version=y.y.y

View File

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- project.xml -complete- containing all modules as of current version of aplaws -->
<!-- If you don't already have a project.xml file in place, You have to copy
this one to your development base directory renaming it to project.xml
Comment out those modules to don't need. Keep the included modules in sync
with the bundles application file! -->
<ccm:project xmlns:ccm="http://ccm.redhat.com/ccm-project"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd"
ccmVersion="6.1"
name="aplaws"
prettyName="APLAWS plus"
type="application"
version="1-0-5"
release="alpha-1"
webxml="web.empty.xml"
webapp="ROOT" >
<!-- List all target databases here -->
<ccm:databases>
<ccm:database name="postgres"/>
<ccm:database name="oracle-se"/>
</ccm:databases>
<!-- List all project specific applications here -->
<ccm:build>
<!-- ccm-auth-http also has internal build.xml -->
<ccm:application name="ccm-auth-http"/>
<ccm:application name="ccm-cms"/>
<ccm:application name="ccm-cms-assets-fileattachment"/>
<ccm:application name="ccm-cms-assets-notes"/>
<ccm:application name="ccm-cms-assets-relatedlink"/>
<ccm:application name="ccm-cms-types-address"/>
<ccm:application name="ccm-cms-types-agenda"/>
<ccm:application name="ccm-cms-types-article"/>
<ccm:application name="ccm-cms-types-bookmark"/>
<ccm:application name="ccm-cms-types-contact"/>
<ccm:application name="ccm-cms-types-esdservice"/>
<ccm:application name="ccm-cms-types-event"/>
<ccm:application name="ccm-cms-types-faqitem"/>
<ccm:application name="ccm-cms-types-filestorageitem"/>
<ccm:application name="ccm-cms-types-formitem"/>
<ccm:application name="ccm-cms-types-formsectionitem"/>
<ccm:application name="ccm-cms-types-glossaryitem"/>
<ccm:application name="ccm-cms-types-htmlform"/>
<ccm:application name="ccm-cms-types-inlinesite"/>
<ccm:application name="ccm-cms-types-job"/>
<ccm:application name="ccm-cms-types-legalnotice"/>
<ccm:application name="ccm-cms-types-minutes"/>
<ccm:application name="ccm-cms-types-motditem"/>
<ccm:application name="ccm-cms-types-mparticle"/>
<ccm:application name="ccm-cms-types-newsitem"/>
<ccm:application name="ccm-cms-types-organization"/>
<ccm:application name="ccm-cms-types-pressrelease"/>
<ccm:application name="ccm-cms-types-service"/>
<ccm:application name="ccm-cms-types-siteproxy"/>
<ccm:application name="ccm-cms-types-xmlfeed"/>
<ccm:application name="ccm-bookmarks"/>
<ccm:application name="ccm-core"/>
<ccm:application name="ccm-formbuilder-pdf"/>
<ccm:application name="ccm-forum"/>
<ccm:application name="ccm-ldn-aplaws"/>
<ccm:application name="ccm-ldn-atoz"/>
<ccm:application name="ccm-ldn-dublin"/>
<ccm:application name="ccm-ldn-exporter"/>
<ccm:application name="ccm-ldn-freeform"/>
<ccm:application name="ccm-ldn-image-step"/>
<ccm:application name="ccm-ldn-importer"/>
<ccm:application name="ccm-ldn-navigation"/>
<ccm:application name="ccm-ldn-portal"/>
<ccm:application name="ccm-ldn-rss"/>
<ccm:application name="ccm-ldn-search"/>
<ccm:application name="ccm-ldn-shortcuts"/>
<ccm:application name="ccm-ldn-subsite"/>
<ccm:application name="ccm-ldn-terms"/>
<ccm:application name="ccm-ldn-theme"/>
<ccm:application name="ccm-ldn-util"/>
<ccm:application name="ccm-simplesurvey"/>
<ccm:application name="ccm-user-preferences"/>
</ccm:build>
<!-- List all shared, pre-built applications here -->
<ccm:prebuilt>
</ccm:prebuilt>
</ccm:project>

View File

@ -61,16 +61,29 @@
<target name="prepare-load">
<echo>prepare bundle ${ccm.bundle.folder}</echo>
<!-- bundle file applications.cfg replace by project.xml, now part of bundle
<copy file="${ccm.bundle.folder}/cfg/applications.cfg"
tofile=".tmp.applications.cfg" overwrite="yes" />
<replaceregexp file=".tmp.applications.cfg" match="#.*" replace="" byline="true" />
<replaceregexp file=".tmp.applications.cfg"
match="[ \t\r\n]+" replace=" " flags="gs" />
<loadfile property="applications" srcFile=".tmp.applications.cfg" />
<delete file=".tmp.applications.cfg"/>
-->
<java classname="org.apache.xalan.xslt.Process" fork="yes" failonerror="true">
<classpath refid="ccm.tools.classpath"/>
<arg value="-IN"/>
<arg value="${ccm.bundle.folder}/cfg/project.xml"/>
<arg value="-OUT"/>
<arg value=".tmp.applications.list"/>
<arg value="-XSL"/>
<arg value="${ccm.tools.xsl.dir}/listapps.xsl"/>
<arg value="-TEXT"/>
</java>
<loadfile property="applications" srcFile=".tmp.applications.list" />
<delete file=".tmp.applications.list"/>
<tstamp>
<format pattern="yyyymmddhhmmss" property="timestamp" />
</tstamp>
<echo>Included: ${applications}</echo>
<!-- classpath used by command line tools load-bundle, update, ... -->
<path id="ccm.classpath">

View File

@ -11,21 +11,21 @@
<project name="configure" default="configure">
<target name="configure">
<echo>Validating the schema of project.xml</echo>
<echo>Validating the schema of bundle's project.xml</echo>
<!-- http://xerces.apache.org/xerces2-j/samples-dom.html#Counter -->
<java classname="dom.Counter" classpathref="ccm.tools.classpath"
errorproperty="project.validation.errors"
outputproperty="project.validation.output">
<arg value="-s" />
<arg value="-f" />
<arg value="-v" />
<arg value="${ccm.project.dir}/project.xml" />
<arg value="-s" /> <!-- turn on Schema validation support -->
<arg value="-f" /> <!-- turn on Schema full checking -->
<arg value="-v" /> <!-- turn on validation -->
<arg value="${ccm.bundle.folder}/cfg/project.xml" />
</java>
<if>
<equals arg1="${project.validation.errors}" arg2="" />
<then>
<echo>Validating the schema of project.xml successful</echo>
<echo>Validating the schema of bundle's project.xml successful</echo>
</then>
<else>
<fail message="${project.validation.errors}" />
@ -43,14 +43,14 @@
</xslt>
-->
<!-- Building the core: build-projects.xml from projects.xml with all
<!-- Building build-projects.xml from projects.xml with all
targets for compile / build / deploy
uses currently the xsl templates used by the ccm scripts -->
<echo message="Regenerating build-projects.xml" />
<java classname="org.apache.xalan.xslt.Process" fork="yes" failonerror="true">
<classpath refid="ccm.tools.classpath"/>
<arg value="-IN"/>
<arg value="project.xml"/>
<arg value="${ccm.bundle.folder}/cfg/project.xml"/>
<arg value="-OUT"/>
<arg value=".tmp.project.xml"/>
<arg value="-XSL"/>

View File

@ -13,12 +13,12 @@
<source-folder>
<label>webapps</label>
<type>doc_root</type>
<location>~/ccm-devel/runtime/apache-tomcat-6.0.26/webapps</location>
<location>~/ccm-devel/runtime/apache-tomcat-6.0.32/webapps</location>
</source-folder>
<source-folder>
<label>WEB-INF</label>
<type>web_inf</type>
<location>~/ccm-devel/runtime/apache-tomcat-6.0.26/webapps/ROOT/WEB-INF</location>
<location>~/ccm-devel/runtime/apache-tomcat-6.0.32/webapps/ROOT/WEB-INF</location>
</source-folder>
<source-folder>
<label>CCM (trunk)</label>
@ -740,10 +740,6 @@
<label>ccm-cms-types-pressrelease (Source)</label>
<location>ccm-cms-types-pressrelease/src</location>
</source-folder>
<source-folder style="packages">
<label>ccm-cms-types-project (Source)</label>
<location>ccm-cms-types-project/src</location>
</source-folder>
<source-folder style="packages">
<label>ccm-cms-types-researchnetwork (Source)</label>
<location>ccm-cms-types-researchnetwork/src</location>
@ -1001,7 +997,6 @@
<package-root>ccm-cms-types-organization/src</package-root>
<package-root>ccm-cms-types-person/src</package-root>
<package-root>ccm-cms-types-pressrelease/src</package-root>
<package-root>ccm-cms-types-project/src</package-root>
<package-root>ccm-cms-types-researchnetwork/src</package-root>
<package-root>ccm-cms-types-simpleaddress/src</package-root>
<package-root>ccm-cms-types-service/src</package-root>