[weld-commits] Weld SVN: r6062 - in archetypes/trunk: jsf/jee and 1 other directory.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Mon Mar 22 05:14:26 EDT 2010
Author: mgencur at redhat.com
Date: 2010-03-22 05:14:26 -0400 (Mon, 22 Mar 2010)
New Revision: 6062
Modified:
archetypes/trunk/jsf/jee/pom.xml
archetypes/trunk/pom.xml
Log:
WELDX-70 fixed handling of local maven private repo and added maven code for jee archetype
Modified: archetypes/trunk/jsf/jee/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee/pom.xml 2010-03-22 08:30:24 UTC (rev 6061)
+++ archetypes/trunk/jsf/jee/pom.xml 2010-03-22 09:14:26 UTC (rev 6062)
@@ -32,6 +32,362 @@
</plugins>
</build>
-
-
+ <profiles>
+ <profile>
+ <id>ftest-jboss</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+
+ <properties>
+ <ftest.artifact>ftest-archetypes</ftest.artifact>
+ <ftest.version>0.1${ftest.version.discriminator}</ftest.version>
+ <selenium.browser.url>http://localhost:8080</selenium.browser.url>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld.examples.ftest</groupId>
+ <artifactId>${ftest.artifact}</artifactId>
+ <version>${ftest.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+
+ <executions>
+ <!-- remove a project generated earlier -->
+ <execution>
+ <id>remove-old-project</id>
+ <phase>process-sources</phase>
+ <configuration>
+ <tasks>
+ <echo message="Removing old project" />
+ <delete dir="${java.io.tmpdir}/${project.artifactId}" failonerror="false"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <!-- tomcat:run has to be executed in background otherwise it would block further maven execution -->
+ <execution>
+ <id>wait-for-project</id>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="url.to.wait" value="http://localhost:8080/${project.artifactId}" />
+ <echo message="Waiting for application at ${url.to.wait} using jboss container" />
+ <waitfor maxwait="${application.deploy.timeout}" maxwaitunit="second">
+ <http url="${url.to.wait}" errorsBeginAt="404" />
+ </waitfor>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <!-- generate project using weld archetypes -->
+ <execution>
+ <id>generate-project-artifacts</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}</workingDirectory>
+ <arguments>
+ <argument>archetype:generate</argument>
+ <argument>-DinteractiveMode=n</argument>
+ <argument>-DarchetypeArtifactId=${project.artifactId}</argument>
+ <argument>-DarchetypeGroupId=org.jboss.weld.archetypes</argument>
+ <argument>-DarchetypeVersion=${archetype.test.version}</argument>
+ <argument>-DgroupId=com.mycompany</argument>
+ <argument>-DartifactId=${project.artifactId}</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ <!-- just compile generated project -->
+ <execution>
+ <id>package-project</id>
+ <phase>compile</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}/${project.artifactId}</workingDirectory>
+ <arguments>
+ <argument>package</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ <!-- deploy -->
+ <execution>
+ <id>deploy-project</id>
+ <phase>compile</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}/${project.artifactId}</workingDirectory>
+ <arguments>
+ <argument>jboss:hard-deploy</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>run-unit-tests</id>
+ <phase>integration-test</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}/${project.artifactId}</workingDirectory>
+ <arguments>
+ <argument>test</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>undeploy-project</id>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}/${project.artifactId}</workingDirectory>
+ <arguments>
+ <argument>jboss:hard-undeploy</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>ftest-glassfish</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+
+ <properties>
+ <ftest.artifact>ftest-archetypes</ftest.artifact>
+ <ftest.version>0.1${ftest.version.discriminator}</ftest.version>
+ <selenium.browser.url>http://localhost:8080</selenium.browser.url>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld.examples.ftest</groupId>
+ <artifactId>${ftest.artifact}</artifactId>
+ <version>${ftest.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.glassfish.maven.plugin</groupId>
+ <artifactId>maven-glassfish-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!-- remove a project generated earlier -->
+ <execution>
+ <id>remove-old-project</id>
+ <phase>process-sources</phase>
+ <configuration>
+ <tasks>
+ <echo message="Removing old project" />
+ <delete dir="${java.io.tmpdir}/${project.artifactId}" failonerror="false"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <!-- tomcat:run has to be executed in background otherwise it would block further maven execution -->
+ <execution>
+ <id>deploy-project</id>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="url.to.wait" value="http://localhost:8080/${project.artifactId}" />
+ <echo message="Waiting for application at ${url.to.wait} using Glassfish container" />
+ <waitfor maxwait="${application.deploy.timeout}" maxwaitunit="second">
+ <http url="${url.to.wait}" errorsBeginAt="404" />
+ </waitfor>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>copy-persistencexml-to-temp</id>
+ <phase>process-resources</phase>
+ <configuration>
+ <tasks>
+ <echo message="Copying persistence.xml to temp dir" />
+ <copy file="${java.io.tmpdir}/${project.artifactId}/src/main/resources/META-INF/persistence.xml" todir="${java.io.tmpdir}" overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>datasource-for-glassfish</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>transform</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <transformationSets>
+ <transformationSet>
+ <dir>${java.io.tmpdir}</dir>
+ <includes>
+ <include>persistence.xml</include>
+ </includes>
+ <outputDir>${java.io.tmpdir}/${project.artifactId}/src/main/resources/META-INF</outputDir>
+ <stylesheet>src/test/resources/glassfishdatasource.xsl</stylesheet>
+ </transformationSet>
+ </transformationSets>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <!-- generate project using weld archetypes -->
+ <execution>
+ <id>generate-project-artifacts</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}</workingDirectory>
+ <arguments>
+ <argument>archetype:generate</argument>
+ <argument>-DinteractiveMode=n</argument>
+ <argument>-DarchetypeArtifactId=${project.artifactId}</argument>
+ <argument>-DarchetypeGroupId=org.jboss.weld.archetypes</argument>
+ <argument>-DarchetypeVersion=${archetype.test.version}</argument>
+ <argument>-DgroupId=com.mycompany</argument>
+ <argument>-DartifactId=${project.artifactId}</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ <!-- just compile generated project -->
+ <execution>
+ <id>compile-project</id>
+ <phase>compile</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}/${project.artifactId}</workingDirectory>
+ <arguments>
+ <argument>package</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ <!-- run unit tests -->
+ <execution>
+ <id>run-unit-tests</id>
+ <phase>integration-test</phase>
+ <configuration>
+ <executable>mvn</executable>
+ <workingDirectory>${java.io.tmpdir}/${project.artifactId}</workingDirectory>
+ <arguments>
+ <argument>test</argument>
+ <argument>-Dmaven.repo.local=${maven.private.repo}/</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: archetypes/trunk/pom.xml
===================================================================
--- archetypes/trunk/pom.xml 2010-03-22 08:30:24 UTC (rev 6061)
+++ archetypes/trunk/pom.xml 2010-03-22 09:14:26 UTC (rev 6062)
@@ -75,6 +75,8 @@
<maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
<failsafe.maven.plugin.version>2.4.3-alpha-1</failsafe.maven.plugin.version>
<exec.maven.plugin.version>1.1</exec.maven.plugin.version>
+ <xml.maven.plugin.version>1.0-beta-3</xml.maven.plugin.version>
+ <maven.glassfish.plugin.version>2.1</maven.glassfish.plugin.version>
<ant.junit.version>1.6.2</ant.junit.version>
<ftest.version.discriminator />
<selenium.browser>*firefoxproxy</selenium.browser>
@@ -182,8 +184,9 @@
<tasks>
<property name="tmpdir" value="${maven.private.repo}"/>
<delete dir="${tmpdir}" failonerror="false"/>
- <mkdir dir="${tmpdir}"/>
- <copy todir="${tmpdir}" overwrite="true">
+ <property name="archdir" value="${tmpdir}/org/jboss/weld/archetypes"/>
+ <mkdir dir="${archdir}"/>
+ <copy todir="${archdir}" overwrite="true">
<fileset dir="${user.home}/.m2/repository/org/jboss/weld/archetypes">
<include name="**/*"/>
</fileset>
@@ -370,8 +373,9 @@
<tasks>
<property name="tmpdir" value="${maven.private.repo}"/>
<delete dir="${tmpdir}" failonerror="false"/>
- <mkdir dir="${tmpdir}"/>
- <copy todir="${tmpdir}" overwrite="true">
+ <property name="archdir" value="${tmpdir}/org/jboss/weld/archetypes"/>
+ <mkdir dir="${archdir}"/>
+ <copy todir="${archdir}" overwrite="true">
<fileset dir="${user.home}/.m2/repository/org/jboss/weld/archetypes">
<include name="**/*"/>
</fileset>
@@ -535,7 +539,7 @@
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
- <version>2.1</version>
+ <version>${maven.glassfish.plugin.version}</version>
<configuration>
<glassfishDirectory>${env.GLASSFISH_HOME}</glassfishDirectory>
<user>${glassfish.admin.user}</user>
@@ -616,8 +620,9 @@
<tasks>
<property name="tmpdir" value="${maven.private.repo}"/>
<delete dir="${tmpdir}" failonerror="false"/>
- <mkdir dir="${tmpdir}"/>
- <copy todir="${tmpdir}" overwrite="true">
+ <property name="archdir" value="${tmpdir}/org/jboss/weld/archetypes"/>
+ <mkdir dir="${archdir}"/>
+ <copy todir="${archdir}" overwrite="true">
<fileset dir="${user.home}/.m2/repository/org/jboss/weld/archetypes">
<include name="**/*"/>
</fileset>
@@ -647,6 +652,12 @@
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <version>${xml.maven.plugin.version}</version>
+ </plugin>
+
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec.maven.plugin.version}</version>
More information about the weld-commits
mailing list