![JAR search and dependency download from the Maven repository](/logo.png)
org.apache.maven.model.PluginExecution Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-model Show documentation
Show all versions of maven-model Show documentation
Model for Maven POM (Project Object Model)
The newest version!
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello Velocity from model-v3.vm
// template, any modifications will be overwritten.
// ==============================================================
package org.apache.maven.model;
import java.io.Serializable;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.maven.api.annotations.Generated;
import org.apache.maven.api.annotations.Nonnull;
import org.codehaus.plexus.util.xml.Xpp3Dom;
@Generated
public class PluginExecution
extends ConfigurationContainer
implements Serializable, Cloneable
{
public PluginExecution() {
this(org.apache.maven.api.model.PluginExecution.newInstance());
}
public PluginExecution(org.apache.maven.api.model.PluginExecution delegate) {
this(delegate, null);
}
public PluginExecution(org.apache.maven.api.model.PluginExecution delegate, BaseObject parent) {
super(delegate, parent);
}
public PluginExecution clone(){
return new PluginExecution(getDelegate());
}
@Override
public org.apache.maven.api.model.PluginExecution getDelegate() {
return (org.apache.maven.api.model.PluginExecution) super.getDelegate();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || !(o instanceof PluginExecution)) {
return false;
}
PluginExecution that = (PluginExecution) o;
return Objects.equals(this.delegate, that.delegate);
}
@Override
public int hashCode() {
return getDelegate().hashCode();
}
public String getId() {
return getDelegate().getId();
}
public void setId(String id) {
if (!Objects.equals(id, getId())) {
update(getDelegate().withId(id));
}
}
public String getPhase() {
return getDelegate().getPhase();
}
public void setPhase(String phase) {
if (!Objects.equals(phase, getPhase())) {
update(getDelegate().withPhase(phase));
}
}
public int getPriority() {
return getDelegate().getPriority();
}
public void setPriority(int priority) {
if (!Objects.equals(priority, getPriority())) {
update(getDelegate().withPriority(priority));
}
}
@Nonnull
public List getGoals() {
return new WrapperList(() -> getDelegate().getGoals(), this::setGoals, s -> s, s -> s);
}
public void setGoals(List goals) {
if (!Objects.equals(goals, getGoals())) {
update(getDelegate().withGoals(goals));
}
}
public void addGoal(String goal) {
update(getDelegate().withGoals(
Stream.concat(getDelegate().getGoals().stream(), Stream.of(goal))
.collect(Collectors.toList())));
}
public void removeGoal(String goal) {
update(getDelegate().withGoals(
getDelegate().getGoals().stream()
.filter(e -> !Objects.equals(e, goal))
.collect(Collectors.toList())));
}
public InputLocation getLocation(Object key) {
org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
return loc != null ? new InputLocation(loc) : null;
}
public void setLocation(Object key, InputLocation location) {
update(org.apache.maven.api.model.PluginExecution.newBuilder(getDelegate(), true)
.location(key, location.toApiLocation()).build());
}
public InputLocation getImportedFrom() {
org.apache.maven.api.model.InputLocation loc = getDelegate().getImportedFrom();
return loc != null ? new InputLocation(loc) : null;
}
public void setImportedFrom(InputLocation location) {
update(org.apache.maven.api.model.PluginExecution.newBuilder(getDelegate(), true)
.importedFrom(location.toApiLocation()).build());
}
public Set
© 2015 - 2025 Weber Informatics LLC | Privacy Policy