File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed
src/main/java/io/github/zorin95670/semver Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,30 @@ mvn io.github.zorin95670:semantic-version:release -DtagPrefix=plugin-a@
109
109
110
110
---
111
111
112
+ ### 📂 Specifying the Working Directory (` basedir ` )
113
+
114
+ All plugin goals support the ` basedir ` parameter, which determines the directory where the command operates.
115
+
116
+ * ** Default:** The current working directory where the command is executed.
117
+ * ** Override:** You can explicitly set the directory using ` -Dbasedir=/path/to/your/project ` .
118
+
119
+ #### Examples:
120
+
121
+ ``` bash
122
+ # Run changelog in a specific module
123
+ mvn io.github.zorin95670:semantic-version:changelog \
124
+ -DtagPrefix=plugin-a@ \
125
+ -Dscope=plugin-a \
126
+ -Dbasedir=plugins/plugin-a
127
+
128
+ # Run release from a custom folder
129
+ mvn io.github.zorin95670:semantic-version:release \
130
+ -DtagPrefix=plugin-b@ \
131
+ -Dbasedir=/absolute/path/to/plugin-b
132
+ ```
133
+
134
+ ---
135
+
112
136
## Version Bumping Rules
113
137
114
138
The plugin determines the next semantic version based on commit messages using the following logic:
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public class CheckCommitMojo extends AbstractMojo {
18
18
@ Parameter (property = "failOnWarning" , defaultValue = "false" )
19
19
private boolean failOnWarning ;
20
20
21
- @ Parameter (defaultValue = "${project. basedir}" , readonly = true )
21
+ @ Parameter (property = "basedir" , defaultValue = "${basedir}" , readonly = true )
22
22
private File basedir ;
23
23
24
24
public void execute () throws MojoFailureException {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class GenerateChangelogMojo extends AbstractMojo {
22
22
@ Parameter (property = "dryRun" , defaultValue = "false" )
23
23
private boolean dryRun ;
24
24
25
- @ Parameter (defaultValue = "${project. basedir}" , readonly = true )
25
+ @ Parameter (property = "basedir" , defaultValue = "${basedir}" , readonly = true )
26
26
private File basedir ;
27
27
28
28
public void execute () throws MojoExecutionException {
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public class ReleaseMojo extends AbstractMojo {
25
25
@ Parameter (defaultValue = "${project}" , readonly = true )
26
26
private MavenProject project ;
27
27
28
- @ Parameter (defaultValue = "${project. basedir}" , readonly = true )
28
+ @ Parameter (property = "basedir" , defaultValue = "${basedir}" , readonly = true )
29
29
private File basedir ;
30
30
31
31
public void execute () throws MojoExecutionException {
You can’t perform that action at this time.
0 commit comments