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

uk.co.deliverymind.wiremock.maven.plugin.ConfigurationMojo Maven / Gradle / Ivy

There is a newer version: 2.11.0
Show newest version
package uk.co.deliverymind.wiremock.maven.plugin;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.Parameter;

import java.io.File;

abstract public class ConfigurationMojo extends AbstractMojo {

    /**
     * Set the root directory (--root-dir), under which mappings and __files reside.
     * This defaults to: target/classes
     */
    @Parameter(property = "dir", defaultValue = "target/classes")
    private File dir;

    /**
     * Set all other parameters in command-line format, e.g.:
     * --port=8081 --verbose
     * Do NOT specify --root-dir here.
     */
    @Parameter(property = "params")
    private String params;

    protected String[] getAllParams() {
        String allParams = String.format("%s%s %s", "--root-dir=", dir, params);
        return allParams.split(" ");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy