Author: mstruk
Date: 2009-11-29 15:10:13 -0500 (Sun, 29 Nov 2009)
New Revision: 853
Modified:
portal/branches/mc-integration/packaging/pkg/pom.xml
Log:
Profiles for deploying integration tests
Modified: portal/branches/mc-integration/packaging/pkg/pom.xml
===================================================================
--- portal/branches/mc-integration/packaging/pkg/pom.xml 2009-11-29 20:07:04 UTC (rev
852)
+++ portal/branches/mc-integration/packaging/pkg/pom.xml 2009-11-29 20:10:13 UTC (rev
853)
@@ -37,7 +37,7 @@
<groupId>org.gatein.tools</groupId>
<artifactId>packager</artifactId>
<type>zip</type>
- <version>1.0.0-Beta02</version>
+ <version>1.0.0-Beta02-SNAPSHOT</version>
</dependency>
<dependency>
@@ -335,5 +335,208 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>pkg-tomcat-tests</id>
+ <build>
+ <finalName>GateIn-${project.version}</finalName>
+ <plugins>
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+
<property>exo.projects.directory.dependencies</property>
+ <message>"You must define the property
exo.projects.directory.dependencies to give the path to the directory where you store your
applications servers"</message>
+ </requireProperty>
+ <requireProperty>
+
<property>exo.projects.app.tomcat.version</property>
+ <message>"You must define the property
exo.projects.app.tomcat.version to give the name of the directory where is stored
tomcat"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+
<file>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}/</file>
+ </files>
+ <message>"The following Tomcat directory
doesn't exist :
${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- run exo build -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-packaging</id>
+ <phase>package</phase>
+ <configuration>
+ <executable>java</executable>
+ <workingDirectory>${basedir}</workingDirectory>
+ <arguments>
+
<argument>-Dexo.package.home=${basedir}/target/packager</argument>
+
<argument>-Dexo.current.dir=${basedir}</argument>
+
<argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
+
<argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+
<argument>-Dexo.working.dir=${gatein.working.dir}/</argument>
+ <!--argument>-Dexo.src.dir=NONE</argument-->
+
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!--
to get the server ref install -->
+
<argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
+
<argument>-Dclean.server=${exo.projects.app.tomcat.version}</argument>
+
<argument>-Dexo.m2.home=${maven.home}</argument>
+ <argument>-Xshare:auto</argument>
+ <argument>-Xms128m</argument>
+ <argument>-Xmx512m</argument>
+ <argument>-classpath</argument>
+
<argument>${basedir}/target/packager/lib/js.jar</argument>
+
<argument>org.mozilla.javascript.tools.shell.Main</argument>
+
<argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+ <argument>exobuild</argument>
+ <argument>--product=portal</argument>
+ <argument>--deploy=tomcat</argument>
+ <argument>--integration-test</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+<!--
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+
<descriptor>src/main/assembly/tomcat-zip.xml</descriptor>
+ </descriptors>
+ <attach>false</attach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+-->
+ </plugins>
+ </build>
+
+ </profile>
+ <profile>
+ <id>pkg-jbossas-tests</id>
+ <build>
+ <finalName>GateIn-${project.version}</finalName>
+ <plugins>
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+
<property>exo.projects.directory.dependencies</property>
+ <message>"You must define the property
exo.projects.directory.dependencies to give the path to the directory where you store your
applications servers"</message>
+ </requireProperty>
+ <requireProperty>
+
<property>exo.projects.app.jboss.version</property>
+ <message>"You must define the property
exo.projects.app.jboss.version to give the name of the directory where is stored
JBossAS"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+
<file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}/</file>
+ </files>
+ <message>"The following JBossAS directory
doesn't exist :
${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- run exo buils -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-packaging</id>
+ <phase>package</phase>
+ <configuration>
+ <executable>java</executable>
+ <workingDirectory>${basedir}</workingDirectory>
+ <arguments>
+
<argument>-Dexo.package.home=${basedir}/target/packager</argument>
+
<argument>-Dexo.current.dir=${basedir}</argument>
+
<argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
+
<argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+
<argument>-Dexo.working.dir=${gatein.working.dir}</argument>
+ <!--argument>-Dexo.src.dir=NONE</argument-->
+
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!--
to get the server ref install -->
+
<
argument>-Dexo.m2.repos=file:${settings.localRepository},http://maven2...
+
<argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
+
<argument>-Dexo.m2.home=${maven.home}</argument>
+ <argument>-Xshare:auto</argument>
+ <argument>-Xms128m</argument>
+ <argument>-Xmx512m</argument>
+ <argument>-classpath</argument>
+
<argument>${basedir}/target/packager/lib/js.jar</argument>
+
<argument>org.mozilla.javascript.tools.shell.Main</argument>
+
<argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+ <argument>exobuild</argument>
+ <argument>--product=portal</argument>
+ <argument>--deploy=jbossear</argument>
+ <argument>--integration-test</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+<!--
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+
<descriptor>src/main/assembly/jbossear-zip.xml</descriptor>
+ </descriptors>
+ <attach>false</attach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+-->
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>