[java-sig-commits] [maven-checkstyle-plugin] Updated to 2.7 + Guidelines fixes

Stanislav Ochotnicky sochotni at fedoraproject.org
Tue Sep 20 14:14:28 UTC 2011


commit 340d2c6142548ee788a0990cc510996a9c15628a
Author: Tomas Radej <tradej at redhat.com>
Date:   Tue Sep 20 16:07:05 2011 +0200

    Updated to 2.7 + Guidelines fixes

 .gitignore                                   |    5 +++
 maven-checkstyle-plugin-maven-core-dep.patch |   16 ++++++++++
 maven-checkstyle-plugin.spec                 |   39 +++++++++++++------------
 sources                                      |    2 +-
 4 files changed, 42 insertions(+), 20 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 66e6512..6272e08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,7 @@
 maven-checkstyle-plugin-2.5-source-release.zip
 /maven-checkstyle-plugin-2.6-source-release.zip
+maven-checkstyle-plugin-2.7-source-release.zip
+/noarch
+/maven-checkstyle-plugin-2.7
+/maven-checkstyle-plugin-2.7-1.fc17.src.rpm
+/maven-checkstyle-plugin-2_7-1_fc17
diff --git a/maven-checkstyle-plugin-maven-core-dep.patch b/maven-checkstyle-plugin-maven-core-dep.patch
new file mode 100644
index 0000000..a5a38c3
--- /dev/null
+++ b/maven-checkstyle-plugin-maven-core-dep.patch
@@ -0,0 +1,16 @@
+diff --git a/pom.xml b/pom.xml
+index 1064dfc..2f5be46 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -69,6 +69,11 @@ under the License.
+     <!-- maven -->
+     <dependency>
+       <groupId>org.apache.maven</groupId>
++      <artifactId>maven-core</artifactId>
++      <version>${mavenVersion}</version>
++    </dependency>
++    <dependency>
++      <groupId>org.apache.maven</groupId>
+       <artifactId>maven-artifact</artifactId>
+       <version>${mavenVersion}</version>
+     </dependency>
diff --git a/maven-checkstyle-plugin.spec b/maven-checkstyle-plugin.spec
index 74fd018..413a354 100644
--- a/maven-checkstyle-plugin.spec
+++ b/maven-checkstyle-plugin.spec
@@ -1,6 +1,6 @@
 Name:             maven-checkstyle-plugin
-Version:          2.6
-Release:          5%{?dist}
+Version:          2.7
+Release:          1%{?dist}
 Summary:          Plugin that generates a report regarding the code style used by the developers
 Group:            Development/Libraries
 License:          ASL 2.0
@@ -8,6 +8,8 @@ URL:              http://maven.apache.org/plugins/%{name}
 
 Source0:          http://repo2.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
 
+Patch0:           %{name}-maven-core-dep.patch
+
 BuildArch:        noarch
 
 BuildRequires:    java-devel >= 1:1.6.0
@@ -19,10 +21,14 @@ BuildRequires:    maven-javadoc-plugin
 BuildRequires:    maven-resources-plugin
 BuildRequires:    maven-compiler-plugin >= 2.0.2
 BuildRequires:    maven-surefire-plugin
+BuildRequires:    maven-surefire-provider-junit
+BuildRequires:    maven-surefire-provider-junit4
 BuildRequires:    maven-jar-plugin >= 2.2
 BuildRequires:    maven-install-plugin >= 2.2
 BuildRequires:    checkstyle >= 5.0
 BuildRequires:    plexus-cli >= 1.2
+BuildRequires:    maven-artifact-manager 
+BuildRequires:    plexus-resources
 
 Requires:         maven
 Requires:         maven-shared-reporting-impl >= 2.0.4.3
@@ -41,8 +47,6 @@ Requires:         maven-plugin-testing-harness >= 1.2
 
 Requires:         java >= 1:1.6.0
 Requires:         jpackage-utils
-Requires(post):   jpackage-utils
-Requires(postun): jpackage-utils
 
 Provides:         maven2-plugin-checkstyle = %{version}-%{release}
 Obsoletes:        maven2-plugin-checkstyle <= 0:2.0.8
@@ -61,13 +65,13 @@ This package contains the API documentation for %{name}.
 
 %prep
 %setup -q
+%patch0 -p1
 #adapt to upstream checkstyle groupId
 sed -i -e "s|<groupId>checkstyle|<groupId>com.puppycrawl.tools|g" pom.xml
 
 %build
-mvn-rpmbuild \
-        -Dmaven.test.failure.ignore=true \
-        install javadoc:javadoc
+# During testing, component descriptors can't be found. 
+mvn-rpmbuild install javadoc:aggregate -Dmaven.test.failure.ignore
 
 %install
 # jars
@@ -77,31 +81,28 @@ install -pm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.ja
 # pom
 install -d -m 755 %{buildroot}%{_mavenpomdir}
 install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-%add_to_maven_depmap org.apache.maven.plugins %{name} %{version} JPP %{name}
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
 
 # javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
-ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
-
-%post
-%update_maven_depmap
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
 
-%postun
-%update_maven_depmap
 
 %files
 %doc LICENSE
 %{_javadir}/*
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
 
 %files javadoc
 %doc LICENSE
-%{_javadocdir}/%{name}-%{version}
 %{_javadocdir}/%{name}
 
 %changelog
+* Thu Sep 15 2011 Tomas Radej <tradej at redhat.com> - 2.7-1
+- Updated to 2.7
+- Guideline fixes
+
 * Thu Jun 9 2011 Alexander Kurtakov <akurtako at redhat.com> 2.6-5
 - Fix checkstyle groupId.
 
diff --git a/sources b/sources
index 1754d95..84772d0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b6c8cb3a574029b4eaa2d0f24df7d2ba  maven-checkstyle-plugin-2.6-source-release.zip
+56a4e7c1b5b68280bf9b8f02e11443b9  maven-checkstyle-plugin-2.7-source-release.zip


More information about the java-sig-commits mailing list