protected void mvnSetVersions ( final String version ) throws MojoFailureException , CommandLineException { getLog ( ) . info ( "Updating version(s) to '" + version + "'." ) ; String newVersion = "-DnewVersion=" + version ; String g = "" ; String a = "" ; if ( versionsForceUpdate ) { g = "-DgroupId=" ; a = "-DartifactId=" ; } if ( tychoBuild ) { String prop = "" ; if ( StringUtils . isNotBlank ( versionProperty ) ) { prop = "-Dproperties=" + versionProperty ; getLog ( ) . info ( "Updating property '" + versionProperty + "' to '" + version + "'." ) ; } executeMvnCommand ( TYCHO_VERSIONS_PLUGIN_SET_GOAL , prop , newVersion , "-Dtycho.mode=maven" ) ; } else { if ( ! skipUpdateVersion ) { executeMvnCommand ( VERSIONS_MAVEN_PLUGIN_SET_GOAL , g , a , newVersion , "-DgenerateBackupPoms=false" ) ; } if ( StringUtils . isNotBlank ( versionProperty ) ) { getLog ( ) . info ( "Updating property '" + versionProperty + "' to '" + version + "'." ) ; executeMvnCommand ( VERSIONS_MAVEN_PLUGIN_SET_PROPERTY_GOAL , newVersion , "-Dproperty=" + versionProperty , "-DgenerateBackupPoms=false" ) ; } } }
Executes set goal of versions - maven - plugin or set - version of tycho - versions - plugin in case it is tycho build .