You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/03/26 17:29:24 UTC

[4/9] git commit: MARMOTTA-395: integration tests for the marmotta-archetype-webapp now use random port and local marmotta-home.

MARMOTTA-395: integration tests for the marmotta-archetype-webapp now use random port and local marmotta-home.


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/68280b1c
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/68280b1c
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/68280b1c

Branch: refs/heads/develop
Commit: 68280b1cc93817038ddab3ddaef3f1dd3ec8a76f
Parents: de57f1f
Author: Jakob Frank <ja...@apache.org>
Authored: Wed Mar 26 10:57:59 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Wed Mar 26 17:29:12 2014 +0100

----------------------------------------------------------------------
 build/archetypes/marmotta-archetype-webapp/pom.xml  | 16 ++++++++++++++++
 .../src/main/resources/archetype-resources/pom.xml  | 13 ++++++++++++-
 .../src/test/resources/projects/basic/goal.txt      |  2 +-
 3 files changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/68280b1c/build/archetypes/marmotta-archetype-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/build/archetypes/marmotta-archetype-webapp/pom.xml b/build/archetypes/marmotta-archetype-webapp/pom.xml
index 7f27dfa..14aff1b 100644
--- a/build/archetypes/marmotta-archetype-webapp/pom.xml
+++ b/build/archetypes/marmotta-archetype-webapp/pom.xml
@@ -91,6 +91,22 @@
 
         <plugins>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>reserve-network-port</id>
+                        <phase>initialize</phase>
+                        <goals><goal>reserve-network-port</goal></goals>
+                        <configuration>
+                            <portNames>
+                                <portName>randomPort</portName>
+                            </portNames>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <artifactId>maven-resources-plugin</artifactId>
                 <configuration>
                     <escapeString>\</escapeString>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/68280b1c/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/pom.xml b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/pom.xml
index 1ad47bd..c45a647 100644
--- a/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/build/archetypes/marmotta-archetype-webapp/src/main/resources/archetype-resources/pom.xml
@@ -427,6 +427,17 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <!-- This profile is used for integration testing
+                 during the build of the archetype.
+                 In your target project you can safely remove
+                 this profile.
+              -->
+            <id>archetype-it</id>
+            <properties>
+                <marmotta.port>${randomPort}</marmotta.port>
+            </properties>
+        </profile>
     </profiles>
 
     <dependencies>
@@ -543,5 +554,5 @@
         </dependency>
 
     </dependencies>
-    
+
 </project>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/68280b1c/build/archetypes/marmotta-archetype-webapp/src/test/resources/projects/basic/goal.txt
----------------------------------------------------------------------
diff --git a/build/archetypes/marmotta-archetype-webapp/src/test/resources/projects/basic/goal.txt b/build/archetypes/marmotta-archetype-webapp/src/test/resources/projects/basic/goal.txt
index 4b8caad..01221bd 100644
--- a/build/archetypes/marmotta-archetype-webapp/src/test/resources/projects/basic/goal.txt
+++ b/build/archetypes/marmotta-archetype-webapp/src/test/resources/projects/basic/goal.txt
@@ -1 +1 @@
-package verify
\ No newline at end of file
+clean verify -Parchetype-it -Pkiwi -Pcleanall -Dmarmotta.home=./target/archetype-it-marmotta-home/
\ No newline at end of file