Package org.eclipse.tycho.buildversion
Class ValidateVersionMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.buildversion.AbstractVersionMojo
-
- org.eclipse.tycho.buildversion.ValidateVersionMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="validate-version", defaultPhase=VALIDATE, threadSafe=true) public class ValidateVersionMojo extends AbstractVersionMojo
Validates project Maven and OSGi versions. For SNAPSHOT versions, OSGi version qualifier must be ".qualifier" and unqualified Maven and OSGi versions must be equal. For RELEASE versions, OSGi and Maven versions must be equal.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
strictVersions
Iftrue
(the default) will fail the build if Maven and OSGi project versions do not match.-
Fields inherited from class org.eclipse.tycho.buildversion.AbstractVersionMojo
packaging, project, projectTypes
-
-
Constructor Summary
Constructors Constructor Description ValidateVersionMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
private void
fail(java.lang.String message)
private java.lang.String
getOSGiMetadataFileName()
void
validateReleaseVersion(java.lang.String mavenVersion, java.lang.String osgiVersion)
void
validateSnapshotVersion(java.lang.String mavenVersion, java.lang.String osgiVersion)
-
Methods inherited from class org.eclipse.tycho.buildversion.AbstractVersionMojo
getOSGiId, getOSGiVersion
-
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
validateReleaseVersion
public void validateReleaseVersion(java.lang.String mavenVersion, java.lang.String osgiVersion) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getOSGiMetadataFileName
private java.lang.String getOSGiMetadataFileName()
-
validateSnapshotVersion
public void validateSnapshotVersion(java.lang.String mavenVersion, java.lang.String osgiVersion) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
fail
private void fail(java.lang.String message) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-