Author: julien_viet
Date: 2010-10-25 11:38:26 -0400 (Mon, 25 Oct 2010)
New Revision: 4820
Removed:
portal/trunk/packaging/tomcat/pkg/src/assembly/
Modified:
portal/trunk/packaging/tomcat/pkg/pom.xml
portal/trunk/packaging/tomcat/pkg/transform.xsl
Log:
GTNPORTAL-1591 : replace assembly with ant
Modified: portal/trunk/packaging/tomcat/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/pom.xml 2010-10-25 14:12:45 UTC (rev 4819)
+++ portal/trunk/packaging/tomcat/pkg/pom.xml 2010-10-25 15:38:26 UTC (rev 4820)
@@ -1,4 +1,5 @@
<?xml version="1.0"?>
+<?rename tofile="portal.war"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
@@ -797,48 +798,56 @@
<!-- War files -->
<dependency>
+ <?rename portal.war?>
<!--portal.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.web.portal</artifactId>
<type>war</type>
</dependency>
<dependency>
+ <?rename eXoGadgetServer.war?>
<!--eXoGadgetServer.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.gadgets-server</artifactId>
<type>war</type>
</dependency>
<dependency>
+ <?rename eXoGadgets.war?>
<!--eXoGadgets.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.eXoGadgets</artifactId>
<type>war</type>
</dependency>
<dependency>
+ <?rename web.war?>
<!--web.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.portlet.web</artifactId>
<type>war</type>
</dependency>
<dependency>
+ <?rename rest.war?>
<!--rest.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.web.rest</artifactId>
<type>war</type>
</dependency>
<dependency>
+ <?rename exoadmin.war?>
<!--exoadmin.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.portlet.exoadmin</artifactId>
<type>war</type>
</dependency>
<dependency>
+ <?rename eXoResources.war?>
<!--eXoResources.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.web.eXoResources</artifactId>
<type>war</type>
</dependency>
<dependency>
+ <?rename dashboard.war?>
<!--dashboard.war-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.portlet.dashboard</artifactId>
@@ -846,7 +855,7 @@
</dependency>
<dependency>
- <!--integration.war-->
+ <!--<?rename integration.war?>-->
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.packaging.tomcat.integration</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
@@ -876,16 +885,6 @@
<copy todir="target/tomcat">
<fileset dir="${tomcat.dir}"/>
</copy>
-<!--
- <chmod perm="0644">
- <fileset dir="${tomcat.dir}"/>
- </chmod>
- <chmod perm="0755">
- <fileset dir="${tomcat.dir}">
- <include name="**/*.sh"/>
- </fileset>
- </chmod>
--->
<!-- Copy the dependencies -->
<dependencyfilesets/>
@@ -898,6 +897,21 @@
<ant antfile="${project.basedir}/target/pom.xml"
inheritRefs="true">
<target name="foo" />
</ant>
+
+ <!-- Copy configuration -->
+ <copy todir="target/tomcat">
+ <fileset
dir="${project.basedir}/src/main/resources/tomcat"/>
+ </copy>
+
+ <!-- Copy configuration -->
+ <copy
tofile="target/tomcat/gatein/conf/configuration.properties">
+ <fileset
dir="${project.basedir}/../../../component/common/src/main/java/conf"
includes="configuration-tomcat.properties"/>
+ </copy>
+
+ <!-- File permissions -->
+ <chmod perm="0644" type="file"
dir="target/tomcat" excludes="**/*.sh"/>
+ <chmod perm="0755" type="file"
dir="target/tomcat" includes="**/*.sh"/>
+
</target>
</configuration>
</execution>
Modified: portal/trunk/packaging/tomcat/pkg/transform.xsl
===================================================================
--- portal/trunk/packaging/tomcat/pkg/transform.xsl 2010-10-25 14:12:45 UTC (rev 4819)
+++ portal/trunk/packaging/tomcat/pkg/transform.xsl 2010-10-25 15:38:26 UTC (rev 4820)
@@ -7,7 +7,7 @@
<xsl:template match="/" >
<project name="foo">
<target name="foo">
- <copy todir="target/tomcat/libs">
+ <copy todir="target/tomcat/lib">
<xsl:for-each
select="//foo:dependencies/foo:dependency[count(foo:type)=0 or
foo:type/text()='jar']">
<xsl:element name="fileset">
<xsl:attribute name="refid"><xsl:value-of
select="./foo:groupId"/>:<xsl:value-of
select="./foo:artifactId"/>:jar</xsl:attribute>
@@ -15,12 +15,30 @@
</xsl:for-each>
</copy>
<xsl:for-each
select="//foo:dependencies/foo:dependency[foo:type/text()='war']">
- <xsl:element name="copy">
- <xsl:attribute
name="tofile">target/tomcat/webapps/<xsl:value-of
select="./comment()"/></xsl:attribute>
- <xsl:element name="fileset">
- <xsl:attribute name="refid"><xsl:value-of
select="./foo:groupId"/>:<xsl:value-of
select="./foo:artifactId"/>:war</xsl:attribute>
- </xsl:element>
- </xsl:element>
+ <xsl:variable name="bilto">
+ <xsl:for-each
select="processing-instruction()[name()='rename']">
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$bilto=''">
+ <xsl:element name="copy">
+ <xsl:attribute
name="todir">target/tomcat/webapps</xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute name="refid"><xsl:value-of
select="./foo:groupId"/>:<xsl:value-of
select="./foo:artifactId"/>:war</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="copy">
+ <xsl:attribute
name="tofile">target/tomcat/webapps/<xsl:value-of
select="$bilto"/></xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute name="refid"><xsl:value-of
select="./foo:groupId"/>:<xsl:value-of
select="./foo:artifactId"/>:war</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+
</xsl:for-each>
</target>
</project>