![JAR search and dependency download from the Maven repository](/logo.png)
org.kuali.maven.plugins.GetSvnRevisionMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-manifest-plugin Show documentation
Show all versions of maven-manifest-plugin Show documentation
Tools for inspecting MANIFEST.MF files
The newest version!
package org.kuali.maven.plugins;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.plugin.MojoExecutionException;
/**
* Examine a MANIFEST.MF file for the presence of an SVN revision number.
*
* @author Jeff Caddel
* @goal getsvnrevision
*/
public class GetSvnRevisionMojo extends GetAttributeMojo {
@Override
protected void validate(String revisionNumber) throws MojoExecutionException {
if (StringUtils.isBlank(revisionNumber)) {
throw new MojoExecutionException("Could not locate a value for " + getAttribute() + " in " + getFilename());
}
Integer number = Integer.parseInt(revisionNumber);
if (number < 0) {
throw new MojoExecutionException("Negative revision number");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy