summaryrefslogtreecommitdiff
path: root/rules/maven-plugin-api-bootstrap/no-generated-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'rules/maven-plugin-api-bootstrap/no-generated-code.patch')
-rw-r--r--rules/maven-plugin-api-bootstrap/no-generated-code.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/rules/maven-plugin-api-bootstrap/no-generated-code.patch b/rules/maven-plugin-api-bootstrap/no-generated-code.patch
new file mode 100644
index 0000000..8d97c08
--- /dev/null
+++ b/rules/maven-plugin-api-bootstrap/no-generated-code.patch
@@ -0,0 +1,81 @@
+diff -ru maven-plugin-api-bootstrap.orig/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java maven-plugin-api-bootstrap/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
+--- maven-plugin-api-bootstrap.orig/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java 2014-02-14 12:34:53.000000000 -0500
++++ maven-plugin-api-bootstrap/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java 2014-05-30 17:11:56.686594113 -0400
+@@ -34,10 +34,6 @@
+
+ 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;
+@@ -81,12 +77,8 @@
+
+ private String requiredMavenVersion;
+
+- private Plugin plugin;
+-
+ private Artifact pluginArtifact;
+
+- private Map<String, Lifecycle> lifecycleMappings;
+-
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+@@ -350,16 +342,6 @@
+ return requiredMavenVersion;
+ }
+
+- public void setPlugin( Plugin plugin )
+- {
+- this.plugin = plugin;
+- }
+-
+- public Plugin getPlugin()
+- {
+- return plugin;
+- }
+-
+ public Artifact getPluginArtifact()
+ {
+ return pluginArtifact;
+@@ -370,36 +352,6 @@
+ 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
+ {