@@ -0,0 +1,1188 @@
+%0Apackage com.google.appengine;%0A%0Aimport java.util.Properties;%0Aimport org.apache.maven.plugin.AbstractMojo;%0Aimport org.apache.maven.plugin.MojoExecutionException;%0Aimport org.apache.maven.project.MavenProject;%0A%0A%0A/**%0A * Maven project version is dot based, e.g %221.9.7%22 ,%0A * whereas appengine-web.xml is dash baseb, e.g. %221-9-7%22%0A * This goal creates a Maven property with a correct app engine version.%0A * @goal create-property%0A */%0Apublic class CreateGoodVersionFromPomVersionMojo extends AbstractMojo %7B%0A%0A  /**%0A   * @parameter expression=%22$%7Bproject%7D%22 required=%22true%22%0A   */%0A  private MavenProject mavenProject;%0A%0A  /**%0A   * @parameter expression=%22$%7B$appengine.create-property-version%7D%22%0A   * default-value=%22AppEngineFriendlyVersion%22%0A   */%0A  private String propertyName;%0A%0A  @Override%0A  public void execute() throws MojoExecutionException %7B%0A    String version = mavenProject.getVersion();%0A    Properties props = mavenProject.getProperties();%0A%0A    String newVersion = version.toLowerCase();%0A    newVersion = newVersion.replace('.', '-');%0A    newVersion = newVersion.toLowerCase();%0A    props.put(propertyName, newVersion);%0A%0A    getLog().info(%22added property %22 + propertyName + %22=%22 + newVersion);%0A  %7D%0A%7D%0A

create property from version name