You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:29:47 UTC

[sling-launchpad-standalone-archetype] 05/15: SLING-3520 - Consolidate archetype plugin versions in a parent pom

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-launchpad-standalone-archetype.git

commit 462e9831aa760c9b4c4699048cac8d47e45f7cf4
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu May 15 08:36:08 2014 +0000

    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
---
 pom.xml                                                 | 15 ++++-----------
 src/main/resources/archetype-resources/pom.xml          | 16 ++++++++++------
 src/test/resources/projects/normal/archetype.properties |  4 ++++
 src/test/resources/projects/normal/goal.txt             |  1 +
 src/test/resources/projects/normal/verify.groovy        |  9 +++++++++
 5 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/pom.xml b/pom.xml
index 122ae05..aa41761 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-standalone-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 a4e8cd4..3a65738 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>jar</packaging>
-    <name>${artifactId} Launchpad Standalone</name>
-    <description>${artifactId} Launchpad Standalone</description>
+    <name>\${artifactId} Launchpad Standalone</name>
+    <description>\${artifactId} Launchpad Standalone</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-jar</id>
@@ -48,6 +48,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
+                <version>${jarplugin.version}</version>
                 <configuration>
                     <archive>
                         <manifestFile>${symbol_dollar}{project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
@@ -68,4 +69,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..3e6af0c
--- /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.launchpadstandalone.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

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.