Author: mstruk
Date: 2011-02-01 12:07:41 -0500 (Tue, 01 Feb 2011)
New Revision: 5839
Modified:
portal/trunk/packaging/jboss-as5/pkg/pom.xml
portal/trunk/packaging/jboss-as6/pkg/pom.xml
Log:
GTNMAVEN-16 Packaging that supports JBossAS6 and does away with javascript packager
- added support for gatein.working.dir
Modified: portal/trunk/packaging/jboss-as5/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as5/pkg/pom.xml 2011-02-01 16:46:44 UTC (rev 5838)
+++ portal/trunk/packaging/jboss-as5/pkg/pom.xml 2011-02-01 17:07:41 UTC (rev 5839)
@@ -25,7 +25,8 @@
<jbossas.path>${servers.dir}</jbossas.path>
<jbossas.name>jboss-${jbossas.version}</jbossas.name>
<jbossas.dir>${jbossas.path}/${jbossas.name}</jbossas.dir>
-
<jbossas.target.dir>${project.build.directory}/jboss</jbossas.target.dir>
+
<gatein.working.dir>${project.build.directory}/jboss</gatein.working.dir>
+ <jbossas.target.dir>${gatein.working.dir}</jbossas.target.dir>
</properties>
<dependencies>
Modified: portal/trunk/packaging/jboss-as6/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-02-01 16:46:44 UTC (rev 5838)
+++ portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-02-01 17:07:41 UTC (rev 5839)
@@ -19,11 +19,12 @@
<properties>
<jbossas.version>6.0.0.Final</jbossas.version>
<jbossas.dist.version>${jbossas.version}</jbossas.dist.version>
- <servers.dir>${exo.projects.directory.dependencies}</servers.dir>
+ <servers.dir>${project.basedir}/../../servers</servers.dir>
<jbossas.path>${servers.dir}</jbossas.path>
- <jbossas.name>${exo.projects.app.jboss6.version}</jbossas.name>
+ <jbossas.name>jboss-${jbossas.version}</jbossas.name>
<jbossas.dir>${jbossas.path}/${jbossas.name}</jbossas.dir>
-
<jbossas.target.dir>${project.build.directory}/jboss</jbossas.target.dir>
+
<gatein.working.dir>${project.build.directory}/jboss</gatein.working.dir>
+ <jbossas.target.dir>${gatein.working.dir}</jbossas.target.dir>
</properties>
<dependencies>
@@ -902,114 +903,168 @@
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>check-jboss-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>jbossas.path</property>
+ <message>"
+You must define the property 'jbossas.path'
+to give the path to the directory where you store your applications servers.
+"
+ </message>
+ </requireProperty>
+ <requireProperty>
+ <property>jbossas.name</property>
+ <message>"
+You must define the property 'jbossas.name'
+to give the name of the directory where JBoss AS is stored.
+"
+ </message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${jbossas.path}/${jbossas.name}/</file>
+ </files>
+ <message>"
+The following JBoss AS directory doesn't exist :
+ ${jbossas.path}/${jbossas.name}
+Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to
the correct location of servers directory
+and/or -Djbossas.name=NAME to point to the correct directory under the servers
directory.
+You can also use -Pdownload to automatically provide JBoss AS instance.
+"
+ </message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
+ <executions>
+ <execution>
+ <id>auto-clean</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>prepare-package</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <ant antfile="${project.basedir}/package.xml"
inheritRefs="true">
+ <target name="package"/>
+ <property name="maven.project.basedir"
value="${project.basedir}"/>
+ <property name="maven.project.build.directory"
value="${project.build.directory}"/>
+ </ant>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
<profiles>
<profile>
- <id>download</id>
+ <id>pkg-jbossas6</id>
+
+ <properties>
+
<exo.projects.app.jboss5.version>jboss-6.0.0.Final</exo.projects.app.jboss5.version>
+
<servers.dir>${exo.projects.directory.dependencies}</servers.dir>
+ <jbossas.name>${exo.projects.app.jboss6.version}</jbossas.name>
+ </properties>
+
<build>
<plugins>
<plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
- <id>auto-clean</id>
- <phase>initialize</phase>
+
<id>check-jboss-legacy-environment-dependencies-dir</id>
<goals>
- <goal>clean</goal>
+ <goal>enforce</goal>
</goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+
<property>exo.projects.directory.dependencies</property>
+ <message>"
+You must define the property 'exo.projects.directory.dependencies'
+to specify the path to the directory where you store your application servers.
+"
+ </message>
+ </requireProperty>
+ </rules>
+ <fail>true</fail>
+ </configuration>
</execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.6</version>
- <executions>
<execution>
- <id>prepare-package</id>
- <phase>prepare-package</phase>
+ <id>check-jboss-legacy-environment-jboss-name</id>
<goals>
- <goal>run</goal>
+ <goal>enforce</goal>
</goals>
<configuration>
- <target>
- <property name="jbossas.zip"
-
value="${jbossas.path}/jboss-as-distribution-${jbossas.dist.version}.zip"/>
-
- <!-- Autocreate servers.dir if necessary -->
- <mkdir dir="${jbossas.path}"/>
-
- <!-- Download JBossAS unless already downloaded -->
- <ant
antfile="${project.basedir}/download-jboss.xml">
- <target name="download-jboss"/>
- <property name="url"
-
value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbo...
- <property name="dest"
value="${jbossas.zip}"/>
- </ant>
-
- <available property="jbossas.dir.exists"
type="dir" file="${jbossas.dir}"/>
-
- <fail if="jbossas.dir.exists">Destination
JBoss AS directory exists already: ${jbossas.dir} (Won't overwrite!)
-Delete the directory manually, or provide alternative JBoss AS location by using
-Dserver.dir=PATH
- </fail>
-
- <!-- Extract downloaded JBossAS to servers dir -->
- <unzip src="${jbossas.zip}"
dest="${jbossas.path}" overwrite="false"/>
-
- <ant antfile="${project.basedir}/package.xml"
inheritRefs="true">
- <target name="package"/>
- <property name="maven.project.basedir"
value="${project.basedir}"/>
- <property
name="maven.project.build.directory"
value="${project.build.directory}"/>
- </ant>
- </target>
+ <rules>
+ <requireProperty>
+
<property>exo.projects.app.jboss6.version</property>
+ <message>"
+You must define the property 'exo.projects.app.jboss6.version'
+to specify the name of the directory where JBoss AS is stored.
+"
+ </message>
+ </requireProperty>
+ </rules>
+ <fail>true</fail>
</configuration>
</execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>pack</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
<execution>
- <id>jboss-check-environment-ready</id>
+ <id>check-jboss-dir-exists</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
- <requireProperty>
- <property>jbossas.path</property>
- <message>"You must define the property
jbossas.path to give the path to the directory
- where you store your applications servers"
- </message>
- </requireProperty>
- <requireProperty>
- <property>jbossas.name</property>
- <message>"You must define the property
jbossas.name to give the name of the directory
- where JBoss AS is stored"
- </message>
- </requireProperty>
<requireFilesExist>
<files>
-
<file>${jbossas.path}/${jbossas.name}/</file>
+
<file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss6.version}/
+ </file>
</files>
- <message>"The following JBoss AS directory
doesn't exist :
- ${jbossas.path}/${jbossas.name}
+ <message>"
+The following JBoss AS directory doesn't exist :
+
${exo.projects.directory.dependencies}/${exo.projects.app.jboss6.version}
-Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to
the correct location.
+Make JBoss AS instance available at that location, or use
-Dexo.projects.directory.dependencies=PATH to point to the correct location
+of servers directory and/or -Dexo.projects.app.jboss6.version=NAME to point to the
correct directory under the servers directory.
You can also use -Pdownload to automatically provide JBoss AS instance.
"
</message>
@@ -1018,19 +1073,37 @@
<fail>true</fail>
</configuration>
</execution>
+ <execution>
+ <id>check-jboss-environment-ready</id>
+ <phase>none</phase>
+ </execution>
</executions>
</plugin>
+
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>download</id>
+ <build>
+ <plugins>
<plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
- <id>auto-clean</id>
- <phase>initialize</phase>
- <goals>
- <goal>clean</goal>
- </goals>
+ <id>check-jboss-environment-ready</id>
+ <phase>none</phase>
</execution>
+ <execution>
+ <id>check-jboss-legacy-environment-jboss-name</id>
+ <phase>none</phase>
+ </execution>
+ <execution>
+ <id>check-jboss-dir-exists</id>
+ <phase>none</phase>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -1046,6 +1119,33 @@
</goals>
<configuration>
<target>
+ <available property="jbossas.dir.exists"
type="dir" file="${jbossas.dir}"/>
+
+ <fail if="jbossas.dir.exists">"
+Destination JBossAS directory exists already:
+ ${jbossas.dir}
+
+Either rename it, delete it, or deactivate -Pdownload profile.
+"
+ </fail>
+
+ <property name="jbossas.zip"
+
value="${jbossas.path}/jboss-as-distribution-${jbossas.dist.version}.zip"/>
+
+ <!-- Autocreate servers.dir if necessary -->
+ <mkdir dir="${jbossas.path}"/>
+
+ <!-- Download JBossAS unless already downloaded -->
+ <ant
antfile="${project.basedir}/download-jboss.xml">
+ <target name="download-jboss"/>
+ <property name="url"
+
value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbo...
+ <property name="dest"
value="${jbossas.zip}"/>
+ </ant>
+
+ <!-- Extract downloaded JBossAS to servers dir -->
+ <unzip src="${jbossas.zip}"
dest="${jbossas.path}" overwrite="false"/>
+
<ant antfile="${project.basedir}/package.xml"
inheritRefs="true">
<target name="package"/>
<property name="maven.project.basedir"
value="${project.basedir}"/>
@@ -1090,4 +1190,4 @@
</build>
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>