Ueberarbeitete neue Entwicklungsumgebung

git-svn-id: https://svn.libreccm.org/ccm/trunk@91 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2009-03-05 08:25:56 +00:00
parent c1ab432247
commit b41a7188d4
7 changed files with 108 additions and 92 deletions

View File

@ -14,47 +14,50 @@
<!-- 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="project.dir" value="${user.dir}" /> <property name="ccm.project.dir" value="${user.dir}" />
<!-- lib directory of ECDC <!-- directory layout of the ECDC development environment -->
contains additional xml scripts to do the real work --> <!-- script contains additional xml scripts to do the real work -->
<property name="tools.script.dir" value="${project.dir}/tools-ng/ecdc/scriptlib" /> <property name="ccm.ecdc.script.dir" value="${ccm.project.dir}/tools-ng/ecdc/scriptlib" />
<!-- conf xml scripts containing default configuration values -->
<!-- bundles directory of ECDC <property name="ccm.ecdc.conf.dir" value="${ccm.project.dir}/tools-ng/ecdc/conf" />
contains software to be installed (e.g. Tomcat servlet container) --> <!-- bundles contains software to be installed (e.g. Tomcat servlet container) -->
<property name="tools.bundles.dir" value="${project.dir}/tools-ng/ecdc/bundles" /> <property name="ccm.ecdc.bundles.dir" value="${ccm.project.dir}/tools-ng/ecdc/bundles" />
<!-- defines essential system variables and reads the configuration property files <!-- import of xml scripts 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 runtime.property - defines the servlet container runtime for testing
build.properties - defines details for building (compiler options, etc) build.properties - defines details for building (compiler options, etc)
ccm.properties - defines CCM projet details, esp. the bundle file which ccm.properties - defines CCM projet details, esp. the bundle file which
contains configuration details and the web.xml file --> contains configuration details and the web.xml file -->
<import file="${tools.script.dir}/build-common.xml" /> <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" />
<!-- its task configure must be executed before any build / deploy can happen <!-- 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 --> it generates the build targets for the project specified in project.xml -->
<import file="${tools.script.dir}/build-configure.xml" /> <import file="${ccm.ecdc.script.dir}/build-configure.xml" />
<!-- essential CCM post build tasks: load database etc. -->
<import file="${tools.script.dir}/build-ccm.xml" />
<!-- prepare the test runtime environment . -->
<import file="${tools.script.dir}/build-runtime.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>
<bool> <bool>
<available file="build-projects.xml"/> <available file="build-projects.xml"/>
</bool> </bool>
<!-- is generated by target configure in build-configure and
contains all the task to do the real work -->
<import file="build-projects.xml" /> <import file="build-projects.xml" />
<else> <else>
<import file="${tools.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
@ -62,8 +65,4 @@
</else> </else>
</if> </if>
<path id="tools.classpath">
<fileset dir="${tools.lib.dir}" includes="*.jar" />
</path>
</project> </project>

View File

@ -6,5 +6,5 @@
## to overwrite. ## to overwrite.
## ##
# Usually you will use a specific adapted bundle! Use local.ccm.properties! # Usually you will use a specific adapted bundle! Use local.ccm.properties!
bundle.folder=${project.dir}/ccm-ldn-aplaws/bundles/complete ccm.bundle.folder=${ccm.project.dir}/ccm-ldn-aplaws/bundles/complete

View File

@ -10,11 +10,11 @@
## Server Type ## Server Type
## ##
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.vendor=apache
## ##
## Server Directory ## Server Directory
@ -22,13 +22,13 @@
app.server.bundles.name=${app.server.vendor}-${app.server.type}-${app.server.version} app.server.bundles.name=${app.server.vendor}-${app.server.type}-${app.server.version}
<!-- NOT NEEDED: app.server.bundles.dir=${tools.bundles.dir}/bundles --> <!-- NOT NEEDED: app.server.bundles.dir=${tools.bundles.dir}/bundles -->
app.server.bundles.zip=${tools.bundles.dir}/${app.server.bundles.name}.zip app.server.bundles.zip=${ccm.ecdc.bundles.dir}/${app.server.bundles.name}.zip
app.server.parent.dir=${project.dir}/runtime app.server.parent.dir=${ccm.project.dir}/runtime
deploy.dir=${app.server.parent.dir}/${app.server.bundles.name} app.server.deploy.dir=${app.server.parent.dir}/${app.server.bundles.name}
webapp.dist.dir=${deploy.dir}/webapps app.server.conf.dir=${app.server.deploy.dir}/conf
## deprecated, will not be used
webapp.conf.dir=${deploy.dir}/conf webapp.dist.dir=${app.server.deploy.dir}/webapps
## nolonger needed, handled by Mastertool ## nolonger needed, handled by Mastertool
## webapp.registry.dir=${webapp.conf.dir}/registry ## webapp.registry.dir=${webapp.conf.dir}/registry

View File

@ -1,16 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?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.deploy.dir dir the server are installed into (i.e. CATALINA_HOME)
app.server.conf.dir name of the servers configuration dir
webapp.dist.dir distribution dir for web applications -->
<project name="load"> <project name="load">
<!-- ALREADY SET in build.xml . Wrong here!
<property name="project.dir" value="." />
-->
<import file="${tools.script.dir}/build-common.xml" />
<target name="load-bundle"> <target name="load-bundle">
<echo>Loading bundle ${bundle.folder} into ${ccm.home}</echo> <echo>Loading bundle ${bundle.folder} into ${ccm.home}</echo>
<copy file="${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"
@ -20,9 +22,11 @@
<tstamp> <tstamp>
<format pattern="yyyymmddhhmmss" property="timestamp" /> <format pattern="yyyymmddhhmmss" property="timestamp" />
</tstamp> </tstamp>
<move file="${webapp.conf.dir}/registry" <!-- nolonger in use
tofile="${webapp.conf.dir}/registry.${timestamp}" preservelastmodified="yes" <move file="${app.server.conf.dir}/registry"
tofile="${app.server.conf.dir}/registry.${timestamp}" preservelastmodified="yes"
failonerror="no" verbose="true" /> failonerror="no" verbose="true" />
-->
<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}" />

View File

@ -2,29 +2,29 @@
<project name="common"> <project name="common">
<property name="tools.conf.dir" value="${project.dir}/tools-ng/ecdc/conf" /> <property name="ccm.tools.xsl.dir" value="${ccm.project.dir}/tools-ng/common/xsl" />
<property name="tools.xsl.dir" value="${project.dir}/tools-ng/common/xsl" />
<!-- several java programs needed for processing, esp. xml files--> <!-- several java programs needed for processing, esp. xml files-->
<property name="tools.lib.dir" value="${project.dir}/tools-ng/common/lib" /> <property name="ccm.tools.lib.dir" value="${ccm.project.dir}/tools-ng/common/lib" />
<path id="tools.classpath"> <path id="ccm.tools.classpath">
<fileset dir="${tools.lib.dir}" includes="*.jar" /> <fileset dir="${ccm.tools.lib.dir}" includes="*.jar" />
</path> </path>
<property file="${project.dir}/local.runtime.properties" />
<!-- <property file="${project.dir}/runtime.ext.properties" /> -->
<property file="${tools.conf.dir}/runtime.properties" />
<property file="${project.dir}/local.build.properties" /> <!-- Read configuration files. First from project dir, then add
<!-- <property file="${project.dir}/build.ext.properties" /> --> requirred defaults from ecdc directory -->
<property file="${tools.conf.dir}/build.properties" /> <property file="${ccm.project.dir}/local.runtime.properties" />
<property file="${ccm.ecdc.conf.dir}/runtime.properties" />
<property file="${ccm.project.dir}/local.build.properties" />
<property file="${ccm.ecdc.conf.dir}/build.properties" />
<property file="${ccm.project.dir}/local.ccm.properties" />
<property file="${ccm.ecdc.conf.dir}/ccm.properties" />
<property file="${project.dir}/local.ccm.properties" />
<!-- <property file="${project.dir}/ccm.ext.properties" /> -->
<property file="${tools.conf.dir}/ccm.properties" />
<path id="ccm.classpath"> <path id="ccm.classpath">
<path refid="tools.classpath"/> <path refid="ccm.tools.classpath"/>
<pathelement path="${webapp.dist.dir}/WEB-INF/classes"/> <pathelement path="${webapp.dist.dir}/WEB-INF/classes"/>
<fileset dir="${webapp.dist.dir}/WEB-INF/lib" includes="*.jar" /> <fileset dir="${webapp.dist.dir}/WEB-INF/lib" includes="*.jar" />
</path> </path>
@ -34,6 +34,6 @@
</condition> </condition>
<!-- http://antelope.tigris.org/ --> <!-- http://antelope.tigris.org/ -->
<taskdef classpathref="tools.classpath" resource="ise/antelope/tasks/antlib.xml" /> <taskdef classpathref="ccm.tools.classpath" resource="ise/antelope/tasks/antlib.xml" />
</project> </project>

View File

@ -1,25 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?> <?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.deploy.dir dir the server are installed into (i.e. CATALINA_HOME)
app.server.conf.dir name of the servers configuration dir
webapp.dist.dir distribution dir for web applications -->
<project name="configure" default="configure"> <project name="configure" default="configure">
<!-- ALREADY SET in build.xml . Wrong here!
<property name="project.dir" value="." />
-->
<!-- Already imported in build.xml which imports this file -->
<!-- <import file="${tools.script.dir}/build-common.xml" /> -->
<target name="configure"> <target name="configure">
<echo>Validating the schema of project.xml</echo> <echo>Validating the schema of project.xml</echo>
<!-- http://xerces.apache.org/xerces2-j/samples-dom.html#Counter --> <!-- http://xerces.apache.org/xerces2-j/samples-dom.html#Counter -->
<java classname="dom.Counter" classpathref="tools.classpath" <java classname="dom.Counter" classpathref="ccm.tools.classpath"
errorproperty="project.validation.errors" errorproperty="project.validation.errors"
outputproperty="project.validation.output"> outputproperty="project.validation.output">
<arg value="-s" /> <arg value="-s" />
<arg value="-f" /> <arg value="-f" />
<arg value="-v" /> <arg value="-v" />
<arg value="${project.dir}/project.xml" /> <arg value="${ccm.project.dir}/project.xml" />
</java> </java>
<if> <if>
<bool> <bool>
@ -45,10 +46,14 @@
targets for compile / build / deploy targets for compile / build / deploy
uses currently the xsl templates used by the ccm scripts --> uses currently the xsl templates used by the ccm scripts -->
<echo message="Regenerating build-projects.xml" /> <echo message="Regenerating build-projects.xml" />
<xslt style="${tools.xsl.dir}/combine.xsl" in="project.xml" <xslt style="${ccm.tools.xsl.dir}/combine.xsl"
out=".tmp.project.xml" classpathref="tools.classpath" force="yes" /> in="project.xml"
<xslt style="${tools.xsl.dir}/build-template.xsl" in=".tmp.project.xml" out=".tmp.project.xml"
out="build-projects.xml" classpathref="tools.classpath" force="yes" /> classpathref="ccm.tools.classpath" force="yes" />
<xslt style="${ccm.tools.xsl.dir}/build-template.xsl"
in=".tmp.project.xml"
out="build-projects.xml"
classpathref="ccm.tools.classpath" force="yes" />
<delete file=".tmp.project.xml"/> <delete file=".tmp.project.xml"/>
<!-- Building ccm.classpath which used to contain a list with dirs <!-- Building ccm.classpath which used to contain a list with dirs

View File

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project name="appserver" default="start"> <!-- 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.deploy.dir dir the server are installed into (i.e. CATALINA_HOME)
app.server.conf.dir name of the servers configuration dir
webapp.dist.dir distribution dir for web applications -->
<!-- already set <project name="appserver" default="start">
<property name="project.dir" value="." />
-->
<!-- already imported, gets wrong here!
<import file="build-common.xml" /> -->
<target name="install-tomcat"> <target name="install-tomcat">
<echo>Installing app server into ${deploy.dir}</echo> <echo>Installing app server into ${deploy.dir}</echo>
@ -16,37 +18,43 @@
<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="${webapp.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 file="ccm-core/lib/xercesImpl.jar" <copy file="ccm-core/lib/xercesImpl.jar"
todir="${deploy.dir}/common/endorsed" preservelastmodified="true"/> todir="${app.server.deploy.dir}/common/endorsed" preservelastmodified="true"/>
</target> </target>
<target name="start"> <target name="start">
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes"> <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
<!-- nolonger needed ? (if anything works as expected)
<sysproperty key="ccm.home" value="${ccm.home}" /> <sysproperty key="ccm.home" value="${ccm.home}" />
<sysproperty key="ccm.conf" value="${webapp.registry.dir}" /> <sysproperty key="ccm.conf" value="${webapp.registry.dir}" />
<sysproperty key="com.arsdigita.util.Assert.enabled" value="true" /> <sysproperty key="com.arsdigita.util.Assert.enabled" value="true" />
<sysproperty key="log4j.configuration" value="file:///${webapp.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)
<sysproperty key="java.ext.dirs" <sysproperty key="java.ext.dirs"
value="${env.JAVA_HOME}/jre/lib/ext;${env.JAVA_HOME}/lib/ext;${deploy.dir}/webapps/WEB-INF/system" /> value="${env.JAVA_HOME}/jre/lib/ext;${env.JAVA_HOME}/lib/ext;${app.server.deploy.dir}/webapps/WEB-INF/system" />
<sysproperty key="catalina.config" value="file:///${webapp.conf.dir}/catalina.properties" /> -->
<sysproperty key="java.endorsed.dirs" value="${deploy.dir}/common/endorsed" /> <!-- nolonger needed ? (if anything works as expected)
<sysproperty key="catalina.base" value="${deploy.dir}" /> <sysproperty key="java.endorsed.dirs" value="${app.server.deploy.dir}/common/endorsed" />
<sysproperty key="catalina.home" value="${deploy.dir}" />
<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" /> <sysproperty key="javax.xml.transform.TransformerFactory" value="com.icl.saxon.TransformerFactoryImpl" />
-->
<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" />
<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="${deploy.dir}/bin/bootstrap.jar" /> <pathelement path="${app.server.deploy.dir}/bin/bootstrap.jar" />
</classpath> </classpath>
</java> </java>
</target> </target>