aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main')
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java131
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java198
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java53
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/ContextEnabled.java45
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java72
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java80
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java69
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java85
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java34
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java31
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidParameterException.java37
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java38
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java719
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Parameter.java207
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java445
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java358
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Requirement.java72
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java158
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java196
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/lifecycle.mdo129
-rw-r--r--framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/plugin.mdo525
21 files changed, 3682 insertions, 0 deletions
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java
new file mode 100644
index 00000000..4fee2e25
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java
@@ -0,0 +1,131 @@
+package org.apache.maven.monitor.logging;
+
+/*
+ * 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.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.logging.Logger;
+
+/**
+ * @author jdcasey
+ */
+public class DefaultLog
+ implements Log
+{
+
+ private final Logger logger;
+
+ public DefaultLog( Logger logger )
+ {
+ this.logger = logger;
+ }
+
+ public void debug( CharSequence content )
+ {
+ logger.debug( toString( content ) );
+ }
+
+ private String toString( CharSequence content )
+ {
+ if ( content == null )
+ {
+ return "";
+ }
+ else
+ {
+ return content.toString();
+ }
+ }
+
+ public void debug( CharSequence content, Throwable error )
+ {
+ logger.debug( toString( content ), error );
+ }
+
+ public void debug( Throwable error )
+ {
+ logger.debug( "", error );
+ }
+
+ public void info( CharSequence content )
+ {
+ logger.info( toString( content ) );
+ }
+
+ public void info( CharSequence content, Throwable error )
+ {
+ logger.info( toString( content ), error );
+ }
+
+ public void info( Throwable error )
+ {
+ logger.info( "", error );
+ }
+
+ public void warn( CharSequence content )
+ {
+ logger.warn( toString( content ) );
+ }
+
+ public void warn( CharSequence content, Throwable error )
+ {
+ logger.warn( toString( content ), error );
+ }
+
+ public void warn( Throwable error )
+ {
+ logger.warn( "", error );
+ }
+
+ public void error( CharSequence content )
+ {
+ logger.error( toString( content ) );
+ }
+
+ public void error( CharSequence content, Throwable error )
+ {
+ logger.error( toString( content ), error );
+ }
+
+ public void error( Throwable error )
+ {
+ logger.error( "", error );
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return logger.isDebugEnabled();
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return logger.isInfoEnabled();
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return logger.isWarnEnabled();
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return logger.isErrorEnabled();
+ }
+
+} \ 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/AbstractMojo.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
new file mode 100644
index 00000000..d33e9bfc
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
@@ -0,0 +1,198 @@
+package org.apache.maven.plugin;
+
+/*
+ * 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.Map;
+
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+
+/**
+ * Abstract class to provide most of the infrastructure required to implement a <code>Mojo</code> except for
+ * the execute method.
+ * <br/>
+ * The implementation should have a <code>goal</code> annotation in the class-level javadoc annotation:
+ * <pre>
+ * &#47;&#42;&#42;
+ * &#42; &#64;goal goalName
+ * &#42;&#47;
+ * </pre>
+ *
+ * There are also a number of class-level javadoc annotations which can be used to control how and when the
+ * <code>Mojo</code> is executed:
+ * <br/>
+ * <br/>
+ *
+ * <table border="1">
+ * <tr bgcolor="#CCCCCC">
+ * <th>Descriptor Element</th>
+ * <th>Annotation</th>
+ * <th>Required?</th>
+ * <th>Notes</th>
+ * </tr>
+ * <tr>
+ * <td>goal</td>
+ * <td>@goal &lt;goalName&gt;</td>
+ * <td>Yes</td>
+ * <td>The 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.</td>
+ * </tr>
+ * <tr>
+ * <td>implementation</td>
+ * <td>none (detected)</td>
+ * <td>Yes</td>
+ * <td>The Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).</td>
+ * </tr>
+ * <tr>
+ * <td>language</td>
+ * <td>none (detected)</td>
+ * <td>No. Default: <code>java</code></td>
+ * <td>The implementation language for this Mojo (Java, beanshell, etc.).</td>
+ * </tr>
+ * <tr>
+ * <td>configurator</td>
+ * <td>@configurator &lt;roleHint&gt;</td>
+ * <td>No</td>
+ * <td>The configurator type to use when injecting parameter values into this Mojo. The value is normally
+ * deduced from the Mojo's implementation language, but can be specified to allow a custom
+ * ComponentConfigurator implementation to be used.
+ * <br/>
+ * <i>NOTE: This will only be used in very special cases, using a highly controlled vocabulary of possible
+ * values. (Elements like this are why it's a good idea to use the descriptor tools.)</i>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>phase</td>
+ * <td>@phase &lt;phaseName&gt;</td>
+ * <td>No</td>
+ * <td>Binds this Mojo to a particular phase of the standard build lifecycle, if specified.
+ * <br/>
+ * <i>NOTE: This is only required if this Mojo is to participate in the standard build process.</i>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>execute</td>
+ * <td>@execute [phase=&lt;phaseName&gt;|goal=&lt;goalName&gt;] [lifecycle=&lt;lifecycleId&gt;]</td>
+ * <td>No</td>
+ * <td>When this goal is invoked, it will first invoke a parallel lifecycle, ending at the given phase.
+ * If a goal is provided instead of a phase, that goal will be executed in isolation.
+ * The execution of either will not affect the current project, but instead make available the
+ * <code>${executedProject}</code> expression if required. An alternate lifecycle can also be provided:
+ * for more information see the documentation on the
+ * <a href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html"
+ * target="_blank">build lifecycle</a>.
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>requiresDependencyResolution</td>
+ * <td>@requiresDependencyResolution &lt;requiredScope&gt;</td>
+ * <td>No</td>
+ * <td>Flags this Mojo as requiring the dependencies in the specified scope (or an implied scope) to be
+ * resolved before it can execute.
+ * <br/>
+ * <i>NOTE: Currently supports <b>compile</b>, <b>runtime</b>, and <b>test</b> scopes.</i>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>description</td>
+ * <td>none (detected)</td>
+ * <td>No</td>
+ * <td>The description of this Mojo's functionality. <i>Using the toolset, this will be the class-level
+ * Javadoc description provided.
+ * <br/>
+ * <i>NOTE: While this is not a required part of the Mojo specification, it <b>SHOULD</b> be provided to
+ * enable future tool support for browsing, etc. and for clarity.</i>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>parameters</td>
+ * <td>N/A</td>
+ * <td>No</td>
+ * <td>Specifications for the parameters which this Mojo uses will be provided in <b>parameter</b> sub-elements
+ * in this section.
+ * <br/>
+ * <i>NOTE: Parameters are discussed in more detail below.</i>
+ * </td>
+ * </tr>
+ * </table>
+ *
+ * @see <a href="http://maven.apache.org/guides/plugin/guide-java-plugin-development.html" target="_blank">Guide to Developing Java Plugins</a>
+ * @see <a href="http://maven.apache.org/guides/mini/guide-configuring-plugins.html" target="_blank">Guide to Configuring Plug-ins</a>
+ * @see <a href="http://maven.apache.org/developers/mojo-api-specification.html" target="_blank">Mojo API Specification</a>
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @author jdcasey
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ */
+public abstract class AbstractMojo
+ implements Mojo, ContextEnabled
+{
+ /** Instance logger */
+ private Log log;
+
+ /** Plugin container context */
+ private Map pluginContext;
+
+ /**
+ * @see org.apache.maven.plugin.Mojo#setLog(org.apache.maven.plugin.logging.Log)
+ */
+ public void setLog( Log log )
+ {
+ this.log = log;
+ }
+
+ /**
+ * Returns the logger that has been injected into this mojo. If no logger has been setup yet, a
+ * <code>SystemStreamLog</code> logger will be created and returned.
+ * <br/><br/>
+ * <strong>Note:</strong>
+ * The logger returned by this method must not be cached in an instance field during the construction of the mojo.
+ * This would cause the mojo to use a wrongly configured default logger when being run by Maven. The proper logger
+ * gets injected by the Plexus container <em>after</em> the mojo has been constructed. Therefore, simply call this
+ * method directly whenever you need the logger, it is fast enough and needs no caching.
+ *
+ * @see org.apache.maven.plugin.Mojo#getLog()
+ */
+ public Log getLog()
+ {
+ if ( log == null )
+ {
+ log = new SystemStreamLog();
+ }
+
+ return log;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.ContextEnabled#getPluginContext()
+ */
+ public Map getPluginContext()
+ {
+ return pluginContext;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.ContextEnabled#setPluginContext(java.util.Map)
+ */
+ public void setPluginContext( Map pluginContext )
+ {
+ this.pluginContext = pluginContext;
+ }
+}
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java
new file mode 100644
index 00000000..52aded3d
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojoExecutionException.java
@@ -0,0 +1,53 @@
+package org.apache.maven.plugin;
+
+/*
+ * 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.
+ */
+
+/**
+ * Base exception.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public abstract class AbstractMojoExecutionException
+ extends Exception
+{
+ protected Object source;
+
+ protected String longMessage;
+
+ public AbstractMojoExecutionException( String message )
+ {
+ super( message );
+ }
+
+ public AbstractMojoExecutionException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+
+ public String getLongMessage()
+ {
+ return longMessage;
+ }
+
+ public Object getSource()
+ {
+ return source;
+ }
+}
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/ContextEnabled.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/ContextEnabled.java
new file mode 100644
index 00000000..d63cb49b
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/ContextEnabled.java
@@ -0,0 +1,45 @@
+package org.apache.maven.plugin;
+
+/*
+ * 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.Map;
+
+/**
+ * Interface to allow <code>Mojos</code> to communicate with each others <code>Mojos</code>, other than
+ * project's source root and project's attachment.
+ * <br/>
+ * The plugin manager would pull the context out of the plugin container context, and populate it into the Mojo.
+ *
+ * @author jdcasey
+ */
+public interface ContextEnabled
+{
+ /**
+ * Set a new shared context <code>Map</code> to a mojo before executing it.
+ *
+ * @param pluginContext a new <code>Map</code>
+ */
+ void setPluginContext( Map pluginContext );
+
+ /**
+ * @return a <code>Map</code> stored in the plugin container's context.
+ */
+ Map getPluginContext();
+}
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java
new file mode 100644
index 00000000..76a2aad7
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java
@@ -0,0 +1,72 @@
+package org.apache.maven.plugin;
+
+/*
+ * 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.apache.maven.plugin.logging.Log;
+
+/**
+ * This interface forms the contract required for <code>Mojos</code> to interact with the <code>Maven</code>
+ * infrastructure.
+ * <br/>
+ * It features an <code>execute()</code> method, which triggers the Mojo's build-process behavior, and can throw
+ * a MojoExecutionException or MojoFailureException if error conditions occur.
+ * <br/>
+ * Also included is the <code>setLog(...)</code> method, which simply allows Maven to inject a logging mechanism which
+ * will allow the Mojo to communicate to the outside world through standard Maven channels.
+ *
+ * @author Jason van Zyl
+ */
+public interface Mojo
+{
+ /** The component <code>role</code> hint for Plexus container */
+ String ROLE = Mojo.class.getName();
+
+ /**
+ * Perform whatever build-process behavior this <code>Mojo</code> implements.
+ * <br/>
+ * This is the main trigger for the <code>Mojo</code> inside the <code>Maven</code> system, and allows
+ * the <code>Mojo</code> to communicate errors.
+ *
+ * @throws MojoExecutionException if an unexpected problem occurs.
+ * Throwing this exception causes a "BUILD ERROR" message to be displayed.
+ * @throws MojoFailureException if an expected problem (such as a compilation failure) occurs.
+ * Throwing this exception causes a "BUILD FAILURE" message to be displayed.
+ */
+ void execute()
+ throws MojoExecutionException, MojoFailureException;
+
+ /**
+ * Inject a standard <code>Maven</code> logging mechanism to allow this <code>Mojo</code> to communicate events
+ * and feedback to the user.
+ *
+ * @param log a new logger
+ */
+ // TODO: not sure about this here, and may want a getLog on here as well/instead
+ void setLog( Log log );
+
+ /**
+ * Furnish access to the standard Maven logging mechanism which is managed in this base class.
+ *
+ * @return a log4j-like logger object which allows plugins to create messages at levels of <code>"debug"</code>,
+ * <code>"info"</code>, <code>"warn"</code>, and <code>"error"</code>. This logger is the accepted means to display
+ * information to the user.
+ */
+ Log getLog();
+}
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java
new file mode 100644
index 00000000..b440af02
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionException.java
@@ -0,0 +1,80 @@
+package org.apache.maven.plugin;
+
+/*
+ * 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.
+ */
+
+/**
+ * An exception occurring during the execution of a plugin.
+ * <br/>
+ * Throwing this exception causes a "BUILD ERROR" message to be displayed.
+ *
+ * @author Brett Porter
+ */
+public class MojoExecutionException
+ extends AbstractMojoExecutionException
+{
+ /**
+ * Construct a new <code>MojoExecutionException</code> exception providing the source and a short and long message:
+ * these messages are used to improve the message written at the end of Maven build.
+ *
+ * @param source
+ * @param shortMessage
+ * @param longMessage
+ */
+ public MojoExecutionException( Object source, String shortMessage, String longMessage )
+ {
+ super( shortMessage );
+ this.source = source;
+ this.longMessage = longMessage;
+ }
+
+ /**
+ * Construct a new <code>MojoExecutionException</code> exception wrapping an underlying <code>Exception</code>
+ * and providing a <code>message</code>.
+ *
+ * @param message
+ * @param cause
+ */
+ public MojoExecutionException( String message, Exception cause )
+ {
+ super( message, cause );
+ }
+
+ /**
+ * Construct a new <code>MojoExecutionException</code> exception wrapping an underlying <code>Throwable</code>
+ * and providing a <code>message</code>.
+ *
+ * @param message
+ * @param cause
+ */
+ public MojoExecutionException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+
+ /**
+ * Construct a new <code>MojoExecutionException</code> exception providing a <code>message</code>.
+ *
+ * @param message
+ */
+ public MojoExecutionException( 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/MojoFailureException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java
new file mode 100644
index 00000000..28dc43d3
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoFailureException.java
@@ -0,0 +1,69 @@
+package org.apache.maven.plugin;
+
+/*
+ * 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.
+ */
+
+/**
+ * An exception occurring during the execution of a plugin (such as a compilation failure).
+ * <br/>
+ * Throwing this exception causes a "BUILD FAILURE" message to be displayed.
+ *
+ * @author Brett Porter
+ */
+public class MojoFailureException
+ extends AbstractMojoExecutionException
+{
+ /**
+ * Construct a new <code>MojoFailureException</code> exception providing the source and a short and long message:
+ * these messages are used to improve the message written at the end of Maven build.
+ *
+ * @param source
+ * @param shortMessage
+ * @param longMessage
+ */
+ public MojoFailureException( Object source, String shortMessage, String longMessage )
+ {
+ super( shortMessage );
+ this.source = source;
+ this.longMessage = longMessage;
+ }
+
+ /**
+ * Construct a new <code>MojoFailureException</code> exception providing a message.
+ *
+ * @param message
+ */
+ public MojoFailureException( String message )
+ {
+ super( message );
+ }
+
+ /**
+ * Construct a new <code>MojoFailureException</code> exception wrapping an underlying <code>Throwable</code>
+ * and providing a <code>message</code>.
+ *
+ * @param message
+ * @param cause
+ * @since 2.0.9
+ */
+ public MojoFailureException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java
new file mode 100644
index 00000000..4d99546a
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java
@@ -0,0 +1,85 @@
+package org.apache.maven.plugin;
+
+/*
+ * 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.Iterator;
+import java.util.List;
+
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+
+public class MojoNotFoundException
+ extends Exception
+{
+ private String goal;
+
+ private PluginDescriptor pluginDescriptor;
+
+ public MojoNotFoundException( String goal, PluginDescriptor pluginDescriptor )
+ {
+ super( toMessage( goal, pluginDescriptor ) );
+
+ this.goal = goal;
+ this.pluginDescriptor = pluginDescriptor;
+ }
+
+ public String getGoal()
+ {
+ return goal;
+ }
+
+ public PluginDescriptor getPluginDescriptor()
+ {
+ return pluginDescriptor;
+ }
+
+ private static String toMessage( String goal, PluginDescriptor pluginDescriptor )
+ {
+ StringBuilder buffer = new StringBuilder( 256 );
+
+ buffer.append( "Could not find goal '" ).append( goal ).append( "'" );
+
+ if ( pluginDescriptor != null )
+ {
+ buffer.append( " in plugin " ).append( pluginDescriptor.getId() );
+
+ buffer.append( " among available goals " );
+ List<MojoDescriptor> mojos = pluginDescriptor.getMojos();
+ if ( mojos != null )
+ {
+ for ( Iterator<MojoDescriptor> it = mojos.iterator(); it.hasNext(); )
+ {
+ MojoDescriptor mojo = it.next();
+ if ( mojo != null )
+ {
+ buffer.append( mojo.getGoal() );
+ }
+ if ( it.hasNext() )
+ {
+ buffer.append( ", " );
+ }
+ }
+ }
+ }
+
+ return buffer.toString();
+ }
+
+}
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
new file mode 100644
index 00000000..b236c8c7
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java
@@ -0,0 +1,34 @@
+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
new file mode 100644
index 00000000..4cad9b7c
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java
@@ -0,0 +1,31 @@
+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
new file mode 100644
index 00000000..557a3d54
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidParameterException.java
@@ -0,0 +1,37 @@
+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
new file mode 100644
index 00000000..4b8e7397
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java
@@ -0,0 +1,38 @@
+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
new file mode 100644
index 00000000..bc2d5554
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
@@ -0,0 +1,719 @@
+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>&lt;phase&gt;</code> element from the surrounding
+ * <code>&lt;execution&gt;</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
new file mode 100644
index 00000000..6c5036bc
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Parameter.java
@@ -0,0 +1,207 @@
+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
new file mode 100644
index 00000000..1d6f1be4
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
@@ -0,0 +1,445 @@
+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
new file mode 100644
index 00000000..66b16916
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java
@@ -0,0 +1,358 @@
+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
new file mode 100644
index 00000000..1526b039
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/Requirement.java
@@ -0,0 +1,72 @@
+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 );
+ }
+ }
+
+}
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java
new file mode 100644
index 00000000..8d3bf1f9
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java
@@ -0,0 +1,158 @@
+package org.apache.maven.plugin.logging;
+
+/*
+ * 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.
+ */
+
+/**
+ * This interface supplies the API for providing feedback to the user from the <code>Mojo</code>, using standard
+ * <code>Maven</code> channels.
+ * <br/>
+ * There should be no big surprises here, although you may notice that the methods accept
+ * <code>java.lang.CharSequence</code> rather than <code>java.lang.String</code>. This is provided mainly as a
+ * convenience, to enable developers to pass things like <code>java.lang.StringBuffer</code> directly into the logger,
+ * rather than formatting first by calling <code>toString()</code>.
+ *
+ * @author jdcasey
+ */
+public interface Log
+{
+ /**
+ * @return true if the <b>debug</b> error level is enabled
+ */
+ boolean isDebugEnabled();
+
+ /**
+ * Send a message to the user in the <b>debug</b> error level.
+ *
+ * @param content
+ */
+ void debug( CharSequence content );
+
+ /**
+ * Send a message (and accompanying exception) to the user in the <b>debug</b> error level.
+ * <br/>
+ * The error's stacktrace will be output when this error level is enabled.
+ *
+ * @param content
+ * @param error
+ */
+ void debug( CharSequence content, Throwable error );
+
+ /**
+ * Send an exception to the user in the <b>debug</b> error level.
+ * <br/>
+ * The stack trace for this exception will be output when this error level is enabled.
+ *
+ * @param error
+ */
+ void debug( Throwable error );
+
+ /**
+ * @return true if the <b>info</b> error level is enabled
+ */
+ boolean isInfoEnabled();
+
+ /**
+ * Send a message to the user in the <b>info</b> error level.
+ *
+ * @param content
+ */
+ void info( CharSequence content );
+
+ /**
+ * Send a message (and accompanying exception) to the user in the <b>info</b> error level.
+ * <br/>
+ * The error's stacktrace will be output when this error level is enabled.
+ *
+ * @param content
+ * @param error
+ */
+ void info( CharSequence content, Throwable error );
+
+ /**
+ * Send an exception to the user in the <b>info</b> error level.
+ * <br/>
+ * The stack trace for this exception will be output when this error level is enabled.
+ *
+ * @param error
+ */
+ void info( Throwable error );
+
+ /**
+ * @return true if the <b>warn</b> error level is enabled
+ */
+ boolean isWarnEnabled();
+
+ /**
+ * Send a message to the user in the <b>warn</b> error level.
+ *
+ * @param content
+ */
+ void warn( CharSequence content );
+
+ /**
+ * Send a message (and accompanying exception) to the user in the <b>warn</b> error level.
+ * <br/>
+ * The error's stacktrace will be output when this error level is enabled.
+ *
+ * @param content
+ * @param error
+ */
+ void warn( CharSequence content, Throwable error );
+
+ /**
+ * Send an exception to the user in the <b>warn</b> error level.
+ * <br/>
+ * The stack trace for this exception will be output when this error level is enabled.
+ *
+ * @param error
+ */
+ void warn( Throwable error );
+
+ /**
+ * @return true if the <b>error</b> error level is enabled
+ */
+ boolean isErrorEnabled();
+
+ /**
+ * Send a message to the user in the <b>error</b> error level.
+ *
+ * @param content
+ */
+ void error( CharSequence content );
+
+ /**
+ * Send a message (and accompanying exception) to the user in the <b>error</b> error level.
+ * <br/>
+ * The error's stacktrace will be output when this error level is enabled.
+ *
+ * @param content
+ * @param error
+ */
+ void error( CharSequence content, Throwable error );
+
+ /**
+ * Send an exception to the user in the <b>error</b> error level.
+ * <br/>
+ * The stack trace for this exception will be output when this error level is enabled.
+ *
+ * @param error
+ */
+ void error( Throwable error );
+} \ 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/logging/SystemStreamLog.java b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java
new file mode 100644
index 00000000..90475bf5
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java
@@ -0,0 +1,196 @@
+package org.apache.maven.plugin.logging;
+
+/*
+ * 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.PrintWriter;
+import java.io.StringWriter;
+
+/**
+ * Logger with "standard" output and error output stream.
+ *
+ * @author jdcasey
+ */
+public class SystemStreamLog
+ implements Log
+{
+ /**
+ * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence)
+ */
+ public void debug( CharSequence content )
+ {
+ print( "debug", content );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence, java.lang.Throwable)
+ */
+ public void debug( CharSequence content, Throwable error )
+ {
+ print( "debug", content, error );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#debug(java.lang.Throwable)
+ */
+ public void debug( Throwable error )
+ {
+ print( "debug", error );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence)
+ */
+ public void info( CharSequence content )
+ {
+ print( "info", content );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence, java.lang.Throwable)
+ */
+ public void info( CharSequence content, Throwable error )
+ {
+ print( "info", content, error );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#info(java.lang.Throwable)
+ */
+ public void info( Throwable error )
+ {
+ print( "info", error );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence)
+ */
+ public void warn( CharSequence content )
+ {
+ print( "warn", content );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence, java.lang.Throwable)
+ */
+ public void warn( CharSequence content, Throwable error )
+ {
+ print( "warn", content, error );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#warn(java.lang.Throwable)
+ */
+ public void warn( Throwable error )
+ {
+ print( "warn", error );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence)
+ */
+ public void error( CharSequence content )
+ {
+ System.err.println( "[error] " + content.toString() );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence, java.lang.Throwable)
+ */
+ public void error( CharSequence content, Throwable error )
+ {
+ StringWriter sWriter = new StringWriter();
+ PrintWriter pWriter = new PrintWriter( sWriter );
+
+ error.printStackTrace( pWriter );
+
+ System.err.println( "[error] " + content.toString() + "\n\n" + sWriter.toString() );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable)
+ */
+ public void error( Throwable error )
+ {
+ StringWriter sWriter = new StringWriter();
+ PrintWriter pWriter = new PrintWriter( sWriter );
+
+ error.printStackTrace( pWriter );
+
+ System.err.println( "[error] " + sWriter.toString() );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#isDebugEnabled()
+ */
+ public boolean isDebugEnabled()
+ {
+ // TODO: Not sure how best to set these for this implementation...
+ return false;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
+ */
+ public boolean isInfoEnabled()
+ {
+ return true;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
+ */
+ public boolean isWarnEnabled()
+ {
+ return true;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
+ */
+ public boolean isErrorEnabled()
+ {
+ return true;
+ }
+
+ private void print( String prefix, CharSequence content )
+ {
+ System.out.println( "[" + prefix + "] " + content.toString() );
+ }
+
+ private void print( String prefix, Throwable error )
+ {
+ StringWriter sWriter = new StringWriter();
+ PrintWriter pWriter = new PrintWriter( sWriter );
+
+ error.printStackTrace( pWriter );
+
+ System.out.println( "[" + prefix + "] " + sWriter.toString() );
+ }
+
+ private void print( String prefix, CharSequence content, Throwable error )
+ {
+ StringWriter sWriter = new StringWriter();
+ PrintWriter pWriter = new PrintWriter( sWriter );
+
+ error.printStackTrace( pWriter );
+
+ System.out.println( "[" + prefix + "] " + content.toString() + "\n\n" + sWriter.toString() );
+ }
+} \ No newline at end of file
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/lifecycle.mdo b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/lifecycle.mdo
new file mode 100644
index 00000000..2335d15c
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/lifecycle.mdo
@@ -0,0 +1,129 @@
+<!--
+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.
+-->
+
+<model xmlns="http://modello.codehaus.org/MODELLO/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 http://modello.codehaus.org/xsd/modello-1.0.0.xsd"
+ xml.namespace="http://maven.apache.org/LIFECYCLE/${version}"
+ xml.schemaLocation="http://maven.apache.org/xsd/lifecycle-${version}.xsd">
+ <id>lifecycle-mappings</id>
+ <name>LifecycleMappings</name>
+ <description><![CDATA[
+ Configuration of custom lifecycle mappings for the plugin, as generally stored in
+ <code>META-INF/maven/lifecycle.xml</code> in a plugin's jar artifact.
+ ]]></description>
+ <defaults>
+ <default>
+ <key>package</key>
+ <value>org.apache.maven.plugin.lifecycle</value>
+ </default>
+ </defaults>
+ <classes>
+ <class rootElement="true" xml.tagName="lifecycles" xsd.compositor="sequence">
+ <name>LifecycleConfiguration</name>
+ <version>1.0.0</version>
+ <description><![CDATA[Root element of the <code>lifecycle.xml</code> file.]]></description>
+ <fields>
+ <field>
+ <name>lifecycles</name>
+ <version>1.0.0</version>
+ <association xml.itemsStyle="flat">
+ <type>Lifecycle</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+ <class>
+ <name>Lifecycle</name>
+ <version>1.0.0</version>
+ <description><![CDATA[
+ A custom lifecycle mapping definition.
+ ]]></description>
+ <fields>
+ <field>
+ <name>id</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The ID of this lifecycle, for identification in the mojo descriptor.</description>
+ </field>
+ <field>
+ <name>phases</name>
+ <version>1.0.0</version>
+ <description>The phase mappings for this lifecycle.</description>
+ <association>
+ <type>Phase</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+ <class>
+ <name>Phase</name>
+ <version>1.0.0</version>
+ <description>A phase mapping definition.</description>
+ <fields>
+ <field>
+ <name>id</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The ID of this phase, eg &lt;code&gt;generate-sources&lt;/code&gt;.</description>
+ </field>
+ <field>
+ <name>executions</name>
+ <version>1.0.0</version>
+ <description>The goals to execute within the phase.</description>
+ <association>
+ <type>Execution</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>configuration</name>
+ <version>1.0.0</version>
+ <type>DOM</type>
+ <description>Configuration to pass to all goals run in this phase.</description>
+ </field>
+ </fields>
+ </class>
+ <class>
+ <name>Execution</name>
+ <version>1.0.0</version>
+ <description>A set of goals to execute.</description>
+ <fields>
+ <field>
+ <name>configuration</name>
+ <version>1.0.0</version>
+ <type>DOM</type>
+ <description>Configuration to pass to the goals.</description>
+ </field>
+ <field>
+ <name>goals</name>
+ <version>1.0.0</version>
+ <description>The goals to execute.</description>
+ <association>
+ <type>String</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+ </classes>
+</model>
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/plugin.mdo b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/plugin.mdo
new file mode 100644
index 00000000..83bf3bf3
--- /dev/null
+++ b/framework/src/maven/apache-maven-3.3.3/maven-plugin-api/src/main/mdo/plugin.mdo
@@ -0,0 +1,525 @@
+<!--
+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.
+-->
+
+<model xmlns="http://modello.codehaus.org/MODELLO/1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.4.0 http://modello.codehaus.org/xsd/modello-1.4.0.xsd">
+ <id>plugin</id>
+ <name>PluginDescriptor</name>
+ <description><![CDATA[
+ Plugin descriptor, stored in <code>META-INF/maven/plugin.xml</code> in a plugin's jar artifact.
+ This descriptor is generally generated from plugin sources, using
+ <a href="/plugins/maven-plugin-plugin/">maven-plugin-plugin</a>.
+ <p><i>Notice:</i> this documentation is generated from a Modello model but the code executed is not generated
+ from this descriptor. Please report if you find anything wrong.</p>
+ ]]></description>
+ <defaults>
+ <default>
+ <key>package</key>
+ <value>plugin descriptor XML documentation (no java generation)</value><!-- intentionally non-buildable value -->
+ </default>
+ </defaults>
+ <classes>
+ <class rootElement="true" xml.tagName="plugin">
+ <name>PluginDescriptor</name>
+ <version>1.0.0</version>
+ <description><![CDATA[Root element of the <code>plugin.xml</code> file.]]></description>
+ <!-- see o.a.m.plugin.descriptor.PluginDescriptor -->
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.0.0</version>
+ <description>Name of the plugin.</description>
+ <type>String</type>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.0.0</version>
+ <description>Description of the plugin.</description>
+ <type>String</type>
+ </field>
+ <field>
+ <name>groupId</name>
+ <version>1.0.0</version>
+ <description>The group id of the plugin.</description>
+ <type>String</type>
+ </field>
+ <field>
+ <name>artifactId</name>
+ <version>1.0.0</version>
+ <description>The artifact id of the plugin.</description>
+ <type>String</type>
+ </field>
+ <field>
+ <name>version</name>
+ <version>1.0.0</version>
+ <description>The version of the plugin.</description>
+ <type>String</type>
+ </field>
+ <field>
+ <name>goalPrefix</name>
+ <version>1.0.0</version>
+ <description></description>
+ <type>String</type>
+ </field>
+ <field>
+ <name>isolatedRealm</name>
+ <version>1.0.0</version>
+ <description></description>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>inheritedByDefault</name>
+ <version>1.0.0</version>
+ <description></description>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field xdoc.separator="blank">
+ <name>mojos</name>
+ <version>1.0.0</version>
+ <association>
+ <type>MojoDescriptor</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ <description>Description of each Mojo provided by the plugin.</description>
+ </field>
+ <field xdoc.separator="blank">
+ <name>dependencies</name>
+ <version>1.0.0</version>
+ <association>
+ <type>Dependency</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ <description>
+ A set of dependencies which the plugin requires in order to function. This enables the plugin to function
+ independently of its POM (or at least to declare the libraries it needs to run).
+ </description>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>MojoDescriptor</name>
+ <version>1.0.0</version>
+ <description><![CDATA[
+ A Mojo description.
+ ]]></description>
+ <!-- see o.a.m.plugin.descriptor.MojoDescriptor -->
+ <fields>
+ <field>
+ <name>goal</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>
+ 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.
+ </description>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The description of this Mojo's functionality.</description>
+ </field>
+ <field>
+ <name>implementation</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>
+ The Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).
+ </description>
+ </field>
+ <field>
+ <name>language</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <defaultValue>java</defaultValue>
+ <description>The implementation language for this Mojo (java, beanshell, etc.).</description>
+ </field>
+ <field>
+ <name>phase</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description><![CDATA[
+ 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>&lt;phase&gt;</code> element from the
+ surrounding <code>&lt;execution&gt;</code> element.
+ ]]></description>
+ </field>
+ <field>
+ <name>executePhase</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>Reference the invocation phase of the Mojo.</description>
+ </field>
+ <field>
+ <name>executeGoal</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>Reference the invocation goal of the Mojo.</description>
+ </field>
+ <field>
+ <name>executeLifecycle</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description></description>
+ </field>
+ <field>
+ <name>requiresDependencyResolution</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <defaultValue>runtime</defaultValue>
+ <description><![CDATA[
+ Flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can
+ execute: <code>compile</code>, <code>runtime</code>, <code>test</code>,
+ <code>compile+runtime</code> (since Maven 3.0) or <code>runtime+system</code> (since Maven 3.0)
+ ]]></description>
+ </field>
+ <field>
+ <name>requiresDependencyCollection</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description><![CDATA[
+ Flags this mojo as requiring information about the dependencies that would make up the specified class
+ path. As the name suggests, this is similar to requiresDependencyResolution and supports the same values.
+ The important difference is this will not resolve the files for the dependencies, i.e. the artifacts
+ associated with a Maven project can lack a file. As such, this annotation 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.
+ ]]></description>
+ </field>
+ <field>
+ <name>requiresDirectInvocation</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>Flags this Mojo to be invoked directly only.</description>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>requiresProject</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>Flags this Mojo to require running inside of a project.</description>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>requiresReports</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>Flags this Mojo to require running inside of a reports context. Unsupported since Maven 3.0.</description>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>requiresOnline</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>Flags this Mojo to require online mode for its operation.</description>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>aggregator</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>
+ Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects
+ listed as modules.
+ </description>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>inheritedByDefault</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>Specify that the Mojo is inherited.</description>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>threadSafe</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>
+ Marks this mojo as being thread-safe, i.e. the mojo safely supports concurrent execution during parallel
+ builds. Mojos without this annotation will make Maven output a warning when used during a parallel build
+ session. Since Maven 3.0.
+ </description>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>instantiationStrategy</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <defaultValue>per-lookup</defaultValue>
+ <description>Specify the instantiation strategy.</description>
+ </field>
+ <field>
+ <name>executionStrategy</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description><![CDATA[
+ Specify the execution strategy: <code>once-per-session</code>, <code>always</code>.
+ ]]></description>
+ <defaultValue>once-per-session</defaultValue>
+ </field>
+ <field>
+ <name>since</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>Specify the version when the Mojo was added to the API. Similar to Javadoc since.</description>
+ </field>
+ <field>
+ <name>deprecated</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>
+ 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.
+ </description>
+ </field>
+ <field>
+ <name>configurator</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>
+ The configurator type to use when injecting parameter values into this Mojo. The value is normally deduced
+ from the Mojo's implementation language, but can be specified to allow a custom ComponentConfigurator
+ implementation to be used.
+ </description>
+ </field>
+ <field>
+ <name>composer</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description></description>
+ </field>
+ <field xdoc.separator="blank">
+ <name>parameters</name>
+ <version>1.0.0</version>
+ <description></description>
+ <association>
+ <type>Parameter</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>configuration</name>
+ <version>1.0.0</version>
+ <description></description>
+ <association xml.tagName="paramName">
+ <type>Configuration</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field xdoc.separator="blank">
+ <name>requirements</name>
+ <version>1.0.0</version>
+ <description></description>
+ <association>
+ <type>Requirement</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Parameter</name>
+ <version>1.0.0</version>
+ <description>A phase mapping definition.</description>
+ <!-- see o.a.m.plugin.descriptor.Parameter -->
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <required>true</required>
+ <description>
+ The name of the parameter, to be used while configuring this parameter from the Mojo's declared defaults
+ or from the POM.
+ </description>
+ </field>
+ <field>
+ <name>alias</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>
+ Specifies an alias which can be used to configure this parameter from the POM.
+ This is primarily useful to improve user-friendliness, where Mojo field names are not intuitive to the
+ user or are otherwise not conducive to configuration via the POM.
+ </description>
+ </field>
+ <field>
+ <name>type</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <required>true</required>
+ <description>
+ The Java type for this parameter. This is used to validate the result of any expressions used to calculate
+ the value which should be injected into the Mojo for this parameter.
+ </description>
+ </field>
+ <field>
+ <name>required</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <description>
+ Whether this parameter is required for the Mojo to function. This is used to validate the configuration
+ for a Mojo before it is injected, and before the Mojo is executed from some half-state.
+ </description>
+ </field>
+ <field>
+ <name>editable</name>
+ <version>1.0.0</version>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ <description><![CDATA[
+ Specifies that this parameter can be configured directly by the user (as in the case of POM-specified
+ configuration). This is useful when you want to force the user to use common POM elements rather than
+ plugin configurations, as in the case where you want to use the artifact's final name as a parameter. In
+ this case, you want the user to modify <code>&lt;build&gt;&lt;finalName/&gt;&lt;/build&gt;</code> rather
+ than specifying a value for finalName directly in the plugin configuration section. It is also useful to
+ ensure that - for example - a List-typed parameter which expects items of type Artifact doesn't get a List
+ full of Strings.
+ ]]></description>
+ </field>
+ <field>
+ <name>implementation</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description></description>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The description of this parameter's use inside the Mojo.</description>
+ </field>
+ <field>
+ <name>since</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>Specify the version when the parameter was added to the API. Similar to Javadoc since.</description>
+ </field>
+ <field>
+ <name>deprecated</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>
+ Specify the version when the parameter 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.
+ </description>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Configuration</name>
+ <version>1.0.0</version>
+ <description>A parameter configuration.</description>
+ <!-- see o.a.m.plugin.descriptor.Parameter -->
+ <fields>
+ <field xml.content="true">
+ <name>expression</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>Parameter expression, to let user override default value with a system property, pom property or settings property.</description>
+ </field>
+ <field xml.attribute="true" xml.tagName="implementation">
+ <name>implementation</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description></description>
+ </field>
+ <field xml.attribute="true" xml.tagName="default-value">
+ <name>defaultValue</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The default value, as an expression that will be evaluated at injection or run-time.</description>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Requirement</name>
+ <version>1.0.0</version>
+ <description>Describes a component requirement.</description>
+ <!-- see o.a.m.plugin.descriptor.Requirement -->
+ <fields>
+ <field>
+ <name>role</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description></description>
+ </field>
+ <field xml.tagName="role-hint">
+ <name>roleHint</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description></description>
+ </field>
+ <field xml.tagName="field-name">
+ <name>fieldName</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The field name which has this requirement.</description>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Dependency</name>
+ <version>1.0.0</version>
+ <description>Definition of a dependency, needed by the plugin at runtime.</description>
+ <fields>
+ <field>
+ <name>groupId</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The group id of the dependency.</description>
+ </field>
+ <field>
+ <name>artifactId</name>
+ <required>true</required>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The artifact id of the dependency.</description>
+ </field>
+ <field>
+ <name>version</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <description>The version of the dependency.</description>
+ </field>
+ <field>
+ <name>type</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ <defaultValue>jar</defaultValue>
+ <description>The type of dependency.</description>
+ </field>
+ </fields>
+ </class>
+ </classes>
+</model>