1   package com.atlassian.maven.plugins.amps;
2   
3   import static com.atlassian.maven.plugins.amps.util.FileUtils.*;
4   import org.apache.maven.plugin.MojoExecutionException;
5   import org.apache.maven.plugin.MojoFailureException;
6   import org.jfrog.maven.annomojo.annotations.MojoGoal;
7   
8   import java.io.File;
9   
10  @MojoGoal("jar")
11  public class JarWithManifestMojo extends AbstractAmpsMojo
12  {
13      public void execute() throws MojoExecutionException, MojoFailureException
14      {
15          File mf = file(getMavenContext().getProject().getBuild().getOutputDirectory(), "META-INF", "MANIFEST.MF");
16          getMavenGoals().jarWithOptionalManifest(mf.exists());
17      }
18  }