com.nlocketz.plugins.RepetitionMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-repeater-maven-plugin Show documentation
Show all versions of plugin-repeater-maven-plugin Show documentation
A Maven plugin that repeats a plugin while replacing placeholder variables. Used to reduce duplication within the POM.
package com.nlocketz.plugins;
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.*;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugins.annotations.Component;
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.project.MavenProject;
import org.codehaus.plexus.util.xml.Xpp3DomUtils;
import org.eclipse.aether.RepositorySystemSession;
import java.util.List;
import java.util.Map;
import static com.nlocketz.plugins.Util.plexusToDom;
/**
* Mojo which will run your repetitions
*/
@Mojo(name = "repeat", defaultPhase = LifecyclePhase.PROCESS_SOURCES, configurator = "custom-basic")
public class RepetitionMojo
extends AbstractMojo {
/**
* The goal to call in the repeated plugin.
*/
@Parameter(property = "goal", required = true)
private String goal;
/**
* Substitutions we will need to make.
*/
@Parameter(property = "repetitions", required = true)
private List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy