com.itemis.maven.plugins.unleash.util.predicates.IsSnapshotProject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unleash-maven-plugin Show documentation
Show all versions of unleash-maven-plugin Show documentation
This plugin provides a generic alternative to the error-prone default release plugin provided by Maven. It is designed to require a minimal effort of work for releasing modules and being extensible to integrate in every project setup.
package com.itemis.maven.plugins.unleash.util.predicates;
import org.apache.maven.project.MavenProject;
import com.google.common.base.Predicate;
import com.itemis.maven.plugins.unleash.util.MavenVersionUtil;
/**
* A predicate determining whether a {@link Project} has a SNAPSHOT version assigned.
*
* @author Stanley Hillner
* @since 1.0.0
*/
public enum IsSnapshotProject implements Predicate {
INSTANCE;
@Override
public boolean apply(MavenProject p) {
String version = p.getVersion();
return version != null && MavenVersionUtil.isSnapshot(version);
}
}