You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2023/07/10 17:17:03 UTC

[sling-org-apache-sling-models-impl] branch feature/move-its-to-impl-repo created (now 9f22f38)

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

kwin pushed a change to branch feature/move-its-to-impl-repo
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-impl.git


      at 9f22f38  Run ITs with Sling Starter 11 adjusted

This branch includes the following new commits:

     new 9f22f38  Run ITs with Sling Starter 11 adjusted

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[sling-org-apache-sling-models-impl] 01/01: Run ITs with Sling Starter 11 adjusted

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/move-its-to-impl-repo
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-impl.git

commit 9f22f38c26e5de10d3e143714f3f0f513f08239d
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Jul 10 19:16:57 2023 +0200

    Run ITs with Sling Starter 11 adjusted
---
 pom.xml                     | 157 ++++++++++++++++++++++++++++++++++++++++++--
 src/test/features/main.json |  25 +++++++
 2 files changed, 178 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index df80764..7cbebcb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,6 +39,7 @@
     <properties>
         <sling.java.version>8</sling.java.version>
         <project.build.outputTimestamp>2023-05-30T08:54:10Z</project.build.outputTimestamp>
+        <models.api.version>1.5.0</models.api.version>
     </properties>
     <build>
         <plugins>
@@ -93,6 +94,122 @@
                     <attach>false</attach>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>slingfeature-maven-plugin</artifactId>
+                <version>1.7.2</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <skipAddFeatureDependencies>true</skipAddFeatureDependencies>
+                    <skipAddJarToFeature>false</skipAddJarToFeature>
+                    <jarStartOrder>25</jarStartOrder>
+                    <framework>
+                        <groupId>org.apache.felix</groupId>
+                        <artifactId>org.apache.felix.framework</artifactId>
+                        <version>7.0.5</version>
+                    </framework>
+                    <!--
+                        Prepares a feature model aggregate that takes the following features from
+                        the Sling Starter:
+                        - nosample_base - the base Sling Starter
+                        - oak_persistence_sns - SegmentNodeStore persistence for Oak
+                        - composum - The Composum Nodes administration tool
+                        Notably missing are the slingshot and starter samples
+                     -->
+                    <aggregates>
+                        <aggregate>
+                            <classifier>app</classifier>
+                            <filesInclude>*.json</filesInclude>
+                        </aggregate>
+                    </aggregates>
+                    <repositories>
+                        <repository>
+                            <includeClassifier>app</includeClassifier>
+                        </repository>
+                    </repositories>
+                    <scans>
+                        <scan>
+                            <includeClassifier>app</includeClassifier>
+                        </scan>
+                    </scans>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>prepare-features</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>analyse-features</goal>
+                            <goal>attach-features</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>create-app-repository</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>repository</goal>
+                        </goals>
+                    </execution>
+               </executions>
+            </plugin>
+            <!-- reserve network ports for the integration tests -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>reserve-network-port</id>
+                        <goals>
+                            <goal>reserve-network-port</goal>
+                        </goals>
+                        <phase>pre-integration-test</phase>
+                        <configuration>
+                            <portNames>
+                                <portName>starter-its.http.port</portName>
+                            </portNames>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <!-- launch the Sling instances to test; only oak-tar -->
+            <plugin>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>feature-launcher-maven-plugin</artifactId>
+                <version>0.1.6</version>
+                <configuration>
+                    <!-- newer versions don't work due to https://issues.apache.org/jira/browse/SLING-11158 -->
+                    <featureLauncherVersion>1.1.26</featureLauncherVersion>
+                    <launches>
+                        <launch>
+                            <id>sling-starter-oak-tar</id>
+                            <feature>
+                                <groupId>${project.groupId}</groupId>
+                                <artifactId>${project.artifactId}</artifactId>
+                                <version>${project.version}</version>
+                                <classifier>app</classifier>
+                                <type>slingosgifeature</type>
+                            </feature>
+                            <repositoryUrls>
+                                <repositoryUrl>file://${project.build.directory}/artifacts</repositoryUrl>
+                            </repositoryUrls>
+                            <launcherArguments>
+                                <frameworkProperties>
+                                    <org.osgi.service.http.port>${starter-its.http.port}</org.osgi.service.http.port>
+                                </frameworkProperties>
+                            </launcherArguments>
+                            <startTimeoutSeconds>${starter-its.startTimeoutSeconds}</startTimeoutSeconds>
+                        </launch>
+                    </launches>
+                    <waitForInput>true</waitForInput>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>start</goal>
+                            <goal>stop</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
@@ -100,7 +217,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.models.api</artifactId>
-            <version>1.5.0</version>
+            <version>${models.api.version}</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -198,6 +315,12 @@
             <artifactId>annotations</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>javax.annotation</groupId>
+            <artifactId>javax.annotation-api</artifactId>
+            <version>1.3.2</version>
+            <scope>provided</scope>
+        </dependency>
         <!-- Test dependencies -->
         <dependency>
             <groupId>junit</groupId>
@@ -253,11 +376,37 @@
             <version>5.2.9.RELEASE</version>
             <scope>test</scope>
         </dependency>
+        
+        <!-- Additional dependencies needed for ITs -->
         <dependency>
-            <groupId>javax.annotation</groupId>
-            <artifactId>javax.annotation-api</artifactId>
-            <version>1.3.2</version>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.junit.core</artifactId>
+            <version>1.0.28</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.testing.rules</artifactId>
+            <version>1.0.8</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.testing.clients</artifactId>
+            <version>2.0.12</version>
+            <scope>test</scope>
+            <exclusions>
+              <exclusion>
+                <groupId>javax.servlet</groupId>
+                <artifactId>servlet-api</artifactId>
+              </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.junit.teleporter</artifactId>
+            <version>1.0.20</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
diff --git a/src/test/features/main.json b/src/test/features/main.json
new file mode 100644
index 0000000..e1c15e8
--- /dev/null
+++ b/src/test/features/main.json
@@ -0,0 +1,25 @@
+{
+  "prototype" : {
+     "id" : "org.apache.sling:org.apache.sling.starter:slingosgifeature:oak_tar:12",
+     "removals" : {
+         "bundles" : [
+                "${project.groupId}:${project.artifactId}:0",
+                "org.apache.sling:org.apache.sling.models.api:0"
+            ]
+     }
+  },
+  "bundles": [
+    {
+        "id":"${project.groupId}:${project.artifactId}:${project.version}",
+        "start-order": 24
+    },
+    {
+        "id":"org.apache.sling:org.apache.sling.models.api:${models.api.version}",
+        "start-order": 24
+    },
+    {
+        "id":"org.apache.sling:org.apache.sling.junit.core:1.1.6",
+        "start-order": 24
+    }
+  ]
+}
\ No newline at end of file