Skip to content

Commit

Permalink
SLING-11395 - Create a profile that allows running the Sling Starter …
Browse files Browse the repository at this point in the history
…ITs with the current SNAPSHOT being built

Switch to slingfeature-maven-plugin (WIP)
  • Loading branch information
rombert committed Jun 29, 2022
1 parent f14b67d commit 44e8d47
Showing 1 changed file with 72 additions and 12 deletions.
84 changes: 72 additions & 12 deletions sling-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,14 @@
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
</exclusion>
<exclusion>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand All @@ -931,24 +939,68 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>slingfeature-maven-plugin</artifactId>
<version>1.6.4</version>
<extensions>true</extensions>
<executions>
<execution>
<id>create-local-feature</id>
<goals>
<goal>include-artifact</goal>
</goals>
<configuration>
<includeArtifactClassifier>local-feature</includeArtifactClassifier>
</configuration>
</execution>
<execution>
<id>aggregate-features</id>
<phase>prepare-package</phase>
<goals>
<goal>attach-features</goal>
<goal>aggregate-features</goal>
</goals>
<configuration>
<aggregates>
<aggregate>
<!-- aggregate the Sling Starter with the additional testing files from this module -->
<classifier>testing_oak_tar</classifier>
<!-- depend on the exact same Slingstart version -->
<includeArtifact>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.starter</artifactId>
<version>${it.starter.version}</version>
<classifier>oak_tar_test</classifier>
<type>slingosgifeature</type>
</includeArtifact>
<includeClassifier>local-feature</includeClassifier>
<!-- To apply the same override rule for all clashes, a wildcard using '*' for
groupID and artifactID can be used; this can be used as a catch all -->
<artifactsOverrides>
<artifactsOverride>${project.groupId}:${project.artifactId}:${project.version}</artifactsOverride>
</artifactsOverrides>
</aggregate>
</aggregates>
</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.3-SNAPSHOT</version>
<version>0.1.2</version>
<configuration>
<launches>
<launch>
<id>sling-starter-oak-tar</id>
<!-- Include the bundle currently being built -->
<additionalBundles>
<additionalBundle>${project.groupId}:${project.artifactId}:${project.version}</additionalBundle>
</additionalBundles>
<!-- Include the feature previously aggregated built -->
<feature>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.starter</artifactId>
<version>${it.starter.version}</version>
<classifier>oak_tar_test</classifier>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<classifier>testing_oak_tar</classifier>
<type>slingosgifeature</type>
</feature>
<launcherArguments>
Expand All @@ -972,6 +1024,14 @@
<!-- run the ITs -->
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<!-- ensure that tests are run with JUnit 4, even if the test classpath has JUnit 5 -->
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>${surefire.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
Expand All @@ -981,9 +1041,9 @@
</execution>
</executions>
<configuration>
<dependenciesToScan>
<dependency>org.apache.sling:org.apache.sling.launchpad.integration-tests</dependency>
</dependenciesToScan>
<dependenciesToScan>
<dependency>org.apache.sling:org.apache.sling.launchpad.integration-tests</dependency>
</dependenciesToScan>
<includes>
<include>**/*Test.java</include>
<include>**/*IT.java</include>
Expand Down

0 comments on commit 44e8d47

Please sign in to comment.