SLING-3520 - Consolidate archetype plugin versions in a parent pom
Update all archetypes to use the archetype parent. Projects missing
verification now run a simple verify script which validates that the
build was successful and no warnings were generated.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1594818 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index e745c29..f34cd91 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,9 +15,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling</artifactId>
- <version>19</version>
- <relativePath>../../../parent/pom.xml</relativePath>
+ <artifactId>sling-archetype-parent</artifactId>
+ <version>1</version>
+ <relativePath>../parent/pom.xml</relativePath>
</parent>
<artifactId>sling-launchpad-webapp-archetype</artifactId>
<version>1.0.1-SNAPSHOT</version>
@@ -36,15 +36,8 @@
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
- <version>2.0-alpha-4</version>
+ <version>${archetype.version}</version>
</extension>
</extensions>
- <plugins>
- <plugin>
- <artifactId>maven-archetype-plugin</artifactId>
- <version>2.0-alpha-4</version>
- <extensions>true</extensions>
- </plugin>
- </plugins>
</build>
</project>
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index 5cb5cef..570e7d0 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -14,18 +14,18 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>${groupId}</groupId>
- <artifactId>${artifactId}</artifactId>
- <version>${version}</version>
+ <groupId>\${groupId}</groupId>
+ <artifactId>\${artifactId}</artifactId>
+ <version>\${version}</version>
<packaging>war</packaging>
- <name>${artifactId} Launchpad Webapp</name>
- <description>${artifactId} Launchpad Webapp</description>
+ <name>\${artifactId} Launchpad Webapp</name>
+ <description>\${artifactId} Launchpad Webapp</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
- <version>2.0.10</version>
+ <version>${launchpadplugin.version}</version>
<executions>
<execution>
<id>prepare-package-war</id>
@@ -44,6 +44,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
+ <version>${warplugin.version}</version>
<configuration>
<webResources>
<resource>
@@ -66,7 +67,7 @@
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
- <version>6.1.23</version>
+ <version>${jettyplugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
@@ -81,4 +82,7 @@
<scope>runtime</scope>
</dependency>
</dependencies>
+ <properties>
+ <project.build.sourceEncoding>${project.build.sourceEncoding}</project.build.sourceEncoding>
+ </properties>
</project>
diff --git a/src/test/resources/projects/normal/archetype.properties b/src/test/resources/projects/normal/archetype.properties
new file mode 100644
index 0000000..c952896
--- /dev/null
+++ b/src/test/resources/projects/normal/archetype.properties
@@ -0,0 +1,4 @@
+groupId=org.apache.sling
+artifactId=test-bundle-archetype-project
+version=0.0.1-SNAPSHOT
+package=org.apache.sling.archetype.launchpadwebapp.testing
\ No newline at end of file
diff --git a/src/test/resources/projects/normal/goal.txt b/src/test/resources/projects/normal/goal.txt
new file mode 100644
index 0000000..4a1a71d
--- /dev/null
+++ b/src/test/resources/projects/normal/goal.txt
@@ -0,0 +1 @@
+verify
\ No newline at end of file
diff --git a/src/test/resources/projects/normal/verify.groovy b/src/test/resources/projects/normal/verify.groovy
new file mode 100644
index 0000000..8e4bc97
--- /dev/null
+++ b/src/test/resources/projects/normal/verify.groovy
@@ -0,0 +1,9 @@
+new File(basedir, '.').eachFileRecurse(groovy.io.FileType.FILES) { logFile ->
+ if ( logFile.name == "build.log" ) {
+ logFile.eachLine { line ->
+ if ( line.contains("WARNING") ) {
+ throw new RuntimeException("Warning found in line ${line}\nIn file ${logFile}");
+ }
+ }
+ }
+}
\ No newline at end of file