You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by an...@apache.org on 2019/04/19 13:55:33 UTC

[sling-project-archetype] 05/05: Updated the Project Archetype to Sling 11 and the latest Maven Plugins

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

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

commit f7215181ec600763d2145d74e242de8ef3835fb7
Author: Andreas Schaefer <ac...@Andreass-iMac.local>
AuthorDate: Thu Apr 11 17:56:58 2019 -0700

    Updated the Project Archetype to Sling 11 and the latest Maven Plugins
    
    Adjusted the OSGi dependency to use the R7 dependencies, rerordered them as needed, reduced the size of the POM description to avoid issues with the Manifest and added an empty class to the ‘core’ as without the bundle plugin would fail because of the missing target/class folder.
---
 .../archetype-resources/core.example/pom.xml       | 19 ++++---
 .../resources/archetype-resources/core/pom.xml     | 19 ++++---
 .../core/src/main/java/empty/DoesNothing.java      | 20 +++++++
 src/main/resources/archetype-resources/pom.xml     | 61 +++++++++++++---------
 .../archetype-resources/ui.apps.example/pom.xml    |  4 +-
 .../resources/archetype-resources/ui.apps/pom.xml  |  9 ++--
 6 files changed, 81 insertions(+), 51 deletions(-)

diff --git a/src/main/resources/archetype-resources/core.example/pom.xml b/src/main/resources/archetype-resources/core.example/pom.xml
index 7125281..e1036af 100644
--- a/src/main/resources/archetype-resources/core.example/pom.xml
+++ b/src/main/resources/archetype-resources/core.example/pom.xml
@@ -94,17 +94,8 @@
     </build>
     <dependencies>
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-
-        <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <artifactId>osgi.core</artifactId>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -118,8 +109,16 @@
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.metatype.annotations</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
 
         <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
             <groupId>javax.jcr</groupId>
             <artifactId>jcr</artifactId>
         </dependency>
diff --git a/src/main/resources/archetype-resources/core/pom.xml b/src/main/resources/archetype-resources/core/pom.xml
index 8a81b01..e298d91 100644
--- a/src/main/resources/archetype-resources/core/pom.xml
+++ b/src/main/resources/archetype-resources/core/pom.xml
@@ -88,17 +88,8 @@
     </build>
     <dependencies>
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-
-        <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <artifactId>osgi.core</artifactId>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -112,8 +103,16 @@
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.metatype.annotations</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
 
         <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
             <groupId>javax.jcr</groupId>
             <artifactId>jcr</artifactId>
         </dependency>
diff --git a/src/main/resources/archetype-resources/core/src/main/java/empty/DoesNothing.java b/src/main/resources/archetype-resources/core/src/main/java/empty/DoesNothing.java
new file mode 100644
index 0000000..be62b88
--- /dev/null
+++ b/src/main/resources/archetype-resources/core/src/main/java/empty/DoesNothing.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package empty;
+
+public class DoesNothing {
+}
\ No newline at end of file
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index 2398b46..3cce2c5 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -59,27 +59,35 @@
 
         <release.plugin.version>2.5.3</release.plugin.version>
         <source.plugin.version>3.0.1</source.plugin.version>
-        <resource.plugin.version>3.0.2</resource.plugin.version>
-        <jar.plugin.version>3.0.2</jar.plugin.version>
-        <enforcer.plugin.version>1.4.1</enforcer.plugin.version>
-        <compiler.plugin.version>3.6.1</compiler.plugin.version>
-        <bundle.plugin.version>2.5.4</bundle.plugin.version>
-        <clean.plugin.version>3.0.0</clean.plugin.version>
-        <installer.plugin.version>2.5.2</installer.plugin.version>
-        <surfire.plugin.version>2.20</surfire.plugin.version>
-        <failsafe.plugin.version>2.20</failsafe.plugin.version>
-        <deploy.plugin.version>2.8.2</deploy.plugin.version>
-        <sling.plugin.version>2.3.2</sling.plugin.version>
-        <dependency.plugin.version>3.0.0</dependency.plugin.version>
+        <resource.plugin.version>3.1.0</resource.plugin.version>
+        <jar.plugin.version>3.1.1</jar.plugin.version>
+        <enforcer.plugin.version>3.0.0-M2</enforcer.plugin.version>
+        <compiler.plugin.version>3.8.0</compiler.plugin.version>
+        <bundle.plugin.version>4.2.0</bundle.plugin.version>
+        <clean.plugin.version>3.1.0</clean.plugin.version>
+        <installer.plugin.version>3.0.0-M1</installer.plugin.version>
+        <surfire.plugin.version>3.0.0-M3</surfire.plugin.version>
+        <failsafe.plugin.version>3.0.0-M3</failsafe.plugin.version>
+        <deploy.plugin.version>3.0.0-M1</deploy.plugin.version>
+        <sling.plugin.version>2.4.0</sling.plugin.version>
+        <dependency.plugin.version>3.1.1</dependency.plugin.version>
         <build.helper.plugin.version>3.0.0</build.helper.plugin.version>
-        <vcmio.plugin.version>1.6.0</vcmio.plugin.version>
-        <filevault-package.plugin.version>1.0.0</filevault-package.plugin.version>
+        <wcmio.plugin.version>1.6.18</wcmio.plugin.version>
+        <filevault-package.plugin.version>1.0.3</filevault-package.plugin.version>
 
+        <osgi.core.version>7.0.0</osgi.core.version>
+        <osgi.annotation.version>7.0.0</osgi.annotation.version>
+        <org.osgi.service.component.annotations.version>1.4.0</org.osgi.service.component.annotations.version>
+        <org.osgi.service.metatype.annotations.version>1.4.0</org.osgi.service.metatype.annotations.version>
+        <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version>
+        <javax.servlet-api.version>3.1.0</javax.servlet-api.version>
+        <javax.inject.version>1</javax.inject.version>
+        <jcr.version>2.0</jcr.version>
         <sling.models.api.version>1.3.6</sling.models.api.version>
         <jetbrains.annotations.version>16.0.2</jetbrains.annotations.version>
-        <sling.settings.version>1.3.8</sling.settings.version>
+        <sling.settings.version>1.3.10</sling.settings.version>
         <sling.commons.osgi.version>2.4.0</sling.commons.osgi.version>
-        <jackrabbit-api.version>2.14.4</jackrabbit-api.version>
+        <jackrabbit-api.version>2.16.3</jackrabbit-api.version>
         <commons-lang.version>2.6</commons-lang.version>
         <jmock-junit4.version>2.8.2</jmock-junit4.version>
     </properties>
@@ -238,7 +246,7 @@
                 <plugin>
                     <groupId>io.wcm.maven.plugins</groupId>
                     <artifactId>wcmio-content-package-maven-plugin</artifactId>
-                    <version>${vcmio.plugin.version}</version>
+                    <version>${wcmio.plugin.version}</version>
                     <configuration>
                         <serviceURL>http://${sling.host}:${sling.port}/bin/cpm/</serviceURL>
                         <userId>${sling.user}</userId>
@@ -280,8 +288,8 @@
             <!-- OSGi Dependencies -->
             <dependency>
                 <groupId>org.osgi</groupId>
-                <artifactId>org.osgi.core</artifactId>
-                <version>6.0.0</version>
+                <artifactId>osgi.core</artifactId>
+                <version>${osgi.core.version}</version>
                 <scope>provided</scope>
             </dependency>
 
@@ -289,7 +297,7 @@
             <dependency>
                 <groupId>org.osgi</groupId>
                 <artifactId>osgi.annotation</artifactId>
-                <version>6.0.1</version>
+                <version>${osgi.annotation.version}</version>
                 <scope>provided</scope>
             </dependency>
 
@@ -297,20 +305,21 @@
             <dependency>
                 <groupId>org.osgi</groupId>
                 <artifactId>org.osgi.service.component.annotations</artifactId>
-                <version>1.3.0</version>
+                <version>${org.osgi.service.component.annotations.version}</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.osgi</groupId>
                 <artifactId>org.osgi.service.metatype.annotations</artifactId>
-                <version>1.3.0</version>
+                <version>${org.osgi.service.metatype.annotations.version}</version>
                 <scope>provided</scope>
             </dependency>
 
+            <!-- Needs to be placed after 'org.osgi.service.component.annotations' otherwise field @Reference will not work -->
             <dependency>
                 <groupId>org.osgi</groupId>
                 <artifactId>org.osgi.compendium</artifactId>
-                <version>4.2.0</version>
+                <version>${org.osgi.compendium.version}</version>
                 <scope>provided</scope>
             </dependency>
 
@@ -318,7 +327,7 @@
             <dependency>
                 <groupId>javax.servlet</groupId>
                 <artifactId>javax.servlet-api</artifactId>
-                <version>3.1.0</version>
+                <version>${javax.servlet-api.version}</version>
                 <scope>provided</scope>
             </dependency>
 
@@ -326,7 +335,7 @@
             <dependency>
                 <groupId>javax.inject</groupId>
                 <artifactId>javax.inject</artifactId>
-                <version>1</version>
+                <version>$[javax.inject.version</version>
                 <scope>provided</scope>
             </dependency>
 
@@ -334,7 +343,7 @@
             <dependency>
                 <groupId>javax.jcr</groupId>
                 <artifactId>jcr</artifactId>
-                <version>2.0</version>
+                <version>${jcr.version}</version>
                 <scope>provided</scope>
             </dependency>
 
diff --git a/src/main/resources/archetype-resources/ui.apps.example/pom.xml b/src/main/resources/archetype-resources/ui.apps.example/pom.xml
index dd9d029..561a51c 100644
--- a/src/main/resources/archetype-resources/ui.apps.example/pom.xml
+++ b/src/main/resources/archetype-resources/ui.apps.example/pom.xml
@@ -37,6 +37,8 @@
     <name>\${artifactName} - UI Apps Example</name>
     <description>
         This is the Example Module for the Sample UI Apps module (ui.apps).
+    </description>
+    <!--
         The basic idea is to have a clean 'ui.apps' module in which you
         can choose what examples you want to use rather than having
         to delete a bunch of examples.
@@ -51,7 +53,7 @@
 
         The profile to deploy the bundle is removed to avoid accidental
         deployments.
-    </description>
+    -->
 
     <!-- @startForNotAll@ This is used for the Post Generation Handling. Do not alter or remove -->
     <dependencies>
diff --git a/src/main/resources/archetype-resources/ui.apps/pom.xml b/src/main/resources/archetype-resources/ui.apps/pom.xml
index 1a10ede..6c9d02b 100644
--- a/src/main/resources/archetype-resources/ui.apps/pom.xml
+++ b/src/main/resources/archetype-resources/ui.apps/pom.xml
@@ -38,12 +38,13 @@
     <description>
         This is an empty JCR Package where the JCR Content
         can be deployed with.
-
-        For a "not all" package this JCR Package will embedd
+    </description>
+    <!-- NOTE:
+        For a 'not all' package this JCR Package will embedd
         the "core" bundle. It can be deployed with the
         "autoInstallPackage" profile.
 
-        For an "all" package this only provides the content
+        For an 'all' package this only provides the content
         of the project which is deployed in the root with
         the "autoInstallAll" profile.
 
@@ -51,7 +52,7 @@
         in one manner as deploying bundles inside a package
         and through the System Console can lead to unexpected
         and errorneous situations.
-    </description>
+    -->
 
     <!-- @startForNotAll@ This is used for the Post Generation Handling. Do not alter or remove -->
     <dependencies>