Integrated r1930,r1931,r1932: Add new-apps target & install liferay (3d party portal server)

git-svn-id: https://svn.libreccm.org/ccm/trunk@247 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2009-08-28 15:27:42 +00:00
parent 2ad4e16ed9
commit dcce15da7c
14 changed files with 287 additions and 0 deletions

View File

@ -126,4 +126,39 @@
</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>
</project>

View File

@ -0,0 +1,129 @@
<?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="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>
</project>

View File

@ -33,6 +33,27 @@
todir="${app.server.shared.dir}" preservelastmodified="true"/>
</target>
<target name="uninstall-liferay">
<echo>Uninstalling Liferay from ${app.server.webapp.dir}</echo>
<delete dir="${app.server.webapp.dir}/portal"/>
</target>
<target name="install-liferay" depends="uninstall-liferay">
<echo>Installing Liferay into ${app.server.webapp.dir}</echo>
<mkdir dir="${app.server.webapp.dir}/portal"/>
<unzip src="tools-ng/liferay/liferay-portal-5.2.3.war" dest="${app.server.webapp.dir}/portal"/>
<copy file="tools-ng/liferay/conf/portal-ext.properties"
todir="${app.server.webapp.dir}/portal/WEB-INF/classes" preservelastmodified="true"/>
<unzip src="tools-ng/liferay/liferay-portal-dependencies-5.2.3.zip"
dest="${app.server.home.dir}/lib" overwrite="true">
<mapper type="flatten"/>
</unzip>
<copy file="ccm-core/lib/mail.jar"
todir="${app.server.home.dir}/lib" preservelastmodified="true"/>
<copy file="tools-ng/liferay/jta.jar"
todir="${app.server.home.dir}/lib" preservelastmodified="true"/>
</target>
<target name="start">
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes">

View File

@ -0,0 +1,65 @@
<?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>

View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="@new.app.name@" prettyName="@new.app.name@" version="6.6.0" release="1" webapp="ROOT"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project tools/devel/xsd/project.xsd">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" relation="ge" />
</ccm:dependencies>
<ccm:contacts>
<ccm:contact uri="http://aplaws.org" type="website" />
</ccm:contacts>
<ccm:description>
Please describe the @new.app.name@ application!
</ccm:description>
</ccm:application>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<registry>
</registry>

View File

@ -0,0 +1,13 @@
<load>
<requires>
<table name="inits"/>
<table name="acs_objects"/>
<initializer class="com.arsdigita.core.Initializer"/>
</requires>
<provides>
<initializer class="org.aplaws.@new.app.name@.Initializer"/>
</provides>
<scripts>
<schema directory="@new.app.name@"/>
</scripts>
</load>

View File

@ -0,0 +1,2 @@
<upgrade>
</upgrade>

View File

@ -0,0 +1 @@
# Add translations here

View File

@ -0,0 +1,4 @@
portal.ctx=/portal
# Don't launch browser
browser.launcher.url=

Binary file not shown.

Binary file not shown.