com.thoughtworks.gauge.maven.GaugeClasspathMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gauge-maven-plugin Show documentation
Show all versions of gauge-maven-plugin Show documentation
A maven plugin to execute gauge specs in the project
// Copyright 2018 ThoughtWorks, Inc.
// This file is part of Gauge-maven-plugin.
// Gauge-maven-plugin is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Gauge-maven-plugin is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Gauge-maven-plugin. If not, see .
package com.thoughtworks.gauge.maven;
import java.io.File;
import java.util.List;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
/**
* Goal which prints project classpath.
*/
@Mojo(name = GaugeClasspathMojo.MOJO_NAME, requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.TEST_COMPILE)
public class GaugeClasspathMojo extends AbstractMojo {
public static final String MOJO_NAME = "classpath";
/**
* Get Project classpath elements
*/
@Parameter(property = "project.testClasspathElements", required = true, readonly = true)
private List classpath;
/** {@inheritDoc} */
public void execute() throws MojoExecutionException, MojoFailureException {
System.out.println(String.join(File.pathSeparator, classpath));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy