diff options
Diffstat (limited to 'framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor')
9 files changed, 0 insertions, 1941 deletions
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java deleted file mode 100644 index b236c8c7..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -public class DuplicateMojoDescriptorException - extends InvalidPluginDescriptorException -{ - - public DuplicateMojoDescriptorException( String goalPrefix, String goal, String existingImplementation, - String newImplementation ) - { - super( "Goal: " + goal + " already exists in the plugin descriptor for prefix: " + goalPrefix - + "\nExisting implementation is: " + existingImplementation - + "\nConflicting implementation is: " + newImplementation ); - } - -} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java deleted file mode 100644 index 4cad9b7c..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -public class DuplicateParameterException - extends InvalidPluginDescriptorException -{ - - public DuplicateParameterException( String message ) - { - super( message ); - } - -} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidParameterException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidParameterException.java deleted file mode 100644 index 557a3d54..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidParameterException.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -/** - * @author Jason van Zyl - */ -public class InvalidParameterException - extends InvalidPluginDescriptorException -{ - public InvalidParameterException( String element, int i ) - { - super( "The " + element + " element in parameter # " + i + " is invalid. It cannot be null." ); - } - - public InvalidParameterException( String message, Throwable cause ) - { - super( message, cause ); - } -}
\ No newline at end of file diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java deleted file mode 100644 index 4b8e7397..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.codehaus.plexus.configuration.PlexusConfigurationException; - -public class InvalidPluginDescriptorException - extends PlexusConfigurationException -{ - - public InvalidPluginDescriptorException( String message, Throwable cause ) - { - super( message, cause ); - } - - public InvalidPluginDescriptorException( String message ) - { - super( message ); - } - -} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java deleted file mode 100644 index bc2d5554..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java +++ /dev/null @@ -1,719 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.apache.maven.plugin.Mojo; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; - -/** - * The bean containing the Mojo descriptor. - * <br/> - * For more information about the usage tag, have a look to: - * <a href="http://maven.apache.org/developers/mojo-api-specification.html"> - * http://maven.apache.org/developers/mojo-api-specification.html</a> - * - * @todo is there a need for the delegation of MavenMojoDescriptor to this? - * Why not just extend ComponentDescriptor here? - */ -public class MojoDescriptor - extends ComponentDescriptor<Mojo> - implements Cloneable -{ - /** The Plexus component type */ - public static final String MAVEN_PLUGIN = "maven-plugin"; - - /** "once-per-session" execution strategy */ - public static final String SINGLE_PASS_EXEC_STRATEGY = "once-per-session"; - - /** "always" execution strategy */ - public static final String MULTI_PASS_EXEC_STRATEGY = "always"; - - private static final String DEFAULT_INSTANTIATION_STRATEGY = "per-lookup"; - - private static final String DEFAULT_LANGUAGE = "java"; - - private List<Parameter> parameters; - - private Map<String, Parameter> parameterMap; - - /** By default, the execution strategy is "once-per-session" */ - private String executionStrategy = SINGLE_PASS_EXEC_STRATEGY; - - /** - * The goal name for the Mojo, that users will reference from the command line to execute the Mojo directly, or - * inside a POM in order to provide Mojo-specific configuration. - */ - private String goal; - - /** - * Defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM. - * <i>Note:</i> This will not automagically make a mojo run when the plugin declaration is added to the POM. It - * merely enables the user to omit the <code><phase></code> element from the surrounding - * <code><execution></code> element. - */ - private String phase; - - /** Specify the version when the Mojo was added to the API. Similar to Javadoc since. */ - private String since; - - /** Reference the invocation phase of the Mojo. */ - private String executePhase; - - /** Reference the invocation goal of the Mojo. */ - private String executeGoal; - - /** Reference the invocation lifecycle of the Mojo. */ - private String executeLifecycle; - - /** - * Specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated. This will trigger a - * warning when a user tries to configure a parameter marked as deprecated. - */ - private String deprecated; - - /** - * Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed as - * modules. By default, no need to aggregate the Maven project and its child modules - */ - private boolean aggregator = false; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - /** Specify the required dependencies in a specified scope */ - private String dependencyResolutionRequired = null; - - /** - * The scope of (transitive) dependencies that should be collected but not resolved. - * @since 3.0-alpha-3 - */ - private String dependencyCollectionRequired; - - /** By default, the Mojo needs a Maven project to be executed */ - private boolean projectRequired = true; - - /** By default, the Mojo is assumed to work offline as well */ - private boolean onlineRequired = false; - - /** Plugin configuration */ - private PlexusConfiguration mojoConfiguration; - - /** Plugin descriptor */ - private PluginDescriptor pluginDescriptor; - - /** By default, the Mojo is inherited */ - private boolean inheritedByDefault = true; - - /** By default, the Mojo cannot be invoked directly */ - private boolean directInvocationOnly = false; - - /** By default, the Mojo don't need reports to run */ - private boolean requiresReports = false; - - /** - * By default, mojos are not threadsafe - * @since 3.0-beta-2 - */ - private boolean threadSafe = false; - - /** - * Default constructor. - */ - public MojoDescriptor() - { - setInstantiationStrategy( DEFAULT_INSTANTIATION_STRATEGY ); - setComponentFactory( DEFAULT_LANGUAGE ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - /** - * @return the language of this Mojo, i.e. <code>java</code> - */ - public String getLanguage() - { - return getComponentFactory(); - } - - /** - * @param language the new language - */ - public void setLanguage( String language ) - { - setComponentFactory( language ); - } - - /** - * @return <code>true</code> if the Mojo is deprecated, <code>false</code> otherwise. - */ - public String getDeprecated() - { - return deprecated; - } - - /** - * @param deprecated <code>true</code> to deprecate the Mojo, <code>false</code> otherwise. - */ - public void setDeprecated( String deprecated ) - { - this.deprecated = deprecated; - } - - /** - * @return the list of parameters - */ - public List<Parameter> getParameters() - { - return parameters; - } - - /** - * @param parameters the new list of parameters - * @throws DuplicateParameterException if any - */ - public void setParameters( List<Parameter> parameters ) - throws DuplicateParameterException - { - for ( Parameter parameter : parameters ) - { - addParameter( parameter ); - } - } - - /** - * @param parameter add a new parameter - * @throws DuplicateParameterException if any - */ - public void addParameter( Parameter parameter ) - throws DuplicateParameterException - { - if ( parameters != null && parameters.contains( parameter ) ) - { - throw new DuplicateParameterException( parameter.getName() - + " has been declared multiple times in mojo with goal: " + getGoal() + " (implementation: " - + getImplementation() + ")" ); - } - - if ( parameters == null ) - { - parameters = new LinkedList<Parameter>(); - } - - parameters.add( parameter ); - } - - /** - * @return the list parameters as a Map - */ - public Map<String, Parameter> getParameterMap() - { - if ( parameterMap == null ) - { - parameterMap = new HashMap<String, Parameter>(); - - if ( parameters != null ) - { - for ( Parameter pd : parameters ) - { - parameterMap.put( pd.getName(), pd ); - } - } - } - - return parameterMap; - } - - // ---------------------------------------------------------------------- - // Dependency requirement - // ---------------------------------------------------------------------- - - /** - * @param requiresDependencyResolution the new required dependencies in a specified scope - */ - public void setDependencyResolutionRequired( String requiresDependencyResolution ) - { - this.dependencyResolutionRequired = requiresDependencyResolution; - } - - public String getDependencyResolutionRequired() - { - return dependencyResolutionRequired; - } - - /** - * @return the required dependencies in a specified scope - * @TODO the name is not intelligible - */ - @Deprecated - public String isDependencyResolutionRequired() - { - return dependencyResolutionRequired; - } - - /** - * @since 3.0-alpha-3 - */ - public void setDependencyCollectionRequired( String requiresDependencyCollection ) - { - this.dependencyCollectionRequired = requiresDependencyCollection; - } - - /** - * Gets the scope of (transitive) dependencies that should be collected. Dependency collection refers to the process - * of calculating the complete dependency tree in terms of artifact coordinates. In contrast to dependency - * resolution, this does not include the download of the files for the dependency artifacts. It is meant for mojos - * that only want to analyze the set of transitive dependencies, in particular during early lifecycle phases where - * full dependency resolution might fail due to projects which haven't been built yet. - * - * @return The scope of (transitive) dependencies that should be collected or {@code null} if none. - * @since 3.0-alpha-3 - */ - public String getDependencyCollectionRequired() - { - return dependencyCollectionRequired; - } - - // ---------------------------------------------------------------------- - // Project requirement - // ---------------------------------------------------------------------- - - /** - * @param requiresProject <code>true</code> if the Mojo needs a Maven project to be executed, <code>false</code> - * otherwise. - */ - public void setProjectRequired( boolean requiresProject ) - { - this.projectRequired = requiresProject; - } - - /** - * @return <code>true</code> if the Mojo needs a Maven project to be executed, <code>false</code> otherwise. - */ - public boolean isProjectRequired() - { - return projectRequired; - } - - // ---------------------------------------------------------------------- - // Online vs. Offline requirement - // ---------------------------------------------------------------------- - - /** - * @param requiresOnline <code>true</code> if the Mojo is online, <code>false</code> otherwise. - */ - public void setOnlineRequired( boolean requiresOnline ) - { - this.onlineRequired = requiresOnline; - } - - /** - * @return <code>true</code> if the Mojo is online, <code>false</code> otherwise. - */ - // blech! this isn't even intelligible as a method name. provided for - // consistency... - public boolean isOnlineRequired() - { - return onlineRequired; - } - - /** - * @return <code>true</code> if the Mojo is online, <code>false</code> otherwise. - */ - // more english-friendly method...keep the code clean! :) - public boolean requiresOnline() - { - return onlineRequired; - } - - /** - * @return the binded phase name of the Mojo - */ - public String getPhase() - { - return phase; - } - - /** - * @param phase the new binded phase name of the Mojo - */ - public void setPhase( String phase ) - { - this.phase = phase; - } - - /** - * @return the version when the Mojo was added to the API - */ - public String getSince() - { - return since; - } - - /** - * @param since the new version when the Mojo was added to the API - */ - public void setSince( String since ) - { - this.since = since; - } - - /** - * @return The goal name of the Mojo - */ - public String getGoal() - { - return goal; - } - - /** - * @param goal The new goal name of the Mojo - */ - public void setGoal( String goal ) - { - this.goal = goal; - } - - /** - * @return the invocation phase of the Mojo - */ - public String getExecutePhase() - { - return executePhase; - } - - /** - * @param executePhase the new invocation phase of the Mojo - */ - public void setExecutePhase( String executePhase ) - { - this.executePhase = executePhase; - } - - /** - * @return <code>true</code> if the Mojo uses <code>always</code> for the <code>executionStrategy</code> - */ - public boolean alwaysExecute() - { - return MULTI_PASS_EXEC_STRATEGY.equals( executionStrategy ); - } - - /** - * @return the execution strategy - */ - public String getExecutionStrategy() - { - return executionStrategy; - } - - /** - * @param executionStrategy the new execution strategy - */ - public void setExecutionStrategy( String executionStrategy ) - { - this.executionStrategy = executionStrategy; - } - - /** - * @return the mojo configuration - */ - public PlexusConfiguration getMojoConfiguration() - { - if ( mojoConfiguration == null ) - { - mojoConfiguration = new XmlPlexusConfiguration( "configuration" ); - } - return mojoConfiguration; - } - - /** - * @param mojoConfiguration a new mojo configuration - */ - public void setMojoConfiguration( PlexusConfiguration mojoConfiguration ) - { - this.mojoConfiguration = mojoConfiguration; - } - - /** {@inheritDoc} */ - public String getRole() - { - return Mojo.ROLE; - } - - /** {@inheritDoc} */ - public String getRoleHint() - { - return getId(); - } - - /** - * @return the id of the mojo, based on the goal name - */ - public String getId() - { - return getPluginDescriptor().getId() + ":" + getGoal(); - } - - /** - * @return the full goal name - * @see PluginDescriptor#getGoalPrefix() - * @see #getGoal() - */ - public String getFullGoalName() - { - return getPluginDescriptor().getGoalPrefix() + ":" + getGoal(); - } - - /** {@inheritDoc} */ - public String getComponentType() - { - return MAVEN_PLUGIN; - } - - /** - * @return the plugin descriptor - */ - public PluginDescriptor getPluginDescriptor() - { - return pluginDescriptor; - } - - /** - * @param pluginDescriptor the new plugin descriptor - */ - public void setPluginDescriptor( PluginDescriptor pluginDescriptor ) - { - this.pluginDescriptor = pluginDescriptor; - } - - /** - * @return <code>true</code> if the Mojo is herited, <code>false</code> otherwise. - */ - public boolean isInheritedByDefault() - { - return inheritedByDefault; - } - - /** - * @param inheritedByDefault <code>true</code> if the Mojo is herited, <code>false</code> otherwise. - */ - public void setInheritedByDefault( boolean inheritedByDefault ) - { - this.inheritedByDefault = inheritedByDefault; - } - - /** {@inheritDoc} */ - public boolean equals( Object object ) - { - if ( this == object ) - { - return true; - } - - if ( object instanceof MojoDescriptor ) - { - MojoDescriptor other = (MojoDescriptor) object; - - if ( !compareObjects( getPluginDescriptor(), other.getPluginDescriptor() ) ) - { - return false; - } - - return compareObjects( getGoal(), other.getGoal() ); - - } - - return false; - } - - private boolean compareObjects( Object first, Object second ) - { - if ( first == second ) - { - return true; - } - - if ( first == null || second == null ) - { - return false; - } - - return first.equals( second ); - } - - /** {@inheritDoc} */ - public int hashCode() - { - int result = 1; - - String goal = getGoal(); - - if ( goal != null ) - { - result += goal.hashCode(); - } - - PluginDescriptor pd = getPluginDescriptor(); - - if ( pd != null ) - { - result -= pd.hashCode(); - } - - return result; - } - - /** - * @return the invocation lifecycle of the Mojo - */ - public String getExecuteLifecycle() - { - return executeLifecycle; - } - - /** - * @param executeLifecycle the new invocation lifecycle of the Mojo - */ - public void setExecuteLifecycle( String executeLifecycle ) - { - this.executeLifecycle = executeLifecycle; - } - - /** - * @param aggregator <code>true</code> if the Mojo uses the Maven project and its child modules, - * <code>false</code> otherwise. - */ - public void setAggregator( boolean aggregator ) - { - this.aggregator = aggregator; - } - - /** - * @return <code>true</code> if the Mojo uses the Maven project and its child modules, - * <code>false</code> otherwise. - */ - public boolean isAggregator() - { - return aggregator; - } - - /** - * @return <code>true</code> if the Mojo cannot be invoked directly, <code>false</code> otherwise. - */ - public boolean isDirectInvocationOnly() - { - return directInvocationOnly; - } - - /** - * @param directInvocationOnly <code>true</code> if the Mojo cannot be invoked directly, - * <code>false</code> otherwise. - */ - public void setDirectInvocationOnly( boolean directInvocationOnly ) - { - this.directInvocationOnly = directInvocationOnly; - } - - /** - * @return <code>true</code> if the Mojo needs reports to run, <code>false</code> otherwise. - */ - public boolean isRequiresReports() - { - return requiresReports; - } - - /** - * @param requiresReports <code>true</code> if the Mojo needs reports to run, <code>false</code> otherwise. - */ - public void setRequiresReports( boolean requiresReports ) - { - this.requiresReports = requiresReports; - } - - /** - * @param executeGoal the new invocation goal of the Mojo - */ - public void setExecuteGoal( String executeGoal ) - { - this.executeGoal = executeGoal; - } - - /** - * @return the invocation goal of the Mojo - */ - public String getExecuteGoal() - { - return executeGoal; - } - - - /** - * @return True if the <code>Mojo</code> is thread-safe and can be run safely in parallel - * @since 3.0-beta-2 - */ - public boolean isThreadSafe() - { - return threadSafe; - } - - /** - * @param threadSafe indicates that the mojo is thread-safe and can be run safely in parallel - * @since 3.0-beta-2 - */ - public void setThreadSafe( boolean threadSafe ) - { - this.threadSafe = threadSafe; - } - - /** - * @return {@code true} if this mojo forks either a goal or the lifecycle, {@code false} otherwise. - */ - public boolean isForking() - { - return ( getExecuteGoal() != null && getExecuteGoal().length() > 0 ) - || ( getExecutePhase() != null && getExecutePhase().length() > 0 ); - } - - /** - * Creates a shallow copy of this mojo descriptor. - */ - @Override - public MojoDescriptor clone() - { - try - { - return (MojoDescriptor) super.clone(); - } - catch ( CloneNotSupportedException e ) - { - throw new UnsupportedOperationException( e ); - } - } - -} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Parameter.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Parameter.java deleted file mode 100644 index 6c5036bc..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Parameter.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -/** - * @author Jason van Zyl - */ -public class Parameter - implements Cloneable -{ - private String alias; - - private String name; - - private String type; - - private boolean required; - - private boolean editable = true; - - private String description; - - private String expression; - - private String deprecated; - - private String defaultValue; - - private String implementation; - - private Requirement requirement; - - private String since; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public String getName() - { - return name; - } - - public void setName( String name ) - { - this.name = name; - } - - public String getType() - { - return type; - } - - public void setType( String type ) - { - this.type = type; - } - - public boolean isRequired() - { - return required; - } - - public void setRequired( boolean required ) - { - this.required = required; - } - - public String getDescription() - { - return description; - } - - public void setDescription( String description ) - { - this.description = description; - } - - public String getExpression() - { - return expression; - } - - public void setExpression( String expression ) - { - this.expression = expression; - } - - public String getDeprecated() - { - return deprecated; - } - - public void setDeprecated( String deprecated ) - { - this.deprecated = deprecated; - } - - public int hashCode() - { - return name.hashCode(); - } - - public boolean equals( Object other ) - { - return ( other instanceof Parameter ) && getName().equals( ( (Parameter) other ).getName() ); - } - - public String getAlias() - { - return alias; - } - - public void setAlias( String alias ) - { - this.alias = alias; - } - - public boolean isEditable() - { - return editable; - } - - public void setEditable( boolean editable ) - { - this.editable = editable; - } - - public void setDefaultValue( String defaultValue ) - { - this.defaultValue = defaultValue; - } - - public String getDefaultValue() - { - return defaultValue; - } - - public String toString() - { - return "Mojo parameter [name: \'" + getName() + "\'; alias: \'" + getAlias() + "\']"; - } - - public Requirement getRequirement() - { - return requirement; - } - - public void setRequirement( Requirement requirement ) - { - this.requirement = requirement; - } - - public String getImplementation() - { - return implementation; - } - - public void setImplementation( String implementation ) - { - this.implementation = implementation; - } - - public String getSince() - { - return since; - } - - public void setSince( String since ) - { - this.since = since; - } - - /** - * Creates a shallow copy of this parameter. - */ - @Override - public Parameter clone() - { - try - { - return (Parameter) super.clone(); - } - catch ( CloneNotSupportedException e ) - { - throw new UnsupportedOperationException( e ); - } - } - -} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java deleted file mode 100644 index 1d6f1be4..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java +++ /dev/null @@ -1,445 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.ArtifactUtils; -import org.apache.maven.model.Plugin; -import org.apache.maven.plugin.lifecycle.Lifecycle; -import org.apache.maven.plugin.lifecycle.LifecycleConfiguration; -import org.apache.maven.plugin.lifecycle.io.xpp3.LifecycleMappingsXpp3Reader; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.ReaderFactory; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -/** - * @author Jason van Zyl - */ -public class PluginDescriptor - extends ComponentSetDescriptor - implements Cloneable -{ - - private static final String LIFECYCLE_DESCRIPTOR = "META-INF/maven/lifecycle.xml"; - - private String groupId; - - private String artifactId; - - private String version; - - private String goalPrefix; - - private String source; - - private boolean inheritedByDefault = true; - - private List<Artifact> artifacts; - - private ClassRealm classRealm; - - // calculated on-demand. - private Map<String, Artifact> artifactMap; - - private Set<Artifact> introducedDependencyArtifacts; - - private String name; - - private String description; - - private String requiredMavenVersion; - - private Plugin plugin; - - private Artifact pluginArtifact; - - private Map<String, Lifecycle> lifecycleMappings; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - @SuppressWarnings( { "unchecked", "rawtypes" } ) - public List<MojoDescriptor> getMojos() - { - return (List) getComponents(); - } - - public void addMojo( MojoDescriptor mojoDescriptor ) - throws DuplicateMojoDescriptorException - { - MojoDescriptor existing = null; - // this relies heavily on the equals() and hashCode() for ComponentDescriptor, - // which uses role:roleHint for identity...and roleHint == goalPrefix:goal. - // role does not vary for Mojos. - List<MojoDescriptor> mojos = getMojos(); - - if ( mojos != null && mojos.contains( mojoDescriptor ) ) - { - int indexOf = mojos.indexOf( mojoDescriptor ); - - existing = mojos.get( indexOf ); - } - - if ( existing != null ) - { - throw new DuplicateMojoDescriptorException( getGoalPrefix(), mojoDescriptor.getGoal(), existing - .getImplementation(), mojoDescriptor.getImplementation() ); - } - else - { - addComponentDescriptor( mojoDescriptor ); - } - } - - public String getGroupId() - { - return groupId; - } - - public void setGroupId( String groupId ) - { - this.groupId = groupId; - } - - public String getArtifactId() - { - return artifactId; - } - - public void setArtifactId( String artifactId ) - { - this.artifactId = artifactId; - } - - // ---------------------------------------------------------------------- - // Dependencies - // ---------------------------------------------------------------------- - - public static String constructPluginKey( String groupId, String artifactId, String version ) - { - return groupId + ":" + artifactId + ":" + version; - } - - public String getPluginLookupKey() - { - return groupId + ":" + artifactId; - } - - public String getId() - { - return constructPluginKey( groupId, artifactId, version ); - } - - public static String getDefaultPluginArtifactId( String id ) - { - return "maven-" + id + "-plugin"; - } - - public static String getDefaultPluginGroupId() - { - return "org.apache.maven.plugins"; - } - - /** - * Parse maven-...-plugin. - * - * @todo move to plugin-tools-api as a default only - */ - public static String getGoalPrefixFromArtifactId( String artifactId ) - { - if ( "maven-plugin-plugin".equals( artifactId ) ) - { - return "plugin"; - } - else - { - return artifactId.replaceAll( "-?maven-?", "" ).replaceAll( "-?plugin-?", "" ); - } - } - - public String getGoalPrefix() - { - return goalPrefix; - } - - public void setGoalPrefix( String goalPrefix ) - { - this.goalPrefix = goalPrefix; - } - - public void setVersion( String version ) - { - this.version = version; - } - - public String getVersion() - { - return version; - } - - public void setSource( String source ) - { - this.source = source; - } - - public String getSource() - { - return source; - } - - public boolean isInheritedByDefault() - { - return inheritedByDefault; - } - - public void setInheritedByDefault( boolean inheritedByDefault ) - { - this.inheritedByDefault = inheritedByDefault; - } - - /** - * Gets the artifacts that make up the plugin's class realm, excluding artifacts shadowed by the Maven core realm - * like {@code maven-project}. - * - * @return The plugin artifacts, never {@code null}. - */ - public List<Artifact> getArtifacts() - { - return artifacts; - } - - public void setArtifacts( List<Artifact> artifacts ) - { - this.artifacts = artifacts; - - // clear the calculated artifactMap - artifactMap = null; - } - - /** - * The map of artifacts accessible by the versionlessKey, i.e. groupId:artifactId - * - * @return a Map of artifacts, never {@code null} - * @see #getArtifacts() - */ - public Map<String, Artifact> getArtifactMap() - { - if ( artifactMap == null ) - { - artifactMap = ArtifactUtils.artifactMapByVersionlessId( getArtifacts() ); - } - - return artifactMap; - } - - public boolean equals( Object object ) - { - if ( this == object ) - { - return true; - } - - return object instanceof PluginDescriptor && getId().equals( ( (PluginDescriptor) object ).getId() ); - } - - public int hashCode() - { - return 10 + getId().hashCode(); - } - - public MojoDescriptor getMojo( String goal ) - { - if ( getMojos() == null ) - { - return null; // no mojo in this POM - } - - // TODO: could we use a map? Maybe if the parent did that for components too, as this is too vulnerable to - // changes above not being propagated to the map - for ( MojoDescriptor desc : getMojos() ) - { - if ( goal.equals( desc.getGoal() ) ) - { - return desc; - } - } - return null; - } - - public void setClassRealm( ClassRealm classRealm ) - { - this.classRealm = classRealm; - } - - public ClassRealm getClassRealm() - { - return classRealm; - } - - public void setIntroducedDependencyArtifacts( Set<Artifact> introducedDependencyArtifacts ) - { - this.introducedDependencyArtifacts = introducedDependencyArtifacts; - } - - public Set<Artifact> getIntroducedDependencyArtifacts() - { - return ( introducedDependencyArtifacts != null ) ? introducedDependencyArtifacts - : Collections.<Artifact>emptySet(); - } - - public void setName( String name ) - { - this.name = name; - } - - public String getName() - { - return name; - } - - public void setDescription( String description ) - { - this.description = description; - } - - public String getDescription() - { - return description; - } - - public void setRequiredMavenVersion( String requiredMavenVersion ) - { - this.requiredMavenVersion = requiredMavenVersion; - } - - public String getRequiredMavenVersion() - { - return requiredMavenVersion; - } - - public void setPlugin( Plugin plugin ) - { - this.plugin = plugin; - } - - public Plugin getPlugin() - { - return plugin; - } - - public Artifact getPluginArtifact() - { - return pluginArtifact; - } - - public void setPluginArtifact( Artifact pluginArtifact ) - { - this.pluginArtifact = pluginArtifact; - } - - public Lifecycle getLifecycleMapping( String lifecycleId ) - throws IOException, XmlPullParserException - { - if ( lifecycleMappings == null ) - { - LifecycleConfiguration lifecycleConfiguration; - - Reader reader = null; - try - { - reader = ReaderFactory.newXmlReader( getDescriptorStream( LIFECYCLE_DESCRIPTOR ) ); - - lifecycleConfiguration = new LifecycleMappingsXpp3Reader().read( reader ); - } - finally - { - IOUtil.close( reader ); - } - - lifecycleMappings = new HashMap<String, Lifecycle>(); - - for ( Lifecycle lifecycle : lifecycleConfiguration.getLifecycles() ) - { - lifecycleMappings.put( lifecycle.getId(), lifecycle ); - } - } - - return lifecycleMappings.get( lifecycleId ); - } - - private InputStream getDescriptorStream( String descriptor ) - throws IOException - { - File pluginFile = ( pluginArtifact != null ) ? pluginArtifact.getFile() : null; - if ( pluginFile == null ) - { - throw new IllegalStateException( "plugin main artifact has not been resolved for " + getId() ); - } - - if ( pluginFile.isFile() ) - { - try - { - return new URL( "jar:" + pluginFile.toURI() + "!/" + descriptor ).openStream(); - } - catch ( MalformedURLException e ) - { - throw new IllegalStateException( e ); - } - } - else - { - return new FileInputStream( new File( pluginFile, descriptor ) ); - } - } - - /** - * Creates a shallow copy of this plugin descriptor. - */ - @Override - public PluginDescriptor clone() - { - try - { - return (PluginDescriptor) super.clone(); - } - catch ( CloneNotSupportedException e ) - { - throw new UnsupportedOperationException( e ); - } - } - -} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java deleted file mode 100644 index 66b16916..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java +++ /dev/null @@ -1,358 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 java.io.IOException; -import java.io.Reader; -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.component.repository.ComponentDependency; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -/** - * @author Jason van Zyl - */ -public class PluginDescriptorBuilder -{ - public PluginDescriptor build( Reader reader ) - throws PlexusConfigurationException - { - return build( reader, null ); - } - - public PluginDescriptor build( Reader reader, String source ) - throws PlexusConfigurationException - { - PlexusConfiguration c = buildConfiguration( reader ); - - PluginDescriptor pluginDescriptor = new PluginDescriptor(); - - pluginDescriptor.setSource( source ); - pluginDescriptor.setGroupId( c.getChild( "groupId" ).getValue() ); - pluginDescriptor.setArtifactId( c.getChild( "artifactId" ).getValue() ); - pluginDescriptor.setVersion( c.getChild( "version" ).getValue() ); - pluginDescriptor.setGoalPrefix( c.getChild( "goalPrefix" ).getValue() ); - - pluginDescriptor.setName( c.getChild( "name" ).getValue() ); - pluginDescriptor.setDescription( c.getChild( "description" ).getValue() ); - - String isolatedRealm = c.getChild( "isolatedRealm" ).getValue(); - - if ( isolatedRealm != null ) - { - pluginDescriptor.setIsolatedRealm( Boolean.parseBoolean( isolatedRealm ) ); - } - - String inheritedByDefault = c.getChild( "inheritedByDefault" ).getValue(); - - if ( inheritedByDefault != null ) - { - pluginDescriptor.setInheritedByDefault( Boolean.parseBoolean( inheritedByDefault ) ); - } - - // ---------------------------------------------------------------------- - // Components - // ---------------------------------------------------------------------- - - PlexusConfiguration[] mojoConfigurations = c.getChild( "mojos" ).getChildren( "mojo" ); - - for ( PlexusConfiguration component : mojoConfigurations ) - { - MojoDescriptor mojoDescriptor = buildComponentDescriptor( component, pluginDescriptor ); - - pluginDescriptor.addMojo( mojoDescriptor ); - } - - // ---------------------------------------------------------------------- - // Dependencies - // ---------------------------------------------------------------------- - - PlexusConfiguration[] dependencyConfigurations = c.getChild( "dependencies" ).getChildren( "dependency" ); - - List<ComponentDependency> dependencies = new ArrayList<ComponentDependency>(); - - for ( PlexusConfiguration d : dependencyConfigurations ) - { - ComponentDependency cd = new ComponentDependency(); - - cd.setArtifactId( d.getChild( "artifactId" ).getValue() ); - - cd.setGroupId( d.getChild( "groupId" ).getValue() ); - - cd.setType( d.getChild( "type" ).getValue() ); - - cd.setVersion( d.getChild( "version" ).getValue() ); - - dependencies.add( cd ); - } - - pluginDescriptor.setDependencies( dependencies ); - - return pluginDescriptor; - } - - public MojoDescriptor buildComponentDescriptor( PlexusConfiguration c, PluginDescriptor pluginDescriptor ) - throws PlexusConfigurationException - { - MojoDescriptor mojo = new MojoDescriptor(); - mojo.setPluginDescriptor( pluginDescriptor ); - - mojo.setGoal( c.getChild( "goal" ).getValue() ); - - mojo.setImplementation( c.getChild( "implementation" ).getValue() ); - - PlexusConfiguration langConfig = c.getChild( "language" ); - - if ( langConfig != null ) - { - mojo.setLanguage( langConfig.getValue() ); - } - - PlexusConfiguration configuratorConfig = c.getChild( "configurator" ); - - if ( configuratorConfig != null ) - { - mojo.setComponentConfigurator( configuratorConfig.getValue() ); - } - - PlexusConfiguration composerConfig = c.getChild( "composer" ); - - if ( composerConfig != null ) - { - mojo.setComponentComposer( composerConfig.getValue() ); - } - - String since = c.getChild( "since" ).getValue(); - - if ( since != null ) - { - mojo.setSince( since ); - } - - PlexusConfiguration deprecated = c.getChild( "deprecated", false ); - - if ( deprecated != null ) - { - mojo.setDeprecated( deprecated.getValue() ); - } - - String phase = c.getChild( "phase" ).getValue(); - - if ( phase != null ) - { - mojo.setPhase( phase ); - } - - String executePhase = c.getChild( "executePhase" ).getValue(); - - if ( executePhase != null ) - { - mojo.setExecutePhase( executePhase ); - } - - String executeMojo = c.getChild( "executeGoal" ).getValue(); - - if ( executeMojo != null ) - { - mojo.setExecuteGoal( executeMojo ); - } - - String executeLifecycle = c.getChild( "executeLifecycle" ).getValue(); - - if ( executeLifecycle != null ) - { - mojo.setExecuteLifecycle( executeLifecycle ); - } - - mojo.setInstantiationStrategy( c.getChild( "instantiationStrategy" ).getValue() ); - - mojo.setDescription( c.getChild( "description" ).getValue() ); - - PlexusConfiguration dependencyResolution = c.getChild( "requiresDependencyResolution", false ); - - if ( dependencyResolution != null ) - { - mojo.setDependencyResolutionRequired( dependencyResolution.getValue() ); - } - - PlexusConfiguration dependencyCollection = c.getChild( "requiresDependencyCollection", false ); - - if ( dependencyCollection != null ) - { - mojo.setDependencyCollectionRequired( dependencyCollection.getValue() ); - } - - String directInvocationOnly = c.getChild( "requiresDirectInvocation" ).getValue(); - - if ( directInvocationOnly != null ) - { - mojo.setDirectInvocationOnly( Boolean.parseBoolean( directInvocationOnly ) ); - } - - String requiresProject = c.getChild( "requiresProject" ).getValue(); - - if ( requiresProject != null ) - { - mojo.setProjectRequired( Boolean.parseBoolean( requiresProject ) ); - } - - String requiresReports = c.getChild( "requiresReports" ).getValue(); - - if ( requiresReports != null ) - { - mojo.setRequiresReports( Boolean.parseBoolean( requiresReports ) ); - } - - String aggregator = c.getChild( "aggregator" ).getValue(); - - if ( aggregator != null ) - { - mojo.setAggregator( Boolean.parseBoolean( aggregator ) ); - } - - String requiresOnline = c.getChild( "requiresOnline" ).getValue(); - - if ( requiresOnline != null ) - { - mojo.setOnlineRequired( Boolean.parseBoolean( requiresOnline ) ); - } - - String inheritedByDefault = c.getChild( "inheritedByDefault" ).getValue(); - - if ( inheritedByDefault != null ) - { - mojo.setInheritedByDefault( Boolean.parseBoolean( inheritedByDefault ) ); - } - - String threadSafe = c.getChild( "threadSafe" ).getValue(); - - if ( threadSafe != null ) - { - mojo.setThreadSafe( Boolean.parseBoolean( threadSafe ) ); - } - - // ---------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------- - - PlexusConfiguration mojoConfig = c.getChild( "configuration" ); - mojo.setMojoConfiguration( mojoConfig ); - - // ---------------------------------------------------------------------- - // Parameters - // ---------------------------------------------------------------------- - - PlexusConfiguration[] parameterConfigurations = c.getChild( "parameters" ).getChildren( "parameter" ); - - List<Parameter> parameters = new ArrayList<Parameter>(); - - for ( PlexusConfiguration d : parameterConfigurations ) - { - Parameter parameter = new Parameter(); - - parameter.setName( d.getChild( "name" ).getValue() ); - - parameter.setAlias( d.getChild( "alias" ).getValue() ); - - parameter.setType( d.getChild( "type" ).getValue() ); - - String required = d.getChild( "required" ).getValue(); - - parameter.setRequired( Boolean.parseBoolean( required ) ); - - PlexusConfiguration editableConfig = d.getChild( "editable" ); - - // we need the null check for pre-build legacy plugins... - if ( editableConfig != null ) - { - String editable = d.getChild( "editable" ).getValue(); - - parameter.setEditable( editable == null || Boolean.parseBoolean( editable ) ); - } - - parameter.setDescription( d.getChild( "description" ).getValue() ); - - parameter.setDeprecated( d.getChild( "deprecated" ).getValue() ); - - parameter.setImplementation( d.getChild( "implementation" ).getValue() ); - - PlexusConfiguration paramConfig = mojoConfig.getChild( parameter.getName(), false ); - if ( paramConfig != null ) - { - parameter.setExpression( paramConfig.getValue( null ) ); - parameter.setDefaultValue( paramConfig.getAttribute( "default-value" ) ); - } - - parameters.add( parameter ); - } - - mojo.setParameters( parameters ); - - // TODO: this should not need to be handed off... - - // ---------------------------------------------------------------------- - // Requirements - // ---------------------------------------------------------------------- - - PlexusConfiguration[] requirements = c.getChild( "requirements" ).getChildren( "requirement" ); - - for ( PlexusConfiguration requirement : requirements ) - { - ComponentRequirement cr = new ComponentRequirement(); - - cr.setRole( requirement.getChild( "role" ).getValue() ); - - cr.setRoleHint( requirement.getChild( "role-hint" ).getValue() ); - - cr.setFieldName( requirement.getChild( "field-name" ).getValue() ); - - mojo.addRequirement( cr ); - } - - return mojo; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public PlexusConfiguration buildConfiguration( Reader configuration ) - throws PlexusConfigurationException - { - try - { - return new XmlPlexusConfiguration( Xpp3DomBuilder.build( configuration ) ); - } - catch ( IOException e ) - { - throw new PlexusConfigurationException( e.getMessage(), e ); - } - catch ( XmlPullParserException e ) - { - throw new PlexusConfigurationException( e.getMessage(), e ); - } - } -} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Requirement.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Requirement.java deleted file mode 100644 index 1526b039..00000000 --- a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Requirement.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.apache.maven.plugin.descriptor; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -/** - * Describes a component requirement. - * - * @author <a href="mailto:brett@apache.org">Brett Porter</a> - */ -public class Requirement - implements Cloneable -{ - private final String role; - - private final String roleHint; - - public Requirement( String role ) - { - this.role = role; - this.roleHint = null; - } - - public Requirement( String role, String roleHint ) - { - this.role = role; - this.roleHint = roleHint; - } - - public String getRole() - { - return role; - } - - public String getRoleHint() - { - return roleHint; - } - - /** - * Creates a shallow copy of this requirement. - */ - @Override - public Requirement clone() - { - try - { - return (Requirement) super.clone(); - } - catch ( CloneNotSupportedException e ) - { - throw new UnsupportedOperationException( e ); - } - } - -} |