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 2018/01/04 10:31:23 UTC
[sling-slingstart-maven-plugin] branch master updated: SLING-7318
no longer rely on commons-osgi for the test
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new e25e1e8 SLING-7318 no longer rely on commons-osgi for the test
e25e1e8 is described below
commit e25e1e8cb7020518677540ea4b43cf578ac9ab7b
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Jan 4 11:31:19 2018 +0100
SLING-7318 no longer rely on commons-osgi for the test
Commons OSGi was referred to in an old version (which was not
necessarily contained in the m2 repo). Commons OSGi is is not a
test-only dependency and therefore the version might change in the
future. For the test only dependencies it is easier to ensure that those
versions don't change.
---
pom.xml | 3 ++-
.../sling/maven/slingstart/PreparePackageMojoTest.java | 12 +-----------
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/pom.xml b/pom.xml
index 58aae87..f0bc91b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -251,7 +251,8 @@
</dependency>
<!-- The following artifacts are purely used by the unit tests
- so these dependencies ensures that they are in the .m2 directory -->
+ so these dependencies ensures that they are in the .m2 directory prior to executing the tests.
+ Whenever you modify these, you must also modify the references in org.apache.sling.maven.slingstart.PreparePackageMojoTest! -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.classloader</artifactId>
diff --git a/src/test/java/org/apache/sling/maven/slingstart/PreparePackageMojoTest.java b/src/test/java/org/apache/sling/maven/slingstart/PreparePackageMojoTest.java
index ad2d3fc..db33400 100644
--- a/src/test/java/org/apache/sling/maven/slingstart/PreparePackageMojoTest.java
+++ b/src/test/java/org/apache/sling/maven/slingstart/PreparePackageMojoTest.java
@@ -144,7 +144,6 @@ public class PreparePackageMojoTest {
"org.apache.sling/org.apache.sling.commons.contentdetection/1.0.2",
"org.apache.sling/org.apache.sling.commons.johnzon/1.0.0",
"org.apache.sling/org.apache.sling.commons.mime/2.1.8",
- "org.apache.sling/org.apache.sling.commons.osgi/2.3.0",
"org.apache.sling/org.apache.sling.commons.threads/3.2.0");
try {
@@ -160,9 +159,6 @@ public class PreparePackageMojoTest {
" Subsystem-Description: Extra subsystem headers can go here including very long ones that would span multiple lines in a manifest\n" +
" Subsystem-Copyright: (c) 2015 yeah!\n" +
"" +
- "[artifacts]\n" +
- " org.apache.sling/org.apache.sling.commons.osgi/2.3.0\n" +
- "" +
"[artifacts startLevel=10]\n" +
" org.apache.sling/org.apache.sling.commons.johnzon/1.0.0\n" +
" org.apache.sling/org.apache.sling.commons.mime/2.1.8\n" +
@@ -180,8 +176,7 @@ public class PreparePackageMojoTest {
// Test META-INF/MANIFEST.MF
Manifest mf = jf.getManifest();
Attributes attrs = mf.getMainAttributes();
- String expected = "Potential_Bundles/0/org.apache.sling.commons.osgi-2.3.0.jar|"
- + "Potential_Bundles/10/org.apache.sling.commons.johnzon-1.0.0.jar|"
+ String expected = "Potential_Bundles/10/org.apache.sling.commons.johnzon-1.0.0.jar|"
+ "Potential_Bundles/10/org.apache.sling.commons.mime-2.1.8.jar";
assertEquals(expected, attrs.getValue("_all_"));
assertEquals("Potential_Bundles/20/org.apache.sling.commons.threads-3.2.0.jar", attrs.getValue("foo"));
@@ -203,11 +198,6 @@ public class PreparePackageMojoTest {
// Test embedded bundles
File mrr = getMavenRepoRoot();
- File soj = getMavenArtifactFile(mrr, "org.apache.sling", "org.apache.sling.commons.osgi", "2.3.0");
- ZipEntry sojZE = jf.getEntry("Potential_Bundles/0/org.apache.sling.commons.osgi-2.3.0.jar");
- try (InputStream is = jf.getInputStream(sojZE)) {
- assertArtifactsEqual(soj, is);
- }
File sjj = getMavenArtifactFile(mrr, "org.apache.sling", "org.apache.sling.commons.johnzon", "1.0.0");
ZipEntry sjZE = jf.getEntry("Potential_Bundles/10/org.apache.sling.commons.johnzon-1.0.0.jar");
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].