Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Dynamic Versioning SCM plugin #1082

Prev Previous commit
Next Next commit
refactor: Change goal name to use-dynamic-version-from-scm
  • Loading branch information
jimisola committed Jun 22, 2024
commit 49ef3f7b8fad7b77b7a67b0b2405c315686bfbb1
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;

/**
* Maven plugin that uses SCM/VCS to enable dynamic versioning based on your version
* Maven plugin that uses SCM/VCS to enable dynamic versioning based on your
* version
* control system.
*
* @author Jimisola Laursen
* @since 2.17.0
*/
@Mojo(name = "set-version-from-scm-tag", defaultPhase = LifecyclePhase.INITIALIZE)
@Mojo(name = "use-dynamic-version-from-scm", defaultPhase = LifecyclePhase.INITIALIZE)
public class DynamicVersioningSCMPlugin extends AbstractMojo {

/**
Expand Down Expand Up @@ -85,7 +86,8 @@ public class DynamicVersioningSCMPlugin extends AbstractMojo {
protected String useVersion;

/**
* The default version used when SCM repository has no commit or no semantic version
* The default version used when SCM repository has no commit or no semantic
* version
* tag.
*
* @since 2.17.0
Expand Down Expand Up @@ -116,9 +118,12 @@ public void execute() throws MojoExecutionException {
}

/**
* Returns the resolved version based on SCM tag information for use with Maven CI.
* @throws org.apache.maven.plugin.MojoExecutionException Something wrong with the
* plugin itself
* Returns the resolved version based on SCM tag information for use with Maven
* CI.
*
* @throws org.apache.maven.plugin.MojoExecutionException Something wrong with
* the
* plugin itself
*/
protected VersionInformation getVersionFromSCM() throws MojoExecutionException {
// check for repository
Expand Down
Loading