[maven-plugin-tools] Use Maven 3.x APIs

Mikolaj Izdebski mizdebsk at fedoraproject.org
Mon Jan 27 11:18:02 UTC 2014


commit b153c8a76f172fcc658e024b42f7a4b658e87f2a
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date:   Mon Jan 27 11:15:26 2014 +0100

    Use Maven 3.x APIs

 maven-plugin-tools-maven-3.1.1.patch |  244 ++++++++++++++++++++++++++++++++++
 maven-plugin-tools.spec              |   28 +++--
 2 files changed, 262 insertions(+), 10 deletions(-)
---
diff --git a/maven-plugin-tools-maven-3.1.1.patch b/maven-plugin-tools-maven-3.1.1.patch
new file mode 100644
index 0000000..662ba36
--- /dev/null
+++ b/maven-plugin-tools-maven-3.1.1.patch
@@ -0,0 +1,244 @@
+From 84ce30d4677ad55d7b0253a2e67f08fc98795224 Mon Sep 17 00:00:00 2001
+From: Mikolaj Izdebski <mizdebsk at redhat.com>
+Date: Mon, 27 Jan 2014 10:40:41 +0100
+Subject: [PATCH] Update to Maven 3.1.1
+
+---
+ maven-plugin-plugin/pom.xml            | 18 ------------------
+ maven-plugin-tools-annotations/pom.xml |  4 ++--
+ maven-plugin-tools-ant/pom.xml         |  6 +-----
+ maven-plugin-tools-api/pom.xml         |  6 +-----
+ maven-plugin-tools-beanshell/pom.xml   |  8 ++++----
+ maven-plugin-tools-generators/pom.xml  |  8 --------
+ maven-plugin-tools-java/pom.xml        |  6 +-----
+ maven-plugin-tools-model/pom.xml       |  2 +-
+ maven-script/maven-script-ant/pom.xml  |  8 --------
+ pom.xml                                |  9 ++-------
+ 10 files changed, 12 insertions(+), 63 deletions(-)
+
+diff --git a/maven-plugin-plugin/pom.xml b/maven-plugin-plugin/pom.xml
+index 463b6d1..7e064e8 100644
+--- a/maven-plugin-plugin/pom.xml
++++ b/maven-plugin-plugin/pom.xml
+@@ -91,19 +91,6 @@
+       <version>${mavenVersion}</version>
+     </dependency>
+     <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-project</artifactId>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-registry</artifactId>
+-      <version>${mavenVersion}</version>
+-    </dependency>
+-    <dependency>
+       <groupId>org.apache.maven.plugin-tools</groupId>
+       <artifactId>maven-plugin-tools-api</artifactId>
+     </dependency>
+@@ -114,11 +101,6 @@
+ 
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-artifact-manager</artifactId>
+-      <version>${mavenVersion}</version>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+       <artifactId>maven-artifact</artifactId>
+     </dependency>
+ 
+diff --git a/maven-plugin-tools-annotations/pom.xml b/maven-plugin-tools-annotations/pom.xml
+index 792a608..440d73d 100644
+--- a/maven-plugin-tools-annotations/pom.xml
++++ b/maven-plugin-tools-annotations/pom.xml
+@@ -34,7 +34,7 @@
+     <!-- maven -->
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-project</artifactId>
++      <artifactId>maven-core</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+@@ -42,7 +42,7 @@
+     </dependency>
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
++      <artifactId>maven-compat</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.apache.maven.plugin-tools</groupId>
+diff --git a/maven-plugin-tools-ant/pom.xml b/maven-plugin-tools-ant/pom.xml
+index bad49ce..bba4bf5 100644
+--- a/maven-plugin-tools-ant/pom.xml
++++ b/maven-plugin-tools-ant/pom.xml
+@@ -37,11 +37,7 @@
+     <!-- maven -->
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-project</artifactId>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
++      <artifactId>maven-core</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.apache.maven.plugin-tools</groupId>
+diff --git a/maven-plugin-tools-api/pom.xml b/maven-plugin-tools-api/pom.xml
+index 8c76482..4f10e07 100644
+--- a/maven-plugin-tools-api/pom.xml
++++ b/maven-plugin-tools-api/pom.xml
+@@ -37,7 +37,7 @@
+     <!-- maven -->
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-project</artifactId>
++      <artifactId>maven-core</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+@@ -51,10 +51,6 @@
+       <groupId>org.apache.maven</groupId>
+       <artifactId>maven-artifact</artifactId>
+     </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
+-    </dependency>
+ 
+     <!-- plexus -->
+     <dependency>
+diff --git a/maven-plugin-tools-beanshell/pom.xml b/maven-plugin-tools-beanshell/pom.xml
+index 598bb01..bcbb3f8 100644
+--- a/maven-plugin-tools-beanshell/pom.xml
++++ b/maven-plugin-tools-beanshell/pom.xml
+@@ -36,12 +36,12 @@
+   <dependencies>
+     <!-- maven -->
+     <dependency>
+-      <groupId>org.apache.maven.plugin-tools</groupId>
+-      <artifactId>maven-plugin-tools-api</artifactId>
++      <groupId>org.apache.maven</groupId>
++      <artifactId>maven-core</artifactId>
+     </dependency>
+     <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
++      <groupId>org.apache.maven.plugin-tools</groupId>
++      <artifactId>maven-plugin-tools-api</artifactId>
+     </dependency>
+ 
+     <dependency>
+diff --git a/maven-plugin-tools-generators/pom.xml b/maven-plugin-tools-generators/pom.xml
+index fadf80e..499032d 100644
+--- a/maven-plugin-tools-generators/pom.xml
++++ b/maven-plugin-tools-generators/pom.xml
+@@ -42,16 +42,8 @@
+     <!-- maven -->
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-project</artifactId>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+       <artifactId>maven-model</artifactId>
+     </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
+-    </dependency>
+ 
+     <dependency>
+       <groupId>org.apache.maven.reporting</groupId>
+diff --git a/maven-plugin-tools-java/pom.xml b/maven-plugin-tools-java/pom.xml
+index e954e92..8d2faa9 100644
+--- a/maven-plugin-tools-java/pom.xml
++++ b/maven-plugin-tools-java/pom.xml
+@@ -43,17 +43,13 @@
+     <!-- maven -->
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-project</artifactId>
++      <artifactId>maven-core</artifactId>
+     </dependency>
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+       <artifactId>maven-model</artifactId>
+     </dependency>
+     <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
+-    </dependency>
+-    <dependency>
+       <groupId>org.apache.maven.plugin-tools</groupId>
+       <artifactId>maven-plugin-tools-api</artifactId>
+     </dependency>
+diff --git a/maven-plugin-tools-model/pom.xml b/maven-plugin-tools-model/pom.xml
+index 5afb8fb..aa2f81f 100644
+--- a/maven-plugin-tools-model/pom.xml
++++ b/maven-plugin-tools-model/pom.xml
+@@ -37,7 +37,7 @@
+     <!-- maven -->
+     <dependency>
+       <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
++      <artifactId>maven-plugin-api</artifactId>
+     </dependency>
+ 
+     <!-- plexus -->
+diff --git a/maven-script/maven-script-ant/pom.xml b/maven-script/maven-script-ant/pom.xml
+index e11e009..721d547 100644
+--- a/maven-script/maven-script-ant/pom.xml
++++ b/maven-script/maven-script-ant/pom.xml
+@@ -56,14 +56,6 @@ under the License.
+       <artifactId>plexus-container-default</artifactId>
+     </dependency>
+     <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-project</artifactId>
+-    </dependency>
+-    <dependency>
+-      <groupId>org.apache.maven</groupId>
+-      <artifactId>maven-plugin-descriptor</artifactId>
+-    </dependency>
+-    <dependency>
+       <groupId>org.codehaus.plexus</groupId>
+       <artifactId>plexus-archiver</artifactId>
+       <version>1.0-alpha-11</version>
+diff --git a/pom.xml b/pom.xml
+index 58444cb..8374848 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -160,7 +160,7 @@
+ 
+   <properties>
+     <pluginTestingHarnessVersion>1.2</pluginTestingHarnessVersion>
+-    <mavenVersion>2.2.1</mavenVersion>
++    <mavenVersion>3.1.1</mavenVersion>
+     <antVersion>1.7.1</antVersion>
+     <mavenInvokerPluginVersion>1.6</mavenInvokerPluginVersion>
+   </properties>
+@@ -210,12 +210,7 @@
+       </dependency>
+       <dependency>
+         <groupId>org.apache.maven</groupId>
+-        <artifactId>maven-project</artifactId>
+-        <version>${mavenVersion}</version>
+-      </dependency>
+-      <dependency>
+-        <groupId>org.apache.maven</groupId>
+-        <artifactId>maven-plugin-descriptor</artifactId>
++        <artifactId>maven-compat</artifactId>
+         <version>${mavenVersion}</version>
+       </dependency>
+       <dependency>
+-- 
+1.8.4.2
+
diff --git a/maven-plugin-tools.spec b/maven-plugin-tools.spec
index fb90165..97569e9 100644
--- a/maven-plugin-tools.spec
+++ b/maven-plugin-tools.spec
@@ -1,6 +1,6 @@
 Name:           maven-plugin-tools
 Version:        3.1
-Release:        17%{?dist}
+Release:        18%{?dist}
 Epoch:          0
 Summary:        Maven Plugin Tools
 
@@ -12,35 +12,39 @@ BuildArch:      noarch
 # Fix NullPointerException in MojoClassVisitor.visit()
 # See: rhbz#920042, http://jira.codehaus.org/browse/MPLUGIN-242
 Patch0:         %{name}-rhbz-920042.patch
+# Use Maven 3.1.1 APIs
+Patch1:         %{name}-maven-3.1.1.patch
 
 BuildRequires:  maven-local
 BuildRequires:  mvn(asm:asm)
 BuildRequires:  mvn(asm:asm-commons)
 BuildRequires:  mvn(bsh:bsh)
+BuildRequires:  mvn(com.sun:tools)
 BuildRequires:  mvn(com.thoughtworks.qdox:qdox)
 BuildRequires:  mvn(net.sf.jtidy:jtidy)
-BuildRequires:  mvn(org.apache:apache-jar-resource-bundle)
 BuildRequires:  mvn(org.apache.ant:ant)
 BuildRequires:  mvn(org.apache.ant:ant-launcher)
 BuildRequires:  mvn(org.apache.maven.doxia:doxia-sink-api)
 BuildRequires:  mvn(org.apache.maven.doxia:doxia-site-renderer)
-BuildRequires:  mvn(org.apache.maven.reporting:maven-reporting-api)
-BuildRequires:  mvn(org.apache.maven.reporting:maven-reporting-impl)
 BuildRequires:  mvn(org.apache.maven:maven-artifact)
-BuildRequires:  mvn(org.apache.maven:maven-artifact-manager)
+BuildRequires:  mvn(org.apache.maven:maven-compat)
 BuildRequires:  mvn(org.apache.maven:maven-core)
 BuildRequires:  mvn(org.apache.maven:maven-model)
 BuildRequires:  mvn(org.apache.maven:maven-parent)
 BuildRequires:  mvn(org.apache.maven:maven-plugin-api)
-BuildRequires:  mvn(org.apache.maven:maven-plugin-descriptor)
-BuildRequires:  mvn(org.apache.maven:maven-plugin-registry)
-BuildRequires:  mvn(org.apache.maven:maven-project)
 BuildRequires:  mvn(org.apache.maven:maven-repository-metadata)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-enforcer-plugin)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-plugin-plugin)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
+BuildRequires:  mvn(org.apache.maven.reporting:maven-reporting-api)
+BuildRequires:  mvn(org.apache.maven.reporting:maven-reporting-impl)
 BuildRequires:  mvn(org.apache.velocity:velocity)
+BuildRequires:  mvn(org.codehaus.modello:modello-maven-plugin)
 BuildRequires:  mvn(org.codehaus.plexus:plexus-ant-factory)
 BuildRequires:  mvn(org.codehaus.plexus:plexus-archiver)
 BuildRequires:  mvn(org.codehaus.plexus:plexus-bsh-factory)
 BuildRequires:  mvn(org.codehaus.plexus:plexus-component-annotations)
+BuildRequires:  mvn(org.codehaus.plexus:plexus-component-metadata)
 BuildRequires:  mvn(org.codehaus.plexus:plexus-container-default)
 BuildRequires:  mvn(org.codehaus.plexus:plexus-utils)
 BuildRequires:  mvn(org.codehaus.plexus:plexus-velocity)
@@ -170,6 +174,7 @@ API documentation for %{name}.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 # For easier installation
 ln -s maven-script/maven-script-{ant,beanshell} .
@@ -183,7 +188,7 @@ ln -s maven-script/maven-script-{ant,beanshell} .
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>"
 
 # Remove test dependencies because tests are skipped anyways.
-%pom_xpath_remove "pom:dependency[pom:scope[text()='test']]"
+%pom_xpath_remove "pom:dependency[pom:scope='test']"
 
 %build
 %mvn_build -s -f
@@ -223,10 +228,13 @@ ln -s maven-script/maven-script-{ant,beanshell} .
 %files -n maven-script-beanshell -f .mfiles-maven-script-beanshell
 
 %files javadocs -f .mfiles-javadoc
- %doc LICENSE NOTICE
+%doc LICENSE NOTICE
 
 
 %changelog
+* Mon Jan 27 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 0:3.1-18
+- Use Maven 3.x APIs
+
 * Fri Jan 10 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 0:3.1-17
 - Remove explicit requires
 - Resolves: rhbz#1051527


More information about the scm-commits mailing list