verschied Fehler beseitigt

git-svn-id: https://svn.libreccm.org/ccm/trunk@123 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2009-03-29 13:57:07 +00:00
parent cc42e99d02
commit 06db30e901
8 changed files with 242 additions and 149 deletions

View File

@ -52,28 +52,40 @@
</xsl:template> </xsl:template>
<xsl:template name="SharedProperties"> <xsl:template name="SharedProperties">
<!-- Setting the layout of the basic build environment -->
<xsl:variable name="name" select="@name"/> <xsl:variable name="name" select="@name"/>
<xsl:variable name="prettyName" select="@prettyName"/> <xsl:variable name="prettyName" select="@prettyName"/>
<!-- just in case: <!-- just in case:
check environment to set properties not already set by parent scripts --> check environment to set properties not already set by parent scripts -->
<property environment="env"/> <property environment="env"/>
<!-- Development libraries requirred by compile / build / deploy step --> <!-- Development libraries requirred by compile / build / deploy step -->
<property value="${{env.CCM_DEVEL_LIBS}}" name="ccm.devel.lib.dir"/> <property value="${{env.CCM_BUILD_LIBS}}" name="ccm.build.lib.dir"/>
<fail message="ccm.build.lib.dir or CCM_DEVEL_LIBS not set. Please check the invoking build.xml script."
unless="ccm.build.lib.dir" />
<!-- Development libraries requirred by development tools (ant scripts) --> <!-- Development libraries requirred by development tools (ant scripts) -->
<property value="${{env.CCM_TOOLS_LIBS}}" name="ccm.tools.lib.dir"/> <property value="${{env.CCM_TOOLS_LIBS}}" name="ccm.tools.lib.dir"/>
<fail message="ccm.tools.lib.dir or CCM_TOOLS_LIBS not set. Please check the invoking build.xml script."
unless="ccm.tools.lib.dir" />
<!-- Development libraries requirred by Red Hat JDO enhancer ANT task preliminary! --> <!-- Development libraries requirred by Red Hat JDO enhancer ANT task preliminary! -->
<property value="${{env.CCM_TOOLS_JDO}}" name="ccm.tools.rh-jdo.dir"/> <property value="${{env.CCM_TOOLS_JDO}}" name="ccm.tools.rh-jdo.dir"/>
<fail message="ccm.tools.rh-jdo.dir or CCM_TOOLS_JDO not set. Please check the invoking build.xml script."
<property value="${{env.CATALINA_HOME}}" name="catalina.home.dir"/> unless="ccm.tools.rh-jdo.dir" />
<!-- Base directory of the application server to deploy to, i.e. CATALINA_HOME -->
<property value="${{env.APP_SERVER_HOME}}" name="app.server.home.dir"/>
<fail message="app.server.home.dir or APP_SERVER_HOME not set. Please check the invoking build.xml script."
unless="app.server.home.dir" />
<!-- Shared Lib directory for use by several web applications of the application server -->
<property value="${{env.APP_SERVER_LIB}}" name="app.server.lib.dir"/>
<fail message="app.server.lib.dir or APP_SERVER_LIB not set. Please check the invoking build.xml script."
unless="app.server.lib.dir" />
<!-- XXX deprecated -->
<!-- Used to be the same as CATALINA_HOME and a requirred base for PackageMastertool -->
<property value="${{env.CCM_HOME}}" name="ccm.home"/> <property value="${{env.CCM_HOME}}" name="ccm.home"/>
<property value="${{env.CCM_WEBAPP_DIST_DIR}}" name="webapp.dist.dir"/> <property value="${{env.CCM_WEBAPP_DIST_DIR}}" name="webapp.dist.dir"/>
<!-- no longer valid! Still used by prebuild modules, has to be adjusted --> <!-- no longer valid! Still used by prebuild modules, has to be adjusted -->
<property value="${{env.CCM_SHARED_LIB_DIST_DIR}}" name="shared.lib.dist.dir"/> <property value="${{env.CCM_SHARED_LIB_DIST_DIR}}" name="shared.lib.dist.dir"/>
<!-- no longer used
<property value="${{env.CCM_CONFIG_HOME}}" name="ccm.config.dir"/> -->
<!-- no longer used
<property value="${{env.CCM_TOOLS_HOME}}" name="ccm.tools.dir"/> -->
<property value="ant.properties" name="property.file"/> <property value="ant.properties" name="property.file"/>
<property file="${{property.file}}"/> <property file="${{property.file}}"/>
@ -354,7 +366,7 @@
<xsl:variable name="buildRequires" <xsl:variable name="buildRequires"
select="/ccm:project/ccm:application[@name = $fullname]/ccm:dependencies/ccm:buildRequires"/> select="/ccm:project/ccm:application[@name = $fullname]/ccm:dependencies/ccm:buildRequires"/>
<xsl:if test="count($buildRequires) > 0"> <xsl:if test="count($buildRequires) > 0">
<fileset dir="${{ccm.devel.lib.dir}}"> <fileset dir="${{ccm.build.lib.dir}}">
<xsl:for-each select="$buildRequires"> <xsl:for-each select="$buildRequires">
<xsl:variable name="name" select="@name"/> <xsl:variable name="name" select="@name"/>
<xsl:variable name="version" select="@version"/> <xsl:variable name="version" select="@version"/>
@ -412,8 +424,13 @@
</xsl:for-each> </xsl:for-each>
<!-- The app clean deploy tasks --> <!-- The app clean deploy tasks -->
<target name="clean-deploy" depends="init" description="Cleans out the deployment directory"> <target name="clean-deploy" depends="init" description="Cleans out the deployment directory">
<!-- XXX OOPS must be replaced by the individual files which have been copied !
<delete dir="${{deploy.shared.lib.dir}}"/> <delete dir="${{deploy.shared.lib.dir}}"/>
<delete dir="${{deploy.private.lib.dir}}"/> -->
<!-- is now part of the deploy.webapp.dir
<delete dir="${{deploy.external.lib.dir}}"/>
-->
<!-- XXX OOPS, works for now, but must be replaced by individual files! -->
<delete dir="${{deploy.webapp.dir}}"/> <delete dir="${{deploy.webapp.dir}}"/>
</target> </target>
<xsl:call-template name="LocalGroupingTarget"> <xsl:call-template name="LocalGroupingTarget">
@ -481,7 +498,7 @@
<include name="jdori.jar"/> <include name="jdori.jar"/>
<include name="jdori-enhancer.jar"/> <include name="jdori-enhancer.jar"/>
</fileset> </fileset>
<fileset dir="${{ccm.devel.lib.dir}}"> <fileset dir="${{ccm.build.lib.dir}}">
<include name="xmlParserAPIs.jar"/> <include name="xmlParserAPIs.jar"/>
</fileset> </fileset>
</classpath> </classpath>
@ -703,9 +720,10 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!-- DEPRECATED, server/common not present in Tomcat 6 -->
<xsl:template name="TargetJSPCompilerClasspath"> <xsl:template name="TargetJSPCompilerClasspath">
<classpath> <classpath>
<fileset dir="${{catalina.home.dir}}"> <fileset dir="${{app.server.home.dir}}">
<include name="server/lib/*.jar"/> <include name="server/lib/*.jar"/>
<include name="common/lib/*.jar"/> <include name="common/lib/*.jar"/>
</fileset> </fileset>
@ -728,7 +746,7 @@
<target name="jsp-compiler-check"> <target name="jsp-compiler-check">
<condition property="jsp.compiler.available"> <condition property="jsp.compiler.available">
<and> <and>
<available file="${{catalina.home.dir}}" type="dir"/> <available file="${{app.server.home.dir}}" type="dir"/>
<available classname="org.apache.jasper.JspC"> <available classname="org.apache.jasper.JspC">
<xsl:call-template name="TargetJSPCompilerClasspath"/> <xsl:call-template name="TargetJSPCompilerClasspath"/>
</available> </available>
@ -837,10 +855,11 @@
</xsl:for-each> </xsl:for-each>
</target> </target>
</xsl:if> </xsl:if>
<!-- Deploy libs --> <!-- Deploy external libs, not developed by the CCM project.
Located in a modules lib directory. -->
<target name="deploy-lib-{$name}" depends="init"> <target name="deploy-lib-{$name}" depends="init">
<mkdir dir="${{deploy.private.lib.dir}}"/> <mkdir dir="${{deploy.external.lib.dir.{$name}}}"/>
<copy todir="${{deploy.private.lib.dir}}"> <copy todir="${{deploy.external.lib.dir.{$name}}}" preservelastmodified="true">
<fileset dir="{$name}"> <fileset dir="{$name}">
<include name="${{lib.dir}}/**"/> <include name="${{lib.dir}}/**"/>
</fileset> </fileset>
@ -934,7 +953,7 @@
<include name="{$name}-{$version}-system.jar"/> <include name="{$name}-{$version}-system.jar"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="${{deploy.private.lib.dir}}" preservelastmodified="true"> <copy todir="${{deploy.external.lib.dir.{$name}}}" preservelastmodified="true">
<fileset dir="${{apps.{$name}.location}}"> <fileset dir="${{apps.{$name}.location}}">
<include name="{$name}-{$version}/**"/> <include name="{$name}-{$version}/**"/>
</fileset> </fileset>
@ -1480,19 +1499,27 @@
<condition property="deploy.webapp.dir" value="${{deploy.dir}}/webapps"> <condition property="deploy.webapp.dir" value="${{deploy.dir}}/webapps">
<not><isset property="deploy.webapp.dir"/></not> <not><isset property="deploy.webapp.dir"/></not>
</condition> </condition>
<!-- deploy.conf.dir used to deploy the log4j.properties file to a
non-standard location CATALINA_HOME/conf, which is not meant to
hold user or webapps specific configuration files.
not used anymore
<condition property="deploy.conf.dir" value="${{deploy.dir}}/conf"> <condition property="deploy.conf.dir" value="${{deploy.dir}}/conf">
<not><isset property="deploy.conf.dir"/></not> <not><isset property="deploy.conf.dir"/></not>
</condition> </condition>
<condition property="deploy.shared.lib.dir" value="${{deploy.dir}}/webapps/WEB-INF/lib"> -->
<condition property="deploy.shared.lib.dir" value="${{app.server.lib.dir}}">
<not><isset property="deploy.shared.lib.dir"/></not> <not><isset property="deploy.shared.lib.dir"/></not>
</condition> </condition>
<!-- deploy.private.lib.dir might be no longer used.
Previouls used for external libs, too.
<condition property="deploy.private.lib.dir" value="${{deploy.dir}}/webapps/WEB-INF/lib"> <condition property="deploy.private.lib.dir" value="${{deploy.dir}}/webapps/WEB-INF/lib">
<not><isset property="deploy.private.lib.dir"/></not> <not><isset property="deploy.private.lib.dir"/></not>
</condition> </condition>
<condition property="deploy.shared.classes.dir" value="${{deploy.dir}}/webapps/WEB-INF/classes"> -->
<condition property="deploy.shared.classes.dir" value="${{app.server.lib.dir}}">
<not><isset property="deploy.shared.classes.dir"/></not> <not><isset property="deploy.shared.classes.dir"/></not>
</condition> </condition>
<condition property="deploy.system.jars.dir" value="${{deploy.dir}}/webapps/WEB-INF/system"> <condition property="deploy.system.jars.dir" value="${{app.server.lib.dir}}/system">
<not><isset property="deploy.system.jars.dir"/></not> <not><isset property="deploy.system.jars.dir"/></not>
</condition> </condition>
<condition property="deploy.war.dir" value="${{deploy.dir}}/webapps"> <condition property="deploy.war.dir" value="${{deploy.dir}}/webapps">
@ -1507,21 +1534,27 @@
<xsl:variable name="shared" select="$application/@shared"/> <xsl:variable name="shared" select="$application/@shared"/>
<property value="${{deploy.webapp.dir}}/${{apps.{$name}.webapp.name}}" name="deploy.dir.{$name}"/> <property value="${{deploy.webapp.dir}}/${{apps.{$name}.webapp.name}}" name="deploy.dir.{$name}"/>
<!-- --> <!--
<xsl:choose> <xsl:choose>
<xsl:when test="$shared = 'false'"> <xsl:when test="$shared = 'false'">
-->
<!-- will copy modules classes/libs into module's WEB-INF directory. Works. --> <!-- will copy modules classes/libs into module's WEB-INF directory. Works. -->
<property value="${{deploy.dir.{$name}}}/WEB-INF/classes" name="deploy.classes.dir.{$name}"/> <property value="${{deploy.dir.{$name}}}/WEB-INF/classes" name="deploy.classes.dir.{$name}"/>
<property value="${{deploy.dir.{$name}}}/WEB-INF/lib" name="deploy.lib.dir.{$name}"/> <property value="${{deploy.dir.{$name}}}/WEB-INF/lib" name="deploy.lib.dir.{$name}"/>
<!-- --> <property value="${{deploy.dir.{$name}}}/WEB-INF/lib" name="deploy.external.lib.dir.{$name}"/>
<!--
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
-->
<!-- will copy modules classes/libs into shared directory. 6.1 - 6.4: webapps/WEB-INF non-standard <!-- will copy modules classes/libs into shared directory. 6.1 - 6.4: webapps/WEB-INF non-standard
up to 6.4 the only metheod that works. --> up to 6.4 the only metheod that works.
<property value="${{deploy.shared.classes.dir}}" name="deploy.classes.dir.{$name}"/> <property value="${{deploy.shared.classes.dir}}" name="deploy.classes.dir.{$name}"/>
<property value="${{deploy.shared.lib.dir}}" name="deploy.lib.dir.{$name}"/> <property value="${{deploy.shared.lib.dir}}" name="deploy.lib.dir.{$name}"/>
<property value="${{deploy.shared.lib.dir}}" name="deploy.external.lib.dir.{$name}"/> -->
<!--
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
-->
<property value="${{deploy.dir.{$name}}}/WEB-INF/src" name="deploy.src.dir.{$name}"/> <property value="${{deploy.dir.{$name}}}/WEB-INF/src" name="deploy.src.dir.{$name}"/>
<property value="${{deploy.dir.{$name}}}/WEB-INF/doc" name="deploy.doc.dir.{$name}"/> <property value="${{deploy.dir.{$name}}}/WEB-INF/doc" name="deploy.doc.dir.{$name}"/>
@ -1531,19 +1564,26 @@
<property value="${{deploy.dir.{$name}}}/WEB-INF/bin" name="deploy.bin.dir.{$name}"/> <property value="${{deploy.dir.{$name}}}/WEB-INF/bin" name="deploy.bin.dir.{$name}"/>
</xsl:for-each> </xsl:for-each>
<!-- xml version of log4j configuration not supported
<condition property="log4j.configuration.sysproperty" value="file://${{ccm.home}}/conf/log4j.xml"> <condition property="log4j.configuration.sysproperty" value="file://${{ccm.home}}/conf/log4j.xml">
<and> <and>
<not><isset property="log4j.configuration.sysproperty"/></not> <not><isset property="log4j.configuration.sysproperty"/></not>
<available file="${{ccm.home}}/conf/log4j.xml"/> <available file="${{ccm.home}}/conf/log4j.xml"/>
</and> </and>
</condition> </condition>
-->
<!-- Non standard location of log4j configuration no longer supported as of GE 6.5
<condition property="log4j.configuration.sysproperty" value="file://${{ccm.home}}/conf/log4j.properties"> <condition property="log4j.configuration.sysproperty" value="file://${{ccm.home}}/conf/log4j.properties">
<and> <and>
<not><isset property="log4j.configuration.sysproperty"/></not> <not><isset property="log4j.configuration.sysproperty"/></not>
<available file="${{ccm.home}}/conf/log4j.properties"/> <available file="${{ccm.home}}/conf/log4j.properties"/>
</and> </and>
</condition> </condition>
<condition property="log4j.configuration.sysproperty" value="/log4j.properties"> -->
<!-- location of log4j configuration is handled inside the running CCM application.
But may be requirred for junit tests? Otherwise not needed
-->
<condition property="log4j.configuration.sysproperty" value="/WEB-INF/conf/log4j.properties">
<and> <and>
<not><isset property="log4j.configuration.sysproperty"/></not> <not><isset property="log4j.configuration.sysproperty"/></not>
</and> </and>

View File

@ -1,68 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project name="openccm" default="usage"> <project name="CCM Content and Collaboration Management" default="usage">
<description>Structured and DB backed Content and Collaboration Management System</description> <description>Structured and DB backed Content and Collaboration Management System</description>
<!-- Base script and central entry point <!-- Base script and central entry point
manages all the elements of the Easy CCM Development Configuration (ECDC) manages all the elements of the Easy CCM Development Configuration (ECDC)
build system. It does nothing really by itself but delegates to build system. It does nothing really by itself but delegates to
specialized scripts. specialized scripts.
This file must be copied along with the other *.xml and *.properties into This file must be copied along with the other *.xml and *.properties into
the base development projekt directory (usually trunk) --> the base development projekt directory (usually trunk) -->
<!-- base directory of the development environment <!-- base directory of the development environment
default is current directory (sysprop user.dir) --> default is current directory (sysprop user.dir) -->
<property name="ccm.project.dir" value="${user.dir}" /> <property name="ccm.project.dir" value="${user.dir}" />
<echo message="Project base directory is ${ccm.project.dir} "/>
<!-- directory layout of the ECDC development environment -->
<!-- script contains additional xml scripts to do the real work -->
<property name="ccm.ecdc.script.dir" value="${ccm.project.dir}/tools-ng/ecdc/scriptlib" />
<!-- conf xml scripts containing default configuration values -->
<property name="ccm.ecdc.conf.dir" value="${ccm.project.dir}/tools-ng/ecdc/conf" />
<!-- bundles contains software to be installed (e.g. Tomcat servlet container) -->
<property name="ccm.ecdc.bundles.dir" value="${ccm.project.dir}/tools-ng/ecdc/bundles" />
<!-- import of xml scripts to do the real work --> <!-- directory layout of the ECDC development environment -->
<!-- build-common <!-- script contains additional xml scripts to do the real work -->
defines essential system variables and reads the configuration property files: <property name="ccm.ecdc.script.dir" value="${ccm.project.dir}/tools-ng/ecdc/scriptlib" />
runtime.property - defines the servlet container runtime for testing
build.properties - defines details for building (compiler options, etc)
ccm.properties - defines CCM projet details, esp. the bundle file which
contains configuration details and the web.xml file -->
<import file="${ccm.ecdc.script.dir}/build-common.xml" />
<!-- build-runtime <!-- conf xml scripts containing default configuration values -->
prepare the test runtime environment . --> <property name="ccm.ecdc.conf.dir" value="${ccm.project.dir}/tools-ng/ecdc/conf" />
<import file="${ccm.ecdc.script.dir}/build-runtime.xml" />
<!-- build-configure <!-- bundles contains software to be installed (e.g. Tomcat servlet container) -->
its task configure must be executed before any build / deploy can happen <property name="ccm.ecdc.bundles.dir" value="${ccm.project.dir}/tools-ng/ecdc/bundles" />
it generates the build targets for the project specified in project.xml -->
<import file="${ccm.ecdc.script.dir}/build-configure.xml" />
<!-- build-ccm
essential CCM post build tasks: load database etc. -->
<import file="${ccm.ecdc.script.dir}/build-ccm.xml" />
<!-- build-projects <!-- import of xml scripts to do the real work -->
is generated by target configure in build-configure and
contains all the task to do the real work --> <!-- build-common
defines essential system variables and reads the configuration property files:
runtime.property - defines the servlet container runtime for testing
build.properties - defines details for building (compiler options, etc)
ccm.properties - defines CCM projet details, esp. the bundle file which
contains configuration details and the web.xml file -->
<import file="${ccm.ecdc.script.dir}/build-common.xml" />
<!-- build-runtime
prepare the test runtime environment . -->
<import file="${ccm.ecdc.script.dir}/build-runtime.xml" />
<!-- build-configure
its task configure must be executed before any build / deploy can happen
it generates the build targets for the project specified in project.xml -->
<import file="${ccm.ecdc.script.dir}/build-configure.xml" />
<!-- build-ccm
essential CCM post build tasks: load database etc. -->
<import file="${ccm.ecdc.script.dir}/build-ccm.xml" />
<!-- build-projects
is generated by target configure in build-configure and
contains all the task to do the real work -->
<if> <if>
<available file="build-projects.xml"/> <available file="build-projects.xml"/>
<then> <then>
<import file="build-projects.xml" /> <import file="build-projects.xml" />
</then> </then>
<else> <else>
<import file="${ccm.ecdc.script.dir}/build-projects-dummy.xml" /> <import file="${ccm.ecdc.script.dir}/build-projects-dummy.xml" />
<echo> <echo>
You may not have been executed the preparational steps: You may not have been executed the preparational steps:
- - configure (to create the compile/build/deploy/etc scripts - - configure (to create the compile/build/deploy/etc scripts
</echo> </echo>
</else> </else>
</if> </if>
</project> </project>

View File

@ -1,4 +1,10 @@
## ##
## build.properties
##
## Sets configuration properties for the junit test environment and
## compiler options for the build process (previously ant.properties)
## DO NOT EDIT THIS FILE. ## DO NOT EDIT THIS FILE.
## ##
## To update the properties of this file, create a separate properties file ## To update the properties of this file, create a separate properties file
@ -10,7 +16,7 @@
## TESTING ################################################# ## TESTING #################################################
# This must point to an initialization file, such as enterprise.init # This must point to an initialization file, such as enterprise.init
test.initscript=${app.server.parent.dir}/conf/log4j.properties # test.initscript=
# This should be set to the base URL of your Web server, # This should be set to the base URL of your Web server,
# so HTTP unit tests can find it. # so HTTP unit tests can find it.

View File

@ -1,4 +1,7 @@
## ##
## runtime.properties
##
##
## DO NOT EDIT THIS FILE. ## DO NOT EDIT THIS FILE.
## ##
## To update the properties of this file, create a separate properties file ## To update the properties of this file, create a separate properties file
@ -6,6 +9,11 @@
## properties to overwrite. ## properties to overwrite.
## ##
##
## Specifies the supported application servers
## and the application server directory locations
##
## ##
## Server Type ## Server Type
## ##
@ -13,22 +21,25 @@
app.server.vendor=apache app.server.vendor=apache
app.server.type=tomcat app.server.type=tomcat
# Tomcat version 5.5 not yet supported! # Tomcat version 5.5 not yet supported!
#app.server.version=5.5.27 # app.server.version=5.5.27
app.server.version=6.0.18 app.server.version=6.0.18
app.server.bundles.name=${app.server.vendor}-${app.server.type}-${app.server.version}
app.server.bundles.zip=${ccm.ecdc.bundles.dir}/${app.server.bundles.name}.zip
## ##
## Server Directory ## Server Directory
## ##
app.server.bundles.name=${app.server.vendor}-${app.server.type}-${app.server.version}
<!-- NOT NEEDED: app.server.bundles.dir=${tools.bundles.dir}/bundles -->
app.server.bundles.zip=${ccm.ecdc.bundles.dir}/${app.server.bundles.name}.zip
app.server.parent.dir=${ccm.project.dir}/runtime app.server.parent.dir=${ccm.project.dir}/runtime
app.server.deploy.dir=${app.server.parent.dir}/${app.server.bundles.name} app.server.deploy.dir=${app.server.parent.dir}/${app.server.bundles.name}
app.server.conf.dir=${app.server.deploy.dir}/conf app.server.home.dir=${app.server.parent.dir}/${app.server.bundles.name}
app.server.conf.dir=${app.server.home.dir}/conf
# shared lib used by several web apps
app.server.lib.dir=${app.server.home.dir}/lib
app.server.webapp.dir=${app.server.home.dir}/webapps
webapp.dist.dir=${app.server.deploy.dir}/webapps catalina.home.dir=${app.server.home.dir}
## nolonger needed, handled by Mastertool catalina.base.dir=${app.server.deploy.dir}
## webapp.registry.dir=${webapp.conf.dir}/registry

View File

@ -3,5 +3,5 @@
## The defaults are shown commented out ## The defaults are shown commented out
## Usually you will define your own specific bundle! ## Usually you will define your own specific bundle!
#bundle.folder=${project.dir}/ccm-ldn-aplaws/bundles/complete #ccm.bundle.folder=${ccm.project.dir}/ccm-ldn-aplaws/bundles/complete

View File

@ -4,7 +4,8 @@
ccm.project.dir: base dir of the development project ccm.project.dir: base dir of the development project
app.server.bundles.zip name of the installation file 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.parent.dir name of the dir to install into the server into
app.server.deploy.dir dir the server are installed into (i.e. CATALINA_HOME) 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.conf.dir name of the servers configuration dir
webapp.dist.dir distribution dir for web applications --> webapp.dist.dir distribution dir for web applications -->
@ -13,7 +14,7 @@
<target name="load-bundle"> <target name="load-bundle">
<echo>Loading bundle ${ccm.bundle.folder} into ${ccm.home}</echo> <echo>Loading bundle ${ccm.bundle.folder} into ${ccm.home}</echo>
<copy file="${ccm.bundle.folder}/cfg/applications.cfg" <copy file="${ccm.bundle.folder}/cfg/applications.cfg"
tofile=".tmp.applications.cfg" overwrite="yes" /> tofile=".tmp.applications.cfg" overwrite="yes" />
<replaceregexp file=".tmp.applications.cfg" match="#.*" replace="" byline="true" /> <replaceregexp file=".tmp.applications.cfg" match="#.*" replace="" byline="true" />
<replaceregexp file=".tmp.applications.cfg" <replaceregexp file=".tmp.applications.cfg"
match="[ \t\r\n]+" replace=" " flags="gs" /> match="[ \t\r\n]+" replace=" " flags="gs" />
@ -24,18 +25,32 @@
</tstamp> </tstamp>
<!-- nolonger in use <!-- nolonger in use
<move file="${app.server.conf.dir}/registry" <move file="${app.server.conf.dir}/registry"
tofile="${app.server.conf.dir}/registry.${timestamp}" preservelastmodified="yes" tofile="${app.server.conf.dir}/registry.${timestamp}" preservelastmodified="yes"
failonerror="no" verbose="true" /> failonerror="no" verbose="true" />
--> -->
<java classname="com.arsdigita.packaging.MasterTool"
classpathref="ccm.classpath" fork="yes"> <!-- classpath used by command line tools load-bundle, update, ... -->
<sysproperty key="ccm.home" value="${ccm.home}" /> <path id="ccm.classpath">
<sysproperty key="log4j.configuration" <path refid="ccm.tools.classpath"/>
value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" /> <!-- <pathelement location="runtime/apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/classes"/> -->
<sysproperty key="java.protocol.handler.pkgs" <pathelement location="${app.server.webapp.dir}/ROOT/WEB-INF/classes"/>
value="${java.protocol.handler.pkgs}" /> <!-- <fileset dir="runtime/apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/lib" includes="**/*.jar" /> -->
<arg line="load ${applications} --parameter-file ${bundle.folder}/cfg/integration.properties" /> <fileset dir="${app.server.webapp.dir}/ROOT/WEB-INF/lib" includes="**/*.jar" />
</path>
<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> </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>
<target name="load-init"> <target name="load-init">
@ -43,10 +58,12 @@
<java classname="com.arsdigita.packaging.MasterTool" <java classname="com.arsdigita.packaging.MasterTool"
classpathref="ccm.classpath" fork="yes"> classpathref="ccm.classpath" fork="yes">
<sysproperty key="ccm.home" value="${ccm.home}" /> <sysproperty key="ccm.home" value="${ccm.home}" />
<!--
<sysproperty key="log4j.configuration" <sysproperty key="log4j.configuration"
value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" /> value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" />
<sysproperty key="java.protocol.handler.pkgs" <sysproperty key="java.protocol.handler.pkgs"
value="${java.protocol.handler.pkgs}" /> value="${java.protocol.handler.pkgs}" />
-->
<arg line="load ${applications} --init" /> <arg line="load ${applications} --init" />
</java> </java>
</target> </target>
@ -56,10 +73,12 @@
<java classname="com.arsdigita.packaging.MasterTool" <java classname="com.arsdigita.packaging.MasterTool"
classpathref="ccm.classpath" fork="yes"> classpathref="ccm.classpath" fork="yes">
<sysproperty key="ccm.home" value="${ccm.home}" /> <sysproperty key="ccm.home" value="${ccm.home}" />
<!--
<sysproperty key="log4j.configuration" <sysproperty key="log4j.configuration"
value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" /> value="file:runtime/${app.server.bundles.name}/conf/log4j.xml" />
<sysproperty key="java.protocol.handler.pkgs" <sysproperty key="java.protocol.handler.pkgs"
value="${java.protocol.handler.pkgs}" /> value="${java.protocol.handler.pkgs}" />
-->
<arg line="load ${applications}" /> <arg line="load ${applications}" />
</java> </java>
</target> </target>

View File

@ -2,13 +2,29 @@
<project name="common"> <project name="common">
<property name="ccm.tools.xsl.dir" value="${ccm.project.dir}/tools-ng/common/xsl" /> <!-- build-common
defines essential system variables and reads configuration property
files which configure the specialized scripts. -->
<fail message="Property ccm.project.dir not set "
unless="ccm.project.dir" />
<!-- several java programs needed for processing, esp. xml files--> <condition property="correct.ant.version">
<property name="ccm.tools.lib.dir" value="${ccm.project.dir}/tools-ng/common/lib" /> <antversion atleast="1.7.0" />
<path id="ccm.tools.classpath"> </condition>
<fileset dir="${ccm.tools.lib.dir}" includes="*.jar" />
</path> <!-- xsl schemas to generate build tools for the specific module set -->
<property name="ccm.tools.xsl.dir"
value="${ccm.project.dir}/tools-ng/common/xsl" />
<!-- xsd schemas to validate xml configuration files -->
<property name="ccm.tools.xsd.dir"
value="${ccm.project.dir}/tools-ng/common/xsd" />
<!-- several java programs needed for processing, esp. xml files -->
<property name="ccm.tools.lib.dir"
value="${ccm.project.dir}/tools-ng/common/lib" />
<path id="ccm.tools.classpath">
<fileset dir="${ccm.tools.lib.dir}" includes="*.jar" />
</path>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"> <taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath> <classpath>
@ -17,50 +33,38 @@
</taskdef> </taskdef>
<!-- Read configuration files. First from project dir, then add <!-- Read configuration files.
requirred defaults from ecdc directory --> First from project dir, then add requirred defaults from ecdc dir -->
<property file="${ccm.project.dir}/local.runtime.properties" />
<property file="${ccm.ecdc.conf.dir}/runtime.properties" />
<property file="${ccm.project.dir}/local.build.properties" /> <!-- Specifies the test application server runtime managed by build-runtime.xml
<property file="${ccm.ecdc.conf.dir}/build.properties" /> Provides app.server.*.dir props used by build-runtime and build-project -->
<property file="${ccm.project.dir}/local.runtime.properties" />
<property file="${ccm.ecdc.conf.dir}/runtime.properties" />
<property file="${ccm.project.dir}/local.ccm.properties" /> <!-- Specifies the compiler & build options and the junit test environment
<property file="${ccm.ecdc.conf.dir}/ccm.properties" /> Provides compile.* build.* test.* properties -->
<property file="${ccm.project.dir}/local.build.properties" />
<property file="${ccm.ecdc.conf.dir}/build.properties" />
<path id="ccm.classpath"> <!-- Specifies the ccm build environment
<path refid="ccm.tools.classpath"/> Provides ccm.* -->
<pathelement path="${webapp.dist.dir}/WEB-INF/classes"/> <property file="${ccm.project.dir}/local.ccm.properties" />
<fileset dir="${webapp.dist.dir}/WEB-INF/lib" includes="*.jar" /> <property file="${ccm.ecdc.conf.dir}/ccm.properties" />
</path>
<condition property="correct.ant.version"> <property name="ccm.home" value="${app.server.deploy.dir}"/>
<antversion atleast="1.7.0" /> <property name="ccm.build.lib.dir" value="${ccm.project.dir}/tools-ng/devel/lib"/>
</condition> <property name="ccm.tools.lib.dir" value="${ccm.project.dir}/tools-ng/common/lib"/>
<property name="ccm.tools.rh-jdo.dir" value="${ccm.project.dir}/tools-ng/common/classes"/>
<property name="deploy.dir" value="${app.server.deploy.dir}"/>
<echo> <!-- deprecated? used by prebuild modules only -->
ccm.project.dir is ${ccm.project.dir} <property name="shared.lib.dist.dir" value="${ccm.tools.lib.dir}"/>
</echo> <!-- deprecated? used by prebuild modules only -->
<property name="ccm.devel.lib.dir" value="${ccm.project.dir}/tools-ng/devel/lib"/> <property name="webapp.dist.dir" value="${ccm.project.dir}/distribution"/>
<property name="ccm.tools.lib.dir" value="${ccm.project.dir}/tools-ng/common/lib"/>
<property name="ccm.tools.rh-jdo.dir" value="${ccm.project.dir}/tools-ng/common/classes"/>
<property name="ccm.home" value="${app.server.deploy.dir}"/>
<property name="catalina.home" value="${app.server.deploy.dir}"/>
<property name="j2ee.webapp.dir" value="${app.server.deploy.dir}/webapps/ccm"/>
<property name="deploy.dir" value="${app.server.deploy.dir}"/>
<property name="ccm.config.dir" value="${ccm.project.dir}/tools-ng/common"/> <!-- http://antelope.tigris.org/ -->
<property name="shared.lib.dist.dir" value="${ccm.tools.lib.dir}"/>
<property name="ccm.tools.dir" value="${ccm.project.dir}"/>
<property name="webapp.dist.dir" value="${ccm.project.dir}/distribution"/>
<echo> property ccm.home is ${ccm.home}
property ccm.config.dir is ${ccm.config.dir}
</echo>
<!-- http://antelope.tigris.org/ -->
<!-- <!--
<taskdef classpathref="ccm.tools.classpath" resource="ise/antelope/tasks/antlib.xml" /> <taskdef classpathref="ccm.tools.classpath" resource="ise/antelope/tasks/antlib.xml" />
--> -->
</project> </project>

View File

@ -4,7 +4,8 @@
ccm.project.dir: base dir of the development project (environment) ccm.project.dir: base dir of the development project (environment)
app.server.bundles.zip name of the installation file 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.parent.dir name of the dir to install into the server into
app.server.deploy.dir dir the server is to be installed into (i.e. CATALINA_HOME) app.server.home.dir dir the server is to be installed into (i.e. CATALINA_HOME)
app.server.deploy.dir dir the server is to be installed into (i.e. CATALINA_BASE)
app.server.conf.dir name of the servers configuration dir app.server.conf.dir name of the servers configuration dir
webapp.dist.dir distribution dir for ccm web application --> webapp.dist.dir distribution dir for ccm web application -->
@ -18,17 +19,18 @@
<exclude name="**/webapps/**" /> <exclude name="**/webapps/**" />
</patternset> </patternset>
</unzip> </unzip>
<!-- Nolonger NEEDED! when lib files are copied to another location --> <!-- Nolonger NEEDED! when lib files are copied to another location
<replaceregexp file="${app.server.conf.dir}/catalina.properties" match="shared.loader=(.*)" <replaceregexp file="${app.server.conf.dir}/catalina.properties" match="shared.loader=(.*)"
replace="shared.loader=\1,${catalina.base}/webapps/WEB-INF/classes,${catalina.base}/webapps/WEB-INF/lib/*.jar" replace="shared.loader=\1,${catalina.base}/webapps/WEB-INF/classes,${catalina.base}/webapps/WEB-INF/lib/*.jar"
byline="true" /> byline="true" />
-->
<!-- Copy additional files needed for operation --> <!-- Copy additional files needed for operation -->
<copy file="ccm-core/lib/xercesImpl.jar" <copy file="ccm-core/lib/xercesImpl.jar"
todir="${app.server.deploy.dir}/common/endorsed" preservelastmodified="true"/> todir="${app.server.home.dir}/lib/endorsed" preservelastmodified="true"/>
<copy file="tools-ng/dev-lib/ojdbc14.jar" <copy file="tools-ng/devel/lib/ojdbc14.jar"
todir="${app.server.deploy.dir}/lib" preservelastmodified="true"/> todir="${app.server.home.dir}/lib" preservelastmodified="true"/>
<copy file="tools-ng/dev-lib/postgresql-jdbc-8.2.506.jar" <copy file="tools-ng/devel/lib/postgresql-jdbc-8.2.506.jar"
todir="${app.server.deploy.dir}/lib" preservelastmodified="true"/> todir="${app.server.home.dir}/lib" preservelastmodified="true"/>
</target> </target>
<target name="start"> <target name="start">
@ -40,25 +42,31 @@
<sysproperty key="log4j.configuration" value="file:///${app.server..conf.dir}/log4j.xml" /> <sysproperty key="log4j.configuration" value="file:///${app.server..conf.dir}/log4j.xml" />
<sysproperty key="java.protocol.handler.pkgs" value="${java.protocol.handler.pkgs}" /> <sysproperty key="java.protocol.handler.pkgs" value="${java.protocol.handler.pkgs}" />
--> -->
<!-- nolonger needed ? (if anything works as expected) <!-- nolonger needed ? (if anything works as expected)
Required until URL protocol resource is replaced by ResourceParameter or startup.java
is modified to handle the ccm extra protocol properly. Copy directy into java lib/ext!
<sysproperty key="java.ext.dirs" <sysproperty key="java.ext.dirs"
value="${env.JAVA_HOME}/jre/lib/ext;${env.JAVA_HOME}/lib/ext;${app.server.deploy.dir}/webapps/WEB-INF/system" /> value="${env.JAVA_HOME}/jre/lib/ext;${env.JAVA_HOME}/lib/ext;${app.server.home.dir}/lib/system" />
--> -->
<!-- nolonger needed ? (if anything works as expected) <!-- nolonger needed ? (if anything works as expected)
<sysproperty key="java.endorsed.dirs" value="${app.server.deploy.dir}/common/endorsed" /> -->
<sysproperty key="java.endorsed.dirs" value="${app.server.deploy.dir}/lib/endorsed" />
<!-- required to prevent Tomcat from using AElfred to check web.xml / taglibs -->
<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.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" />
<sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl" /> <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl" />
<sysproperty key="javax.xml.transform.TransformerFactory" value="com.icl.saxon.TransformerFactoryImpl" />
--> <!-- standard parameter to Tomcat operation -->
<sysproperty key="catalina.home" value="${app.server.home.dir}" />
<sysproperty key="catalina.base" value="${app.server.deploy.dir}" /> <sysproperty key="catalina.base" value="${app.server.deploy.dir}" />
<sysproperty key="catalina.home" value="${app.server.deploy.dir}" />
<sysproperty key="catalina.config" value="file:///${app.server.conf.dir}/catalina.properties" /> <sysproperty key="catalina.config" value="file:///${app.server.conf.dir}/catalina.properties" />
<jvmarg value="-Xms256m" /> <jvmarg value="-Xms256m" />
<jvmarg value="-Xmx512m" /> <jvmarg value="-Xmx512m" />
<jvmarg value="-XX:PermSize=128m" /> <jvmarg value="-XX:PermSize=128m" />
<jvmarg value="-XX:MaxPermSize=128m" /> <jvmarg value="-XX:MaxPermSize=128m" />
<classpath> <classpath>
<pathelement path="${app.server.deploy.dir}/bin/bootstrap.jar" /> <pathelement path="${app.server.home.dir}/bin/bootstrap.jar" />
</classpath> </classpath>
</java> </java>
</target> </target>