Package org.apache.sling.testing.paxexam
Class SlingVersionResolver
java.lang.Object
org.apache.sling.testing.paxexam.SlingVersionResolver
- All Implemented Interfaces:
org.ops4j.pax.exam.options.MavenUrlReference.VersionResolver
public class SlingVersionResolver
extends Object
implements org.ops4j.pax.exam.options.MavenUrlReference.VersionResolver
Sling's Version Resolver for Sling's Options.
NOTE: This file is generated from Sling's Karaf Features
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Gets the Java major version from System propertyjava.specification.version
or0
in case of error.getVersion
(String groupId, String artifactId) Gets the version of the bundle.setVersion
(String groupId, String artifactId, String version) Sets the version of the bundle.setVersionFromProject
(String groupId, String artifactId) Sets the version of the bundle by using the declared version from Maven project.
-
Field Details
-
SLING_GROUP_ID
- See Also:
-
-
Constructor Details
-
SlingVersionResolver
public SlingVersionResolver()Creates a newSlingVersionResolver
.
-
-
Method Details
-
setVersion
Sets the version of the bundle.- Parameters:
groupId
- the group IDartifactId
- the artifact IDversion
- the version- Returns:
- the previous version, or
null
-
setVersionFromProject
Sets the version of the bundle by using the declared version from Maven project.- Parameters:
groupId
- the group IDartifactId
- the artifact ID- Returns:
- the previous version, or
null
-
getVersion
Gets the version of the bundle.- Specified by:
getVersion
in interfaceorg.ops4j.pax.exam.options.MavenUrlReference.VersionResolver
- Parameters:
groupId
- the group IDartifactId
- the artifact ID- Returns:
- the version, or
null
-
getJavaVersion
public static int getJavaVersion()Gets the Java major version from System propertyjava.specification.version
or0
in case of error.- Returns:
- the Java version
-