@@ -0,0 +1,1577 @@
+%0Apackage info.freelibrary.maven;%0A%0Aimport java.util.UUID;%0A%0Aimport org.apache.maven.plugin.AbstractMojo;%0Aimport org.apache.maven.plugin.MojoExecutionException;%0Aimport org.apache.maven.plugin.MojoFailureException;%0Aimport org.apache.maven.plugins.annotations.LifecyclePhase;%0Aimport org.apache.maven.plugins.annotations.Mojo;%0Aimport org.apache.maven.plugins.annotations.Parameter;%0Aimport org.apache.maven.project.MavenProject;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A@Mojo(name = %22set-uuid-property%22, defaultPhase = LifecyclePhase.VALIDATE)%0Apublic class UUIDGeneratingMojo extends AbstractMojo %7B%0A%0A    private static final Logger LOGGER = LoggerFactory.getLogger(UUIDGeneratingMojo.class);%0A%0A    /**%0A     * The Maven project directory.%0A     */%0A    @Parameter(defaultValue = %22$%7Bproject%7D%22)%0A    protected MavenProject myProject;%0A%0A    /**%0A     * An optional String value from which to construct the UUID.%0A     */%0A    @Parameter(alias = %22string%22)%0A    private String myString;%0A%0A    /**%0A     * An optional build property name for the requested UUID.%0A     */%0A    @Parameter(alias = %22name%22, defaultValue = %22uuid%22)%0A    private String myName;%0A%0A    @Override%0A    public void execute() throws MojoExecutionException, MojoFailureException %7B%0A        final String uuid = myString == null ? UUID.randomUUID().toString() : UUID.fromString(myString).toString();%0A%0A        if (LOGGER.isInfoEnabled()) %7B%0A            LOGGER.info(%22Setting a UUID property (%7B%7D = %7B%7D) for use in the Maven build%22, myName, uuid);%0A        %7D%0A%0A        myProject.getProperties().setProperty(myName, uuid);%0A    %7D%0A%0A%7D%0A

Add UUID generator for Maven builds