@Component(role=org.apache.maven.model.io.ModelReader.class,
hint="custom-version-model-reader")
public class VersionOverrideModelReader
extends org.apache.maven.model.io.DefaultModelReader
implements org.apache.maven.model.io.ModelReader
extension of ModelReader for overriding ${project.version} with the value given as a Java system property:
-Dversion.override=A-VERSION
other options are:
-Dversion.override.fail-on-error=[true | false]
-Dversion.override.strict=[true | false]
-Dversion.override.check-snapshot-dependency=[true | false]
This class helps releasing a project (from a maven point of view, that means not having "SNAPSHOT" in the version) without actually changing (and committing) the pom.xml
Copyright by Roger Brechbühl, 2012
| Constructor and Description |
|---|
VersionOverrideModelReader() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isVersionOverridden() |
org.apache.maven.model.Model |
read(InputStream input,
Map<String,?> options) |
public org.apache.maven.model.Model read(InputStream input, Map<String,?> options) throws IOException
read in interface org.apache.maven.model.io.ModelReaderread in class org.apache.maven.model.io.DefaultModelReaderIOExceptionpublic static boolean isVersionOverridden()
Copyright © 2015. All rights reserved.