Class AbstractVersionInfoMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.tentackle.maven.AbstractTentackleMojo
org.tentackle.maven.plugin.AbstractVersionInfoMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
PluginVersionInfoMojo, VersionInfoMojo

public abstract class AbstractVersionInfoMojo extends AbstractTentackleMojo
Base class for the version info mojos.

Logs the versions of a set of artifacts as XML elements, ready to be pasted into the properties section of a pom. The property names are of the form version.groupIdInCamelCase.artifactIdInCamelCase, where dots, dashes and underscores separate the camel case words. Optionally, the result is written to a file as well.

  • Constructor Details

    • AbstractVersionInfoMojo

      public AbstractVersionInfoMojo()
  • Method Details

    • generateVersionProperties

      protected void generateVersionProperties(String comment, Set<org.eclipse.aether.artifact.Artifact> artifacts) throws org.apache.maven.plugin.MojoExecutionException
      Generates the version properties.
      Parameters:
      comment - the comment/title
      artifacts - the artifacts
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if writing the output file failed