1   package com.atlassian.maven.plugins.amps;
2   
3   import com.atlassian.maven.plugins.amps.util.GoogleAmpsTracker;
4   
5   import org.apache.maven.plugin.MojoExecutionException;
6   import org.apache.maven.plugin.MojoFailureException;
7   import org.jfrog.maven.annomojo.annotations.MojoGoal;
8   import org.jfrog.maven.annomojo.annotations.MojoParameter;
9   
10  @MojoGoal("release")
11  public class ReleaseMojo extends AbstractProductHandlerMojo
12  {
13      @MojoParameter(expression = "${maven.args}", defaultValue = "")
14      private String mavenArgs;
15  
16      @Override
17      protected void doExecute() throws MojoExecutionException, MojoFailureException
18      {
19          String trackingLabel = getPluginInformation().getId() + ":" + getPluginInformation().getVersion();
20          getGoogleTracker().track(GoogleAmpsTracker.RELEASE,trackingLabel);
21  
22          getMavenGoals().release(mavenArgs);
23      }
24  }