svnno****@sourc*****
svnno****@sourc*****
2007年 10月 31日 (水) 19:06:49 JST
Revision: 676 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=676 Author: shinsuke Date: 2007-10-31 19:06:48 +0900 (Wed, 31 Oct 2007) Log Message: ----------- installer build without tomcat. Modified Paths: -------------- pal-portal/trunk/build.xml pal-portal/trunk/installer/build.xml pal-portal/trunk/installer/etc/ant-installer/build.xml pal-portal/trunk/installer/maven.xml -------------- next part -------------- Modified: pal-portal/trunk/build.xml =================================================================== --- pal-portal/trunk/build.xml 2007-10-30 03:04:13 UTC (rev 675) +++ pal-portal/trunk/build.xml 2007-10-31 10:06:48 UTC (rev 676) @@ -223,6 +223,18 @@ <antcall target="create.binary.distribution"/> </target> + <target name="binary.distribution.without.tomcat" depends="display.logo" + description="--> Create Binary Distribution"> + <property name="build.dist" value="true" /> + <antcall target="remove"/> + <antcall target="checkout"/> + <antcall target="update"/> + <antcall target="clean.installer"/> + <antcall target="clean"/> + <antcall target="build"/> + <antcall target="create.binary.distribution.without.tomcat"/> + </target> + <target name="clean.installer" depends="display.logo" description="--> Clean Portal and Portlets Distribution"> <ant antfile="${installer.dir}/build.xml" target="clean.installer" /> @@ -236,6 +248,14 @@ <ant antfile="${installer.dir}/build.xml" target="build.installer" /> </target> + <target name="create.binary.distribution.without.tomcat" depends="display.logo" + description="--> Create Portal and Portlets Distribution"> + <property name="build.dist" value="true" /> + <mkdir dir="${installer.portlets.dir}"/> + <antcall target="deploy.portlets.for.dist"/> + <ant antfile="${installer.dir}/build.xml" target="build.installer.without.tomcat" /> + </target> + <target name="deploy.portal.for.dist" description="--> Create Portal Distribution"> <ant antfile="${portal.home}/build.xml" Modified: pal-portal/trunk/installer/build.xml =================================================================== --- pal-portal/trunk/installer/build.xml 2007-10-30 03:04:13 UTC (rev 675) +++ pal-portal/trunk/installer/build.xml 2007-10-31 10:06:48 UTC (rev 676) @@ -59,5 +59,15 @@ </exec> </target> + <target name="build.installer.without.tomcat" + description="--> Build Installer"> + <exec + executable="${shell.cmd}" + failonerror="true" + dir="${installer.dir}" + > + <arg line="${shell.options} 'maven ${jetspeed2.installer.options} build.without.tomcat'"/> + </exec> + </target> </project> Modified: pal-portal/trunk/installer/etc/ant-installer/build.xml =================================================================== --- pal-portal/trunk/installer/etc/ant-installer/build.xml 2007-10-30 03:04:13 UTC (rev 675) +++ pal-portal/trunk/installer/etc/ant-installer/build.xml 2007-10-31 10:06:48 UTC (rev 676) @@ -29,19 +29,21 @@ </condition> <echo>Deleting all content from the installation target directory</echo> +<!-- <delete includeemptydirs="true"> <fileset dir="${installDir}" includes="**/*"/> </delete> +--> <echo>Installing PAL Portal</echo> - <unzip src="${antinstaller.jar}" dest="${installDir}"> + <unzip src="${antinstaller.jar}" dest="${installDir}" overwrite="false"> <patternset> <include name="portal.zip" /> <include name="database.zip" /> <include name="tomcat-compat.zip" unless="jdk15Installed" /> </patternset> </unzip> - <unzip dest="${installDir}"> + <unzip dest="${installDir}" overwrite="false"> <fileset dir="${installDir}" includes="*.zip"/> </unzip> <delete> Modified: pal-portal/trunk/installer/maven.xml =================================================================== --- pal-portal/trunk/installer/maven.xml 2007-10-30 03:04:13 UTC (rev 675) +++ pal-portal/trunk/installer/maven.xml 2007-10-31 10:06:48 UTC (rev 676) @@ -219,4 +219,189 @@ <attainGoal name="buildInstaller" /> </goal> + <goal name="build.without.tomcat"> + <attainGoal name="buildInstallerWithoutTomcat" /> + </goal> + + <goal name="buildInstallerWithoutTomcat" prereqs="j2.plugin.properties"> + <maven:property name="build_type" defaultValue="minimal" /> + <!--attainGoal name="clean" /--> + + <mkdir dir="${basedir}/resources" /> +<!-- + <get usetimestamp="true" dest="${basedir}/resources/tomcat-5.5.20.zip" + src="http://www.bluesunrise.com/maven/tomcat/dist/tomcat-5.5.20.zip" /> + <get usetimestamp="true" dest="${basedir}/resources/tomcat-5.5.20-compat.zip" + src="http://www.bluesunrise.com/maven/tomcat/dist/tomcat-5.5.20-compat.zip" /> + + <unzip src="${basedir}/resources/tomcat-5.5.20.zip" dest="${maven.build.dir}/tomcat" /> + <unzip src="${basedir}/resources/tomcat-5.5.20-compat.zip" dest="${maven.build.dir}/tomcat-compat" /> + + <delete dir="${maven.build.dir}/tomcat/webapps" /> +--> + <mkdir dir="${maven.build.dir}/tomcat" /> + <mkdir dir="${maven.build.dir}/tomcat-compat" /> + + <copy todir="${maven.build.dir}/tomcat" overwrite="true"> + <fileset dir="${basedir}/etc/tomcat" /> + </copy> + + <j:set var="maven.war.build.dir" value="${maven.build.dir}/tomcat/webapps"/> + <attainGoal name="war:webapp"/> + + <attainGoal name="j2:portal.copy.webapp" /> + <attainGoal name="j2:portal.conf.ojb" /> + <attainGoal name="j2:portal.conf.jetspeed" /> + + <move todir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}"> + <fileset dir="${maven.build.dir}/${org.apache.jetspeed.portal.artifactId}" /> + </move> + + <mkdir dir="${maven.build.dir}/database" /> + + <copy file="${portal.dir}/etc/sql/drop.sql" todir="${maven.build.dir}/database" /> + <copy todir="${maven.build.dir}/database/derby"> + <fileset dir="${portal.dir}/etc/sql/derby/schema" /> + </copy> + <j:set var="org.apache.jetspeed.production.database.default.name" value="mysql" /> + <attainGoal name="j2:portal.conf.sql" /> + <j:choose> + <j:when test="${build_type=='minimal'}"> + <copy todir="${maven.build.dir}/database"> + <fileset dir="${maven.build.dir}/portal-sql/min" includes="j2-seed.xml" /> + </copy> + </j:when> + <j:otherwise> + <copy todir="${maven.build.dir}/database"> + <fileset dir="${maven.build.dir}/portal-sql" includes="j2-seed.xml" /> + </copy> + </j:otherwise> + </j:choose> + <copy todir="${maven.build.dir}/database/mysql"> + <fileset dir="${maven.build.dir}/portal-sql/mysql/schema" excludes="*.generation,*.map" /> + </copy> + <j:set var="org.apache.jetspeed.production.database.default.name" value="mssql" /> + <attainGoal name="j2:portal.conf.sql" /> + <copy todir="${maven.build.dir}/database/mssql"> + <fileset dir="${maven.build.dir}/portal-sql/mssql/schema" excludes="*.generation,*.map" /> + </copy> + <j:set var="org.apache.jetspeed.production.database.default.name" value="oracle" /> + <attainGoal name="j2:portal.conf.sql" /> + <copy todir="${maven.build.dir}/database/oracle"> + <fileset dir="${maven.build.dir}/portal-sql/oracle/schema" excludes="*.generation,*.map" /> + </copy> + <j:set var="org.apache.jetspeed.production.database.default.name" value="db2" /> + <attainGoal name="j2:portal.conf.sql" /> + <copy todir="${maven.build.dir}/database/db2"> + <fileset dir="${maven.build.dir}/portal-sql/db2/schema" excludes="*.generation,*.map" /> + </copy> + <j:set var="org.apache.jetspeed.production.database.default.name" value="sapdb" /> + <attainGoal name="j2:portal.conf.sql" /> + <copy todir="${maven.build.dir}/database/sapdb"> + <fileset dir="${maven.build.dir}/portal-sql/sapdb/schema" excludes="*.generation,*.map" /> + </copy> + <j:set var="org.apache.jetspeed.production.database.default.name" value="postgres" /> + <attainGoal name="j2:portal.conf.sql" /> + <copy todir="${maven.build.dir}/database/postgres"> + <fileset dir="${maven.build.dir}/portal-sql/postgres/schema" excludes="*.generation,*.map" /> + </copy> + <copy todir="${maven.build.dir}/database/import/db-ojb" overwrite="true"> + <fileset dir="${portal.dir}/etc/db-ojb" /> + </copy> + + + <filter token="CONTEXT" value="${org.apache.jetspeed.portal.artifactId}" /> + <copy file="${portal.dir}/etc/conf/tomcat/jetspeed-tomcat-5.5.xml" tofile="${maven.build.dir}/database/${org.apache.jetspeed.portal.artifactId}.xml" + filtering="true" /> + + <attainGoal name="j2:copy.shared.deps" /> + <attainGoal name="j2:pam.layoutdeploy" /> + <attainGoal name="j2:pam.admindeploy" /> + + <!-- Copy Portlets --> + <copy todir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/deploy" overwrite="true"> + <fileset dir="${maven.build.dir}/portlets" /> + </copy> + +<!-- + <j:choose> + <j:when test="${build_type=='minimal'}"> + <delete dir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/pages" /> + <move todir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/pages"> + <fileset dir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/min-pages" /> + </move> + </j:when> + <j:otherwise> + <delete dir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/min-pages" /> + <attainGoal name="j2:pam.demodeploy" /> + <attainGoal name="j2:pam.jsfdeploy" /> + <attainGoal name="j2:pam.rssdeploy" /> + <attainGoal name="j2:pam.jpetstoredeploy" /> + </j:otherwise> + </j:choose> +--> + <delete dir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/pages" /> + <mkdir dir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/pages" /> + <copy todir="${maven.build.dir}/tomcat/webapps/${org.apache.jetspeed.portal.artifactId}/WEB-INF/pages"> + <fileset dir="${portal.psml.dir}/${portal.psml.name}" /> + </copy> + + <copy todir="${maven.build.dir}/database/lib"> + <fileset dir="${maven.repo.local}/tyrex/jars/"> + <include name="tyrex-1.0.1.jar" /> + </fileset> + <fileset dir="${maven.repo.local}/ant/jars/"> + <include name="ant-1.6.5.jar" /> + </fileset> + <fileset dir="${maven.repo.local}/org.apache.portals.jetspeed-2/jars/"> + <include name="ant-tasks-${jetspeed.version}.jar" /> + </fileset> + <fileset dir="${maven.build.dir}/tomcat/shared/lib/" includes="derby-*.jar"/> + </copy> + + <j:choose> + <j:when test="${build_type=='minimal'}"> + <j:set var="build_name" value="" /> + <copy file="${basedir}/etc/ant-installer/antinstall-config.xml" todir="${maven.build.dir}"/> + </j:when> + <j:otherwise> + <j:set var="build_name" value="-demo" /> + <copy file="${basedir}/etc/ant-installer/antinstall-config-demo.xml" tofile="${maven.build.dir}/antinstall-config.xml"/> + </j:otherwise> + </j:choose> + + <zip file="${maven.build.dir}/portal.zip"> + <zipfileset dir="${maven.build.dir}/tomcat" excludes="shared/lib/derby*"/> + </zip> + <zip file="${maven.build.dir}/tomcat-compat.zip"> + <zipfileset dir="${maven.build.dir}/tomcat-compat"/> + </zip> + <concat destfile="${maven.build.dir}/database/build.properties">portalName=${org.apache.jetspeed.portal.artifactId}</concat> + <zip file="${maven.build.dir}/database.zip"> + <zipfileset dir="${maven.build.dir}/database" prefix="database" /> + <zipfileset dir="${basedir}/etc/database" prefix="database" /> + </zip> + + <jar file="${maven.build.dir}/${dist.name.prefix}-${dist.version}${build_name}-installer.jar" compress="true"> + <manifest> + <attribute name="Manifest-Version" value="1.0" /> + <attribute name="Main-Class" value="org.tp23.antinstaller.selfextract.NonExtractor" /> + </manifest> + <zipgroupfileset dir="${basedir}/etc/ant-installer/lib" includes="*.jar" /> + <zipgroupfileset dir="${maven.repo.local}/org.apache.portals.jetspeed-2/jars/" includes="ant-tasks-${jetspeed.version}.jar"/> + <fileset dir="${basedir}/etc/ant-installer"> + <include name="resources/*" prefix="resources" /> + <include name="license/*" /> + <include name="build.xml" /> + </fileset> + <fileset file="${maven.build.dir}/antinstall-config.xml"/> + <fileset file="${basedir}/etc/NOTICE.txt"/> + <fileset dir="${portal.dir}"> + <include name="LICENSE.TXT" /> + </fileset> + <fileset file="${maven.build.dir}/portal.zip"/> + <fileset file="${maven.build.dir}/tomcat-compat.zip"/> + <fileset file="${maven.build.dir}/database.zip"/> + </jar> + </goal> </project>