Skip to content

Commit

Permalink
Remove envs from invoker.properties, add since for parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Jun 22, 2024
1 parent 2c04383 commit 8fb2a24
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag
invoker.buildResult = failure
invoker.environmentVariables.GIT_AUTHOR_NAME=User Example
invoker.environmentVariables.GIT_AUTHOR_EMAIL=user@example.com
invoker.environmentVariables.GIT_DEFAULT_BRANCH=main
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag
invoker.environmentVariables.GIT_AUTHOR_NAME=User Example
invoker.environmentVariables.GIT_AUTHOR_EMAIL=user@example.com
invoker.environmentVariables.GIT_DEFAULT_BRANCH=main
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
invoker.goals=-X ${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag
invoker.environmentVariables.GIT_AUTHOR_NAME=User Example
invoker.environmentVariables.GIT_AUTHOR_EMAIL=user@example.com
invoker.environmentVariables.GIT_DEFAULT_BRANCH=main
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag
invoker.environmentVariables.GIT_AUTHOR_NAME=User Example
invoker.environmentVariables.GIT_AUTHOR_EMAIL=user@example.com
invoker.environmentVariables.GIT_DEFAULT_BRANCH=main
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag -DappendSnapshot=false
invoker.environmentVariables.GIT_AUTHOR_NAME=User Example
invoker.environmentVariables.GIT_AUTHOR_EMAIL=user@example.com
invoker.environmentVariables.GIT_DEFAULT_BRANCH=main
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag -DuseVersion=9.9.9-9
invoker.environmentVariables.GIT_AUTHOR_NAME=User Example
invoker.environmentVariables.GIT_AUTHOR_EMAIL=user@example.com
invoker.environmentVariables.GIT_DEFAULT_BRANCH=main
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag -DpropertyName=version_from_scm
invoker.environmentVariables.GIT_AUTHOR_NAME=User Example
invoker.environmentVariables.GIT_AUTHOR_EMAIL=user@example.com
invoker.environmentVariables.GIT_DEFAULT_BRANCH=main
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,41 @@ public class DynamicVersioningSCMPlugin extends AbstractMojo {

/**
* The Maven Project Object
*
* @since 2.17.0
*/
@Parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;

/**
* The name of the property that will contain the resolved version.
*
* @since 2.17.0
*/
@Parameter(property = "propertyName", defaultValue = "revision")
protected String propertyName;

/**
* Whether the SNAPSHOT qualifier shall be apppended or not.
*
* @since 2.17.0
*/
@Parameter(property = "appendSnapshot", defaultValue = "true")
protected boolean appendSnapshot;

/**
* Set the version instead of resolving from SCM tag information.
*
* @since 2.17.0
*/
@Parameter(property = "useVersion")
protected String useVersion;

/**
* The default version used when SCM repository has no commit or no semantic version
* tag.
*
* @since 2.17.0
*/
@Parameter(property = "defaultVersion", defaultValue = "0.0.1")
protected String defaultVersion;
Expand Down

0 comments on commit 8fb2a24

Please sign in to comment.