Fixed issue in load-bundle where web installation context was hard coded as ROOT. Now uses project.xml to determine installation context.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2633 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b3d55b32b1
commit
0f42cbcd60
|
|
@ -12,6 +12,13 @@
|
|||
indent="yes"
|
||||
xalan:indent-amount="4"/>
|
||||
|
||||
<!-- Set of templates to create a single build script out of a project's
|
||||
project.xml description file and the individual application.xml for
|
||||
each included module.
|
||||
The generated file is stored into the development base directory.
|
||||
Using ECDC the stylesheet is invoked by ~ecdc/scriptlib/build-configure
|
||||
which in turn is included by ~/ecdc/build.xml. -->
|
||||
|
||||
<!-- Evaluate project.xml, ccm:project tag -->
|
||||
<xsl:template match="ccm:project">
|
||||
<xsl:call-template name="CheckDependencies"/>
|
||||
|
|
@ -99,7 +106,8 @@
|
|||
unless="app.server.lib.dir" />
|
||||
|
||||
<!-- XXX deprecated -->
|
||||
<!-- Used to be the same as CATALINA_HOME and a requirred base for PackageMastertool -->
|
||||
<!-- Used to be the same as CATALINA_HOME and a required base for
|
||||
CCM installation tool PackageMastertool -->
|
||||
<property value="${{env.CCM_HOME}}" name="ccm.home"/>
|
||||
<property value="${{env.CCM_WEBAPP_DIST_DIR}}" name="webapp.dist.dir"/>
|
||||
|
||||
|
|
@ -172,7 +180,8 @@
|
|||
<property value="xml" name="pmd.format"/>
|
||||
<property value="${{build.dir}}/pmd" name="pmd.report.dir"/>
|
||||
<property value="pmd.${{pmd.format}}" name="pmd.report.file"/>
|
||||
<!-- Presumably no longer used does not exist in devel environment, Red Hat made their own
|
||||
<!-- Presumably no longer used does not exist in devel environment,
|
||||
Red Hat made their own
|
||||
<property value="${{shared.lib.dist.dir}}/jdo" name="jdo.lib.dir"/> -->
|
||||
|
||||
<property value="com.arsdigita.persistence.pdl.PDL" name="ddl.generator.classname"/>
|
||||
|
|
|
|||
|
|
@ -21,22 +21,22 @@
|
|||
<project name="load">
|
||||
|
||||
<target name="load-bundle" depends="prepare-load">
|
||||
<echo>Loading bundle from ${this.bundle.folder} into ${ccm.home}</echo>
|
||||
<echo>Loading bundle from ${this.bundle.folder} into ${ccmhome}</echo>
|
||||
|
||||
<java classname="com.arsdigita.packaging.MasterTool" fork="true">
|
||||
<classpath refid="ccm.classpath" />
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="load --packagekeys-file ${this.bundle.folder}/cfg/package-key.list --parameter-file ${this.bundle.folder}/cfg/integration.properties" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="load-bundle-interactive" depends="prepare-load">
|
||||
<echo>Loading bundle ${this.bundle.folder} interactively into ${ccm.home}</echo>
|
||||
<echo>Loading bundle ${this.bundle.folder} interactively into ${ccmhome}</echo>
|
||||
|
||||
<java classname="com.arsdigita.packaging.MasterTool" fork="true">
|
||||
<classpath refid="ccm.classpath" />
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="load --packagekeys-file ${this.bundle.folder}/cfg/package-key.list --interactive --parameter-file ${this.bundle.folder}/cfg/integration.properties" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
</java>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<echo>Registers configuration from ${this.bundle.folder} for ${applications} into registry</echo>
|
||||
<java classname="com.arsdigita.packaging.MasterTool"
|
||||
classpathref="ccm.classpath" fork="true">
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="load ${applications} --config --parameter-file ${this.bundle.folder}/cfg/integration.properties" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
</java>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<echo>Registers configuration from ${this.bundle.folder} for ${applications} into registry, aksing interactivly for values.</echo>
|
||||
<java classname="com.arsdigita.packaging.MasterTool"
|
||||
classpathref="ccm.classpath" fork="true" >
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="load ${applications} --config --interactive --parameter-file ${this.bundle.folder}/cfg/integration.properties" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
</java>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<echo>load ${applications} without further configuration specifications but using build in defaults.</echo>
|
||||
<java classname="com.arsdigita.packaging.MasterTool"
|
||||
classpathref="ccm.classpath" fork="true">
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<!--
|
||||
<sysproperty key="log4j.configuration"
|
||||
value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" />
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
<echo>load --data ${applications}</echo>
|
||||
<java classname="com.arsdigita.packaging.MasterTool"
|
||||
classpathref="ccm.classpath" fork="true">
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="load --data ${applications}" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
</java>
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
<echo>load --data ${applications}</echo>
|
||||
<java classname="com.arsdigita.packaging.MasterTool"
|
||||
classpathref="ccm.classpath" fork="true">
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="load --data ${applications}" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
</java>
|
||||
|
|
@ -104,24 +104,26 @@
|
|||
<echo>load initializers for ${applications} (--init )</echo>
|
||||
<java classname="com.arsdigita.packaging.MasterTool"
|
||||
classpathref="ccm.classpath" fork="true">
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="load --schema ${applications}" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="prepare-load">
|
||||
<property value="${app.server.webapp.dir}/ROOT/WEB-INF/bin/bundle"
|
||||
<!-- The application context has been determined during configure step
|
||||
and is available via included build-projects.xml -->
|
||||
<echo>Application Context: ${this.appContext}</echo>
|
||||
|
||||
<property value="${app.server.webapp.dir}/${this.appContext}/WEB-INF/bin/bundle"
|
||||
name="this.bundle.folder" />
|
||||
<echo>prepare bundle ${this.bundle.folder}</echo>
|
||||
<!-- bundle file applications.cfg replaced by project.xml, now part of bundle
|
||||
<copy file="${this.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" />
|
||||
-->
|
||||
<java classname="org.apache.xalan.xslt.Process" fork="yes" failonerror="true">
|
||||
|
||||
|
||||
<!-- Retrieve list of applications/modules to be installed from
|
||||
project.xml living in the deployed WEB-INF directory -->
|
||||
<java classname="org.apache.xalan.xslt.Process" fork="yes"
|
||||
failonerror="true">
|
||||
<classpath refid="ccm.tools.classpath"/>
|
||||
<arg value="-IN"/>
|
||||
<arg value="${this.bundle.folder}/cfg/project.xml"/>
|
||||
|
|
@ -132,7 +134,12 @@
|
|||
<arg value="-TEXT"/>
|
||||
</java>
|
||||
<loadfile property="applications" srcFile=".tmp.applications.list" />
|
||||
<delete file=".tmp.applications.list"/>
|
||||
<delete file=".tmp.applications.list"/>
|
||||
|
||||
<property name="ccmhome"
|
||||
value="${app.server.webapp.dir}/${this.appContext}"/>
|
||||
<echo>Installation directory: ${ccmhome}</echo>
|
||||
|
||||
<tstamp>
|
||||
<format pattern="yyyymmddhhmmss" property="timestamp" />
|
||||
</tstamp>
|
||||
|
|
@ -141,12 +148,12 @@
|
|||
<!-- 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"/>
|
||||
<!-- <pathelement location="runtime/apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/classes"/> -->
|
||||
<!-- <pathelement location="runtime/apache-tomcat-6.0.18/webapps/${this.appContext}/WEB-INF/classes"/> -->
|
||||
<pathelement location="${app.server.webapp.dir}/${this.appContext}/WEB-INF/classes"/>
|
||||
<!-- <pathelement location="runtime/apache-tomcat-6.0.18/webapps/${this.appContext}/WEB-INF/classes"/> -->
|
||||
<pathelement location="${this.bundle.folder}/res"/>
|
||||
<!-- <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" />
|
||||
<!-- <fileset dir="runtime/apache-tomcat-6.0.18/webapps/${this.appContext}/WEB-INF/lib" includes="**/*.jar" /> -->
|
||||
<fileset dir="${app.server.webapp.dir}/${this.appContext}/WEB-INF/lib" includes="**/*.jar" />
|
||||
</path>
|
||||
|
||||
<!-- Check configuration of debug option and set property appropriately -->
|
||||
|
|
@ -208,7 +215,7 @@
|
|||
|
||||
<java classname="com.arsdigita.packaging.MasterTool" fork="yes">
|
||||
<classpath refid="ccm.classpath" />
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="upgrade ${ccm.upgrade.package} --from-version=${ccm.upgrade.from.version} --to-version=${ccm.upgrade.to.version}" />
|
||||
</java>
|
||||
</target>
|
||||
|
|
@ -259,10 +266,10 @@
|
|||
<java classname="com.arsdigita.packaging.MasterTool" fork="yes">
|
||||
<classpath>
|
||||
<path refid="ccm.tools.classpath" />
|
||||
<pathelement location="${app.server.webapp.dir}/ROOT/WEB-INF/classes" />
|
||||
<fileset dir="${app.server.webapp.dir}/ROOT/WEB-INF/lib" includes="**/*.jar" />
|
||||
<pathelement location="${app.server.webapp.dir}/${this.appContext}/WEB-INF/classes" />
|
||||
<fileset dir="${app.server.webapp.dir}/${this.appContext}/WEB-INF/lib" includes="**/*.jar" />
|
||||
</classpath>
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<arg line="${ccm.parameters}" />
|
||||
</java>
|
||||
</target>
|
||||
|
|
@ -286,10 +293,10 @@
|
|||
<java classname="${ccm.classname}" fork="yes">
|
||||
<classpath>
|
||||
<path refid="ccm.tools.classpath" />
|
||||
<pathelement location="${app.server.webapp.dir}/ROOT/WEB-INF/classes" />
|
||||
<fileset dir="${app.server.webapp.dir}/ROOT/WEB-INF/lib" includes="**/*.jar" />
|
||||
<pathelement location="${app.server.webapp.dir}/${this.appContext}/WEB-INF/classes" />
|
||||
<fileset dir="${app.server.webapp.dir}/${this.appContext}/WEB-INF/lib" includes="**/*.jar" />
|
||||
</classpath>
|
||||
<sysproperty key="ccm.home" value="${ccm.home}" />
|
||||
<sysproperty key="ccm.home" value="${ccmhome}" />
|
||||
<jvmarg value="${app.server.debugger}" />
|
||||
<arg line="${ccm.parameters}" />
|
||||
</java>
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@
|
|||
ccm.tools.rh-jdo.dir
|
||||
ccm.context.dir
|
||||
ccm.home
|
||||
shared.lib.dist.dir
|
||||
webapp.dist.dir
|
||||
shared.lib.dist.dir DEPRECATED prebuild modules no longer used
|
||||
webapp.dist.dir DEPRECATED prebuild modules no longer used
|
||||
|
||||
-->
|
||||
<fail message="Property ccm.project.dir not set "
|
||||
|
|
@ -71,15 +71,11 @@
|
|||
<property name="ccm.tools.rh-jdo.dir" value="${ccm.project.dir}/tools-ng/common/classes"/>
|
||||
|
||||
<echo>Project file: ${ccm.bundle.folder}/cfg/project.xml</echo>
|
||||
<!-- preliminary, must be taken from project.xml -->
|
||||
<property name="ccm.context.dir" value="/ROOT"/>
|
||||
<echo>Installation context: ${ccm.context.dir}</echo>
|
||||
<property name="ccm.home" value="${app.server.webapp.dir}${ccm.context.dir}"/>
|
||||
<echo>CCM home: ${ccm.home}</echo>
|
||||
|
||||
|
||||
<!-- deprecated used by prebuild modules only -->
|
||||
<!-- DEPRECATED used by prebuild modules only -->
|
||||
<property name="shared.lib.dist.dir" value="${ccm.tools.lib.dir}"/>
|
||||
<!-- deprecated used by prebuild modules only -->
|
||||
<!-- DEPRECATED used by prebuild modules only -->
|
||||
<property name="webapp.dist.dir" value="${ccm.project.dir}/distribution"/>
|
||||
|
||||
<!-- http://antelope.tigris.org/ -->
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
<!-- Building ccm.classpath which used to contain a list with dirs
|
||||
to include into the classpath for each module included in the
|
||||
project (~/build/classes ~/build/sql ~/lib ~/pdl ) -->
|
||||
<!-- Usage unkown, probably required for Eclipse IDE? -->
|
||||
<!--
|
||||
<xslt style="${ccm.tools.xsl.dir}/classpath-template.xsl" in="project.xml"
|
||||
out="ccm.classpath" classpathref="ccm.tools.classpath" force="yes">
|
||||
|
|
|
|||
|
|
@ -77,10 +77,10 @@
|
|||
|
||||
<!-- 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}" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue