org.apache.maven.project.builder.AlwaysJoinModelContainerFactory Maven / Gradle / Ivy
The newest version!
package org.apache.maven.project.builder;
import org.apache.maven.shared.model.ModelContainerFactory;
import org.apache.maven.shared.model.ModelContainer;
import org.apache.maven.shared.model.ModelProperty;
import org.apache.maven.shared.model.ModelContainerAction;
import java.util.*;
public class AlwaysJoinModelContainerFactory
implements ModelContainerFactory
{
private static final Collection uris = Collections.unmodifiableList( Arrays.asList(
ProjectUri.Build.Plugins.Plugin.Executions.Execution.Goals.goal
// ProjectUri.Build.Plugins.Plugin.Executions.Execution.xUri
) );
public Collection getUris()
{
return uris;
}
public ModelContainer create( List modelProperties )
{
if ( modelProperties == null || modelProperties.size() == 0 )
{
throw new IllegalArgumentException( "modelProperties: null or empty" );
}
return new Anon_ModelContainer( modelProperties );
}
private static class Anon_ModelContainer
implements ModelContainer
{
public Anon_ModelContainer(List properties) {
this.properties = new ArrayList(properties);
}
private List properties;
public ModelContainerAction containerAction( ModelContainer modelContainer )
{
return ModelContainerAction.JOIN;
}
public ModelContainer createNewInstance( List modelProperties )
{
return new Anon_ModelContainer( modelProperties );
}
public List getProperties()
{
return new ArrayList(properties);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy