Search in sources :

Example 1 with MojoProduces

use of com.itemis.maven.plugins.cdi.annotations.MojoProduces in project unleash-maven-plugin by shillner.

the class AbstractUnleashMojo method getUnleashOutputFolder.

@MojoProduces
@Named("unleashOutputFolder")
private File getUnleashOutputFolder() {
    File folder = new File(this.project.getBuild().getDirectory(), "unleash");
    folder.mkdirs();
    return folder;
}
Also used : File(java.io.File) Named(javax.inject.Named) MojoProduces(com.itemis.maven.plugins.cdi.annotations.MojoProduces)

Example 2 with MojoProduces

use of com.itemis.maven.plugins.cdi.annotations.MojoProduces in project unleash-maven-plugin by shillner.

the class AbstractUnleashMojo method getReleaseArgs.

@MojoProduces
@Named("releaseArgs")
@MojoInject
private Properties getReleaseArgs(Log log) {
    Properties args = new Properties();
    Splitter splitter = Splitter.on('=');
    for (String arg : this.releaseArgs) {
        List<String> split = splitter.splitToList(arg);
        if (split.size() == 2) {
            args.put(split.get(0), split.get(1));
        } else {
            log.warn("Could not set '" + arg + "' as a Property for the Maven release build.");
        }
    }
    // Add default property indicating that the unleash plugin is triggering the build
    args.put("isUnleashBuild", "true");
    return args;
}
Also used : Splitter(com.google.common.base.Splitter) Properties(java.util.Properties) Named(javax.inject.Named) MojoProduces(com.itemis.maven.plugins.cdi.annotations.MojoProduces) MojoInject(com.itemis.maven.plugins.cdi.annotations.MojoInject)

Aggregations

MojoProduces (com.itemis.maven.plugins.cdi.annotations.MojoProduces)2 Named (javax.inject.Named)2 Splitter (com.google.common.base.Splitter)1 MojoInject (com.itemis.maven.plugins.cdi.annotations.MojoInject)1 File (java.io.File)1 Properties (java.util.Properties)1