Java Code Examples for org.apache.maven.artifact.Artifact#SNAPSHOT_VERSION

The following examples show how to use org.apache.maven.artifact.Artifact#SNAPSHOT_VERSION . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: sarl   File: Bug526.java    License: Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
	Bundle bundle = Platform.getBundle(SARL_LANG_BUNDLE_NAME);
	Version osgiVersion = bundle.getVersion();
	this.sarlBundleVersion = Integer.toString(osgiVersion.getMajor())
			+ "." + Integer.toString(osgiVersion.getMinor())
			+ "." + Integer.toString(osgiVersion.getMicro());
	if (!Strings.isNullOrEmpty(osgiVersion.getQualifier())) {
		this.sarlBundleVersion += "-" + Artifact.SNAPSHOT_VERSION;
	}
	assertNotNullOrEmpty(this.sarlBundleVersion);
	this.janusBundleVersion = "2." + this.sarlBundleVersion;
	assertNotNullOrEmpty(this.janusBundleVersion);
}
 
Example 2
@Before
public void setUp() throws Exception {
	Bundle bundle = Platform.getBundle(SARL_LANG_BUNDLE_NAME);
	Version osgiVersion = bundle.getVersion();
	this.bundleVersion = Integer.toString(osgiVersion.getMajor())
			+ "." + Integer.toString(osgiVersion.getMinor())
			+ "." + Integer.toString(osgiVersion.getMicro());
	if (!Strings.isNullOrEmpty(osgiVersion.getQualifier())) {
		this.bundleVersion += "-" + Artifact.SNAPSHOT_VERSION;
	}
	assertNotNullOrEmpty(this.bundleVersion);
}
 
Example 3
/**
 * Gets version with appended feature name.
 * 
 * @param featureName
 *            Feature name to append.
 * @return Version with appended feature name.
 */
public String featureVersion(final String featureName) {
    String version = toString();
    if (featureName != null) {
        version = getReleaseVersionString() + "-" + featureName
                + (isSnapshot() ? "-" + Artifact.SNAPSHOT_VERSION : "");
    }
    return version;
}