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/11/07 10:20:37 UTC
[sling-org-apache-sling-testing-paxexam] 08/39: SLING-6038 Provide
convenient method to set versions from Maven project
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.paxexam-0.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-paxexam.git
commit e32c8c28502e200703f67110c44cb51ca9e8ff3e
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Fri Jan 13 12:48:54 2017 +0000
SLING-6038 Provide convenient method to set versions from Maven project
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/org.apache.sling.testing.paxexam@1778574 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/resources/templates/SlingVersionResolver.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/resources/templates/SlingVersionResolver.txt b/src/main/resources/templates/SlingVersionResolver.txt
index f3a7bef..ddf3856 100644
--- a/src/main/resources/templates/SlingVersionResolver.txt
+++ b/src/main/resources/templates/SlingVersionResolver.txt
@@ -21,6 +21,7 @@ package org.apache.sling.testing.paxexam;
import java.util.HashMap;
import java.util.Map;
+import org.ops4j.pax.exam.MavenUtils;
import org.ops4j.pax.exam.options.MavenUrlReference.VersionResolver;
/**
@@ -63,6 +64,11 @@ public class SlingVersionResolver implements VersionResolver {
return versions.put(key(groupId, artifactId), version);
}
+ public String setVersionFromProject(final String groupId, final String artifactId) {
+ final String version = MavenUtils.getArtifactVersion(groupId, artifactId);
+ return versions.put(key(groupId, artifactId), version);
+ }
+
@Override
public String getVersion(final String groupId, final String artifactId) {
return versions.get(key(groupId, artifactId));
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.