Fixed combined.xml / ant configure, bundle files unter local funktionieren jetzt.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1236 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-11-10 22:26:50 +00:00
parent 72256c3177
commit 9eaded56a6
4 changed files with 11 additions and 253 deletions

View File

@ -12,17 +12,24 @@
indent="yes"
xalan:indent-amount="4"/>
<xsl:param name="ProjectDir" />
<!-- 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($ProjectDir,'/',@name,'/application.xml'),/ccm:project)"/>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,187 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Already definded:
ccm.project.dir: base dir of the development project
app.server.bundles.zip name of the installation file
app.server.parent.dir name of the dir to install into the server into
app.server.home.dir dir the server are installed into (i.e. CATALINA_HOME)
app.server.deploy.dir dir the server are installed into (i.e. CATALINA_BASE)
app.server.conf.dir name of the servers configuration dir
app.server.webapp.dir distribution dir for web applications -->
<project name="load">
<target name="load-bundle" depends="prepare-load">
<echo>Loading bundle ${ccm.bundle.folder} into ${ccm.home}</echo>
<java classname="com.arsdigita.packaging.MasterTool" fork="yes">
<classpath refid="ccm.classpath" />
<sysproperty key="ccm.home" value="${ccm.home}" />
<arg line="load ${applications} --parameter-file ${ccm.bundle.folder}/cfg/integration.properties" />
</java>
<!--
<sysproperty key="log4j.configuration"
value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" />
-->
<!--
<sysproperty key="java.protocol.handler.pkgs"
value="${java.protocol.handler.pkgs}" />
-->
</target>
<target name="load-bundle-config" depends="prepare-load">
<echo>load ${applications} --init using ${ccm.bundle.folder}/cfg/integration.properties</echo>
<java classname="com.arsdigita.packaging.MasterTool" classpathref="ccm.classpath" fork="yes">
<sysproperty key="ccm.home" value="${ccm.home}" />
<arg line="load ${applications} --config --parameter-file ${ccm.bundle.folder}/cfg/integration.properties" />
</java>
</target>
<target name="load" depends="prepare-load">
<echo>load ${applications} </echo>
<java classname="com.arsdigita.packaging.MasterTool" classpathref="ccm.classpath" fork="yes">
<sysproperty key="ccm.home" value="${ccm.home}" />
<!--
<sysproperty key="log4j.configuration"
value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" />
<sysproperty key="java.protocol.handler.pkgs"
value="${java.protocol.handler.pkgs}" />
-->
<arg line="load ${applications} " />
</java>
</target>
<target name="load-data" depends="prepare-load">
<echo>load --data ${applications}</echo>
<java classname="com.arsdigita.packaging.MasterTool" classpathref="ccm.classpath" fork="yes">
<sysproperty key="ccm.home" value="${ccm.home}" />
<arg line="load --data ${applications}" />
</java>
</target>
<target name="load-init" depends="prepare-load">
<echo>load --init ${applications}</echo>
<java classname="com.arsdigita.packaging.MasterTool" classpathref="ccm.classpath" fork="yes">
<sysproperty key="ccm.home" value="${ccm.home}" />
<arg line="load --data ${applications}" />
</java>
</target>
<target name="prepare-load">
<echo>prepare bundle ${ccm.bundle.folder}</echo>
<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"/>
<tstamp>
<format pattern="yyyymmddhhmmss" property="timestamp" />
</tstamp>
<!-- nolonger in use
<move file="${app.server.conf.dir}/registry"
tofile="${app.server.conf.dir}/registry.${timestamp}" preservelastmodified="yes"
failonerror="no" verbose="true" />
-->
<!-- classpath used by command line tools load-bundle, update, ... -->
<path id="ccm.classpath">
<path refid="ccm.tools.classpath"/>
<!-- <pathelement location="runtime/apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/classes"/> -->
<pathelement location="${app.server.webapp.dir}/ROOT/WEB-INF/classes"/>
<!-- <fileset dir="runtime/apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/lib" includes="**/*.jar" /> -->
<fileset dir="${app.server.webapp.dir}/ROOT/WEB-INF/lib" includes="**/*.jar" />
</path>
</target>
<target name="upgrade" description="Upgrade">
<fail message="Configure the package being upgraded using the ccm.upgrade.package property">
<condition>
<or>
<not>
<isset property="ccm.upgrade.package" />
</not>
<equals arg1="ccm-xxx" arg2="${ccm.upgrade.package}" />
</or>
</condition>
</fail>
<fail message="Configure the source version using the ccm.upgrade.from.version property">
<condition>
<or>
<not>
<isset property="ccm.upgrade.from.version" />
</not>
<equals arg1="xxx" arg2="${ccm.upgrade.from.version}" />
<not>
<matches pattern="[0-9]+\.[0-9]+\.[0-9]+" string="${ccm.upgrade.from.version}" />
</not>
</or>
</condition>
</fail>
<fail message="Configure the target version using the ccm.upgrade.to.version property">
<condition>
<or>
<not>
<isset property="ccm.upgrade.to.version" />
</not>
<equals arg1="xxx" arg2="${ccm.upgrade.to.version}" />
<not>
<matches pattern="[0-9]+\.[0-9]+\.[0-9]+" string="${ccm.upgrade.to.version}" />
</not>
</or>
</condition>
</fail>
<echo message="Upgrading ${ccm.upgrade.package} from version ${ccm.upgrade.from.version} to ${ccm.upgrade.to.version}" />
<java classname="com.arsdigita.packaging.MasterTool" fork="yes">
<classpath refid="ccm.classpath" />
<sysproperty key="ccm.home" value="${ccm.home}" />
<arg line="upgrade ${ccm.upgrade.package} --from-version=${ccm.upgrade.from.version} --to-version=${ccm.upgrade.to.version}" />
</java>
</target>
<target name="new-app">
<fail message="Please specify -Dnew.app.name=&lt;name&gt; at the command line">
<condition>
<not>
<isset property="new.app.name" />
</not>
</condition>
</fail>
<echo>Creating new application ${new.app.name}</echo>
<mkdir dir="${new.app.name}" />
<copy todir="${new.app.name}" preservelastmodified="true" verbose="true">
<fileset dir="${ccm.project.dir}/tools-ng/ecdc/templates/new-app">
<exclude name="src/new.app.name.*" />
</fileset>
<filterset>
<filter token="new.app.name" value="${new.app.name}" />
</filterset>
</copy>
<copy tofile="${new.app.name}/src/${new.app.name}.config" file="${ccm.project.dir}/tools-ng/ecdc/templates/new-app/src/new.app.name.config" preservelastmodified="true" verbose="true">
<filterset>
<filter token="new.app.name" value="${new.app.name}" />
</filterset>
</copy>
<copy tofile="${new.app.name}/src/${new.app.name}.load" file="${ccm.project.dir}/tools-ng/ecdc/templates/new-app/src/new.app.name.load" preservelastmodified="true" verbose="true">
<filterset>
<filter token="new.app.name" value="${new.app.name}" />
</filterset>
</copy>
<copy tofile="${new.app.name}/src/${new.app.name}.upgrade" file="${ccm.project.dir}/tools-ng/ecdc/templates/new-app/src/new.app.name.upgrade" preservelastmodified="true" verbose="true">
<filterset>
<filter token="new.app.name" value="${new.app.name}" />
</filterset>
</copy>
</target>
<target name="ccm" depends="prepare-load">
<echo>ccm ${ccm.parameters}</echo>
<java classname="com.arsdigita.packaging.MasterTool" classpathref="ccm.classpath" fork="yes">
<sysproperty key="ccm.home" value="${ccm.home}" />
<arg line="${ccm.parameters}" />
</java>
</target>
</project>

View File

@ -56,6 +56,9 @@
<arg value="-XSL"/>
<arg value="${ccm.tools.xsl.dir}/combine.xsl"/>
<arg value="-XML"/>
<arg value="-PARAM"/>
<arg value="ProjectDir"/>
<arg value="${ccm.project.dir}"/>
</java>
<java classname="org.apache.xalan.xslt.Process" fork="yes" failonerror="true">
<classpath refid="ccm.tools.classpath"/>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Already definded:
ccm.project.dir: base dir of the development project (environment)
in conf/runtime.properties:
app.server.bundles.zip full name of the installation file
app.server.parent.dir full name of the dir where to install the server software into
app.server.home.dir full name of the servers dir (i.e. CATALINA_HOME)
app.server.conf.dir full name of the servers configuration dir
app.server.shared.dir full name of dir where shared libraries are to be installed (i.e. lib)
app.server.webapp.dir full name of dir where web applications to install (deploy) (i.e. webapps)
-->
<project name="appserver" default="start">
<target name="install-tomcat">
<echo>Installing app server into ${app.server.parent.dir}</echo>
<unzip src="${app.server.bundles.zip}" dest="${app.server.parent.dir}"
overwrite="true">
<patternset>
<exclude name="**/ROOT/**" />
</patternset>
</unzip>
<!-- Copy additional files needed for operation -->
<copy file="ccm-core/lib/xercesImpl.jar"
todir="${app.server.shared.dir}/endorsed" preservelastmodified="true"/>
<copy file="tools-ng/devel/lib/ojdbc14.jar"
todir="${app.server.shared.dir}" preservelastmodified="true"/>
<copy file="tools-ng/devel/lib/postgresql-jdbc-8.2.506.jar"
todir="${app.server.shared.dir}" preservelastmodified="true"/>
</target>
<target name="start">
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
<!-- nolonger needed ? (if anything works as expected)
seems to be needed if sysproperty javax....xerces...SAYParser .... below is set.
<sysproperty key="java.endorsed.dirs" value="${app.server.shared.dir}/endorsed" />
-->
<!-- Previously required to prevent Tomcat from using AElfred to check web.xml / taglibs -->
<!-- seems to work now without, please comment in if something goes wrong with XML processing
<sysproperty key="javax.xml.transform.TransformerFactory" value="com.icl.saxon.TransformerFactoryImpl" />
<sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" />
<sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl" />
-->
<!-- standard parameter to Tomcat operation -->
<sysproperty key="catalina.home" value="${app.server.home.dir}" />
<sysproperty key="catalina.base" value="${app.server.home.dir}" />
<sysproperty key="catalina.config" value="file:///${app.server.conf.dir}/catalina.properties" />
<jvmarg value="-Xms256m" />
<jvmarg value="-Xmx512m" />
<jvmarg value="-XX:PermSize=128m" />
<jvmarg value="-XX:MaxPermSize=128m" />
<classpath>
<pathelement path="${app.server.home.dir}/bin/bootstrap.jar" />
</classpath>
</java>
</target>
</project>