public void execute() throws MojoExecutionException {
try {
Server mavenServer = session.getSettings().getServer(server);
if (mavenServer == null) {
throw new MojoExecutionException("No server entry for '" + server + "', check your settings.xml file.");
}
final String groupId = session.getCurrentProject().getGroupId();
final String artifactId = session.getCurrentProject().getArtifactId();
final String version = session.getCurrentProject().getVersion();
final String description = session.getCurrentProject().getDescription();
String logon = mavenServer.getUsername() + ":" + mavenServer.getPassword();
final String encodedLogon = new BASE64Encoder().encode(logon.getBytes());
Xpp3Dom mavenServerConfiguration = (Xpp3Dom) mavenServer.getConfiguration();
final String url = mavenServerConfiguration.getChild("url").getValue();
final String baseVersion = version.replace("-SNAPSHOT", "");
final String newVersion = String.format("%s-%s", artifactId, baseVersion);