All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.vandmo.dependencylock.maven.FormatMojo Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package se.vandmo.dependencylock.maven;

import java.io.File;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import static org.apache.maven.plugins.annotations.ResolutionScope.TEST;


@Mojo(
  name = "format",
  requiresDependencyResolution = TEST)
public final class FormatMojo extends AbstractMojo {

  @Parameter(
    defaultValue = "${basedir}",
    required = true,
    readonly = true)
  private File basedir;

  @Override
  public void execute() throws MojoExecutionException, MojoFailureException {
    DependenciesLockFile.fromBasedir(basedir).format();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy