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 <[email protected]> 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 "[email protected]" <[email protected]>.
