File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/main/java/me/qoomon/maven/gitversioning Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,12 @@ e.g `${dirty:+SNAPSHOT}` resolves to `-SNAPSHOT` instead of `-DIRTY`
277
277
278
278
### Parameters & Environment Variables
279
279
280
+ - Set configuration Filename
281
+ - **Environment Variables**
282
+ - `export VERSIONING_CONFIG_FILE=myConfig.xml`
283
+ - **Command Line Parameters**
284
+ - `mvn … -Dversioning.configFile=myConfig.xml`
285
+
280
286
- Disable Extension
281
287
- **Environment Variables**
282
288
- `export VERSIONING_DISABLE=true`
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public class GitVersioningModelProcessor implements ModelProcessor {
69
69
private static final String OPTION_NAME_GIT_BRANCH = "git.branch" ;
70
70
private static final String OPTION_NAME_DISABLE = "versioning.disable" ;
71
71
private static final String OPTION_UPDATE_POM = "versioning.updatePom" ;
72
+ private static final String OPTION_CONFIG_FILE_NAME = "versioning.configFile" ;
72
73
73
74
static final String GIT_VERSIONING_POM_NAME = ".git-versioned-pom.xml" ;
74
75
@@ -169,7 +170,13 @@ private void init(Model projectModel) throws IOException {
169
170
logger .debug ("pom file: {}" , pomFile );
170
171
mvnDirectory = findMvnDirectory (pomFile );
171
172
logger .debug (".mvn directory: {}" , mvnDirectory );
172
- final File configFile = new File (mvnDirectory , projectArtifactId () + ".xml" );
173
+
174
+ String configFileName = getCommandOption (OPTION_CONFIG_FILE_NAME );
175
+ if (configFileName == null ){
176
+ configFileName = projectArtifactId () + ".xml" ;
177
+ }
178
+
179
+ final File configFile = new File (mvnDirectory , configFileName );
173
180
logger .debug ("read config from {}" , configFile );
174
181
config = readConfig (configFile );
175
182
You can’t perform that action at this time.
0 commit comments