[java-sig-commits] [maven-pmd-plugin] Fix pmd artifactId

Alexander Kurtakov akurtakov at fedoraproject.org
Wed Jul 6 07:08:08 UTC 2011


commit 687222293a9277f60cf11f70c928549b49bfc951
Author: Alexander Kurtakov <akurtako at redhat.com>
Date:   Wed Jul 6 09:53:39 2011 +0300

    Fix pmd artifactId

 .gitignore                    |    2 +
 0001-fix-pmd-artifactId.patch |   25 +++++++++
 maven-pmd-plugin.spec         |  116 +++++++++++++++++++++++++++++++++++++++++
 sources                       |    2 +
 4 files changed, 145 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6477378
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+maven-pmd-plugin-2.5.tar.xz
+/maven-pmd-plugin-2.5-source-release.zip
diff --git a/0001-fix-pmd-artifactId.patch b/0001-fix-pmd-artifactId.patch
new file mode 100644
index 0000000..e713554
--- /dev/null
+++ b/0001-fix-pmd-artifactId.patch
@@ -0,0 +1,25 @@
+From 6bd5e96253420b8db59d03aad61466cbfa77a54f Mon Sep 17 00:00:00 2001
+From: Felix Kaechele <heffer at fedoraproject.org>
+Date: Thu, 30 Jun 2011 21:14:47 +0200
+Subject: [PATCH] fix pmd artifactId
+
+---
+ pom.xml |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index b87f488..1a46b4a 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -126,7 +126,7 @@ under the License.
+     <!-- pmd -->
+     <dependency>
+       <groupId>pmd</groupId>
+-      <artifactId>pmd-jdk14</artifactId>
++      <artifactId>pmd</artifactId>
+       <version>4.2.5</version>
+     </dependency>
+ 
+-- 
+1.7.5.4
+
diff --git a/maven-pmd-plugin.spec b/maven-pmd-plugin.spec
new file mode 100644
index 0000000..21589b2
--- /dev/null
+++ b/maven-pmd-plugin.spec
@@ -0,0 +1,116 @@
+Name:           maven-pmd-plugin
+Version:        2.5
+Release:        4%{?dist}
+Summary:        Maven PMD Plugin
+
+Group:          Development/Libraries
+License:        ASL 2.0
+URL:            http://maven.apache.org/plugins/maven-pmd-plugin/
+Source0:        http://repo2.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
+Source1:        maven-pmd-plugin-depmap.xml
+Patch0:         0001-fix-pmd-artifactId.patch
+
+BuildArch: noarch
+
+BuildRequires: pmd
+BuildRequires: java-devel >= 1:1.6.0
+BuildRequires: maven
+BuildRequires: maven-plugin-plugin
+BuildRequires: maven-jar-plugin
+BuildRequires: maven-install-plugin
+BuildRequires: maven-resources-plugin
+BuildRequires: maven-compiler-plugin
+BuildRequires: maven-javadoc-plugin
+BuildRequires: maven-surefire-maven-plugin
+BuildRequires: maven-surefire-provider-junit4
+BuildRequires: maven-doxia-sitetools
+BuildRequires: maven-plugin-testing-harness
+BuildRequires: maven-archiver
+BuildRequires: plexus-archiver
+BuildRequires: apache-commons-lang
+BuildRequires: plexus-resources
+BuildRequires: plexus-utils
+BuildRequires: junit
+Requires: maven
+Requires: plexus-utils
+Requires: maven-plugin-testing-harness
+Requires: pmd
+Requires: junit
+Requires:       jpackage-utils
+Requires:       java
+Requires(post):       jpackage-utils
+Requires(postun):     jpackage-utils
+
+Provides:       maven2-plugin-pmd = %{version}-%{release}
+Obsoletes:      maven2-plugin-pmd <= 0:2.0.8
+
+%description
+A Maven plugin for the PMD toolkit, that produces a report on both code rule 
+violations and detected copy and paste fragments, as well as being able to 
+fail the build based on these metrics.
+  
+
+%package javadoc
+Group:          Documentation
+Summary:        Javadoc for %{name}
+Requires:       jpackage-utils
+
+%description javadoc
+API documentation for %{name}.
+
+
+%prep
+%setup -q 
+%patch0 -p1
+
+%build
+mvn-rpmbuild \
+        -Dmaven.local.depmap.file=%{SOURCE1} \
+        -Dmaven.test.failure.ignore=true \
+        install javadoc:javadoc
+
+%install
+# jars
+install -d -m 0755 %{buildroot}%{_javadir}
+install -m 644 target/%{name}-%{version}.jar   %{buildroot}%{_javadir}/%{name}.jar
+
+%add_to_maven_depmap org.apache.maven.plugins maven-pmd-plugin %{version} JPP maven-pmd-plugin
+
+# poms
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml \
+    %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+
+# javadoc
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
+
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+
+%files
+%defattr(-,root,root,-)
+%{_javadir}/*
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
+
+%files javadoc
+%defattr(-,root,root,-)
+%{_javadocdir}/%{name}
+
+%changelog
+* Thu Jun 30 2011 Felix Kaechele <heffer at fedoraproject.org> - 2.5-4
+- added patch to fix pmd artifactId in pom.xml
+
+* Tue Apr 26 2011 Alexander Kurtakov <akurtako at redhat.com> 2.5-3
+- Update to current guidelines.
+- Use upstream source.
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat May 15 2010 Alexander Kurtakov <akurtako at redhat.com> 2.5-1
+- Initial package.
diff --git a/sources b/sources
new file mode 100644
index 0000000..e1da7e4
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+ce2441d333284be879fb8efeb56bc5fa  maven-pmd-plugin-2.5.tar.xz
+8af1a9a23b126a982a42105341d579e0  maven-pmd-plugin-2.5-source-release.zip


More information about the java-sig-commits mailing list