I\'ve read some questions here about how to set a property (most of them talked about the version number for an application) from a maven plugin. It seems there\'s no easy
Don't set it as System Property, set it as Maven Project property
// inject the project
@Parameter(defaultValue = "${project}")
private org.apache.maven.project.MavenProject project;
// and in execute(), use it:
project.getProperties().setProperty("currentVersion", appCurrentVersion);
See:
An edit suggested using Properties.put() instead of Properties.setProperty(). While technically, Properties implements Map, this usage is discouraged explicitly in the Properties javadoc.