Author: hfnukal
Date: 2011-08-19 12:20:22 -0400 (Fri, 19 Aug 2011)
New Revision: 7189
Added:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml
Log:
JBEPP-1091 Distribution improvement
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml 2011-08-19 16:11:19
UTC (rev 7188)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml 2011-08-19 16:20:22
UTC (rev 7189)
@@ -13,13 +13,12 @@
<artifactId>distribution</artifactId>
<packaging>pom</packaging>
<name>Distribution</name>
-
<modules>
<module>serverAddon</module>
<module>portletbridge</module>
<module>examples</module>
</modules>
-
+
<dependencies>
<dependency>
<groupId>org.exoplatform.portal.distribution.root</groupId>
@@ -69,9 +68,20 @@
<profiles>
<profile>
<id>epp-distribution-assembly</id>
+ <!--<description>This profile assembly parts using directory. This
is slower.</description>-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
+ <properties>
+ <distribution.format>dir</distribution.format>
+
+
<include.default>*.distribution.deploy:*:zip</include.default>
+ <patch.default>patch</patch.default>
+
<include.production>*.distribution.deploy:*:zip</include.production>
+ <patch.production>patch</patch.production>
+ <include.all>*.distribution.deploy:*:zip</include.all>
+ <patch.all>patch</patch.all>
+ </properties>
<build>
<plugins>
<!-- Put to gether all components -->
@@ -93,17 +103,84 @@
</execution>
</executions>
</plugin>
+
+ <!-- Apply patches and rename folders -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>ant-final</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <property
name="root.path">${project.build.directory}/${project.build.finalName}</property>
+ <property
name="epp.path">${root.path}/${epp.dir}</property>
+ <property
name="eap.path">${root.path}/${eap.dir}</property>
+
+ <move file="${eap.path}"
toFile="${epp.path}"/>
+ <move
file="${epp.path}/gatein-sso-${sso.version}"
toFile="${epp.path}/${sso.directory}"/>
+
+ <ant antfile="src/build.xml"
inheritRefs="true">
+ <target name="patch"/>
+ <property name="toConfiguration"
value="default"/>
+ </ant>
+
+ <ant antfile="src/build.xml"
inheritRefs="true">
+ <target name="patch"/>
+ <property name="toConfiguration"
value="production"/>
+ </ant>
+
+ <ant antfile="src/build.xml"
inheritRefs="true">
+ <target name="patch"/>
+ <property name="toConfiguration"
value="all"/>
+ </ant>
+
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
<profile>
- <id>epp-distribution-patch</id>
+ <id>epp-distribution-single</id>
+ <!--<description>This profile assembly parts using directory. Takes
parameter servername=(default|production|all).</description>-->
<activation>
- <activeByDefault>true</activeByDefault>
+ <activeByDefault>false</activeByDefault>
</activation>
+ <properties>
+ <distribution.format>dir</distribution.format>
+
+ <servername>default</servername>
+ </properties>
<build>
<plugins>
+ <!-- Put to gether all components -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>distro-assembly</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+
<appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+
<descriptor>src/assemble-single.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<!-- Apply patches and rename folders -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -117,24 +194,104 @@
</goals>
<configuration>
<target>
- <property
name="epp.path">${project.build.directory}/${project.build.finalName}/${epp.dir}</property>
- <property
name="eap.path">${project.build.directory}/${project.build.finalName}/${eap.dir}</property>
+ <property
name="root.path">${project.build.directory}/${project.build.finalName}</property>
+ <property
name="epp.path">${root.path}/${epp.dir}</property>
+ <property
name="eap.path">${root.path}/${eap.dir}</property>
<move file="${eap.path}"
toFile="${epp.path}"/>
<move
file="${epp.path}/gatein-sso-${sso.version}"
toFile="${epp.path}/${sso.directory}"/>
<ant antfile="src/build.xml"
inheritRefs="true">
<target name="patch"/>
+ <property name="toConfiguration"
value="${servername}"/>
+ </ant>
+
+
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>epp-distribution-assembly-zip</id>
+ <!--<description>This profile assembly parts using zip. This is
faster than zi, but root folder cannot be renamed.</description>-->
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <distribution.format>zip</distribution.format>
+
+
<include.default>*.distribution.deploy:*:zip</include.default>
+ <patch.default>patch</patch.default>
+
<include.production>*.distribution.deploy:*:zip</include.production>
+ <patch.production>patch</patch.production>
+ <include.all>*.distribution.deploy:*:zip</include.all>
+ <patch.all>patch</patch.all>
+ </properties>
+ <build>
+ <plugins>
+ <!-- Put to gether all components -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>distro-assembly</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+
<appendAssemblyId>false</appendAssemblyId>
+ <attach>false</attach>
+ <descriptors>
+
<descriptor>src/assemble.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Apply patches and rename folders -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>ant-final</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <property
name="root.path">${project.build.directory}/${project.build.finalName}</property>
+ <property
name="epp.path">${root.path}/${epp.dir}</property>
+ <property
name="eap.path">${root.path}/${eap.dir}</property>
+ <property
name="epp.zip">${root.path}.zip</property>
+ <property
name="tmp.dir">${project.build.directory}/tmp</property>
+
+ <unzip src="${epp.zip}"
dest="${project.build.directory}/${project.build.finalName}"/>
+ <delete file="${epp.zip}"/>
+
+ <move file="${eap.path}"
toFile="${epp.path}"/>
+ <move
file="${epp.path}/gatein-sso-${sso.version}"
toFile="${epp.path}/${sso.directory}"/>
+
+ <ant antfile="src/build.xml"
inheritRefs="true">
+ <target
name="${patch.default}"/>
<property name="toConfiguration"
value="default"/>
</ant>
<ant antfile="src/build.xml"
inheritRefs="true">
- <target name="patch"/>
+ <target
name="${patch.production}"/>
<property name="toConfiguration"
value="production"/>
</ant>
<ant antfile="src/build.xml"
inheritRefs="true">
- <target name="patch"/>
+ <target
name="${patch.all}"/>
<property name="toConfiguration"
value="all"/>
</ant>
@@ -146,7 +303,7 @@
</plugins>
</build>
</profile>
-
+
<profile>
<id>epp-distribution-zip</id>
<activation>
Added: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml 2011-08-19
16:20:22 UTC (rev 7189)
@@ -0,0 +1,73 @@
+
+<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembl...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-p...
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>bin</id>
+ <formats>
+ <format>${distribution.format}</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <dependencySets>
+
+<!-- START profiles -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution.deploy:*:zip</include>
+ </includes>
+
<outputDirectory>${eap.dir}/jboss-as/server/${servername}</outputDirectory>
+ <unpack>true</unpack>
+ <unpackOptions>
+ <excludes>
+ <exclude>**/hibernate-core*</exclude>
+ <exclude>**/jaxb-api*</exclude>
+ <exclude>**/stax-api*</exclude>
+
+ <!-- Exclude cluster -->
+
<!--<exclude>**/hibernate-jbosscache2*</exclude>-->
+ <!--<exclude>**/jbosscache-core*</exclude>-->
+ <!--<exclude>**/jgroups*</exclude>-->
+ </excludes>
+ </unpackOptions>
+ </dependencySet>
+
+<!-- END profiles -->
+
+ <!-- Modules - portletbridge -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution.root:*:zip</include>
+ </includes>
+
<outputDirectory>${eap.dir}/${artifact.artifactId}</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- SSO Module - with root dir, renamed later -->
+ <dependencySet>
+ <includes>
+ <include>org.gatein.sso:*:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- Examples -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution:examples:zip</include>
+ </includes>
+
<outputDirectory>${eap.dir}/jboss-as/docs/examples/portal</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- EAP -->
+ <dependencySet>
+ <includes>
+ <include>${eap.groupId}:jboss-eap:zip</include>
+ </includes>
+ <outputDirectory></outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ </dependencySets>
+</assembly>
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml 2011-08-19
16:11:19 UTC (rev 7188)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml 2011-08-19
16:20:22 UTC (rev 7189)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-p...
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>bin</id>
<formats>
- <format>dir</format>
+ <format>${distribution.format}</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
@@ -25,7 +25,7 @@
</excludes>
</unpackOptions>
</dependencySet>
-
+
<dependencySet>
<includes>
<include>*.distribution.deploy:*:zip</include>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml 2011-08-19
16:11:19 UTC (rev 7188)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml 2011-08-19
16:20:22 UTC (rev 7189)
@@ -50,24 +50,31 @@
/>
</target>
-
+
+ <target name="donotpatch">
+ <echo>Not patching ${toConfiguration}</echo>
+ </target>
+
<target name="patchInZip">
<!-- unzip -->
- <unzip src="${epp.zip}" dest="${tmp.dir}">
+ <unzip src="${epp.zip}" dest="${root.path}">
<patternset>
- <include
name="jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"/>
- <include
name="jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"/>
- <include
name="jboss-as/server/${toConfiguration}/deploy/properties-service.xml"/>
- <include
name="jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"/>
+ <include
name="${eap.dir}/jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"/>
+ <include
name="${eap.dir}/jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"/>
+ <include
name="${eap.dir}/jboss-as/server/${toConfiguration}/deploy/properties-service.xml"/>
+ <include
name="${eap.dir}/jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"/>
+ <include
name="${eap.dir}/jboss-as/server/default/deploy/gatein.ear/lib/pc-portlet*"/>
</patternset>
</unzip>
+ <move file="${eap.path}" toFile="${epp.path}"/>
<!-- patch -->
+ <!--<property
name="epp.path">${tmp.dir}</property>-->
<antcall inheritRefs="true">
<target name="patch"/>
- <property name="epp.zip" value="${tmp.dir}"/>
</antcall>
<!-- zip -->
- <zip destfile="${epp.zip}" basedir="${tmp.dir}"
update="true">
+ <move file="${epp.path}" toFile="${eap.path}"/>
+ <zip destfile="${epp.zip}" basedir="${root.path}"
update="true">
</zip>
</target>
</project>
\ No newline at end of file