[maven-jxr] Build with XMvn

Michal Srb msrb at fedoraproject.org
Tue Jul 23 07:39:12 UTC 2013


commit a0bfb9e0b5c28a2f8a5446574f22c926bad158a9
Author: Michal Srb <msrb at redhat.com>
Date:   Tue Jul 23 09:33:20 2013 +0200

    Build with XMvn
    
    - Add BSD license text
    - Drop group tag
    - Replace patch with %pom_ macro
    - Fix BR

 LICENSE-BSD       |   29 +++++++++++++
 add-oro-dep.patch |   13 ------
 maven-jxr.spec    |  120 ++++++++++++++++++----------------------------------
 3 files changed, 71 insertions(+), 91 deletions(-)
---
diff --git a/LICENSE-BSD b/LICENSE-BSD
new file mode 100644
index 0000000..ed8c21c
--- /dev/null
+++ b/LICENSE-BSD
@@ -0,0 +1,29 @@
+
+CodeViewer.java
+CoolServlets.com
+March 2000
+
+Copyright (C) 2000 CoolServlets.com
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1) Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+2) Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+3) Neither the name CoolServlets.com nor the names of its contributors may be
+  used to endorse or promote products derived from this software without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY COOLSERVLETS.COM AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL COOLSERVLETS.COM OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/maven-jxr.spec b/maven-jxr.spec
index 6684cf6..8908602 100644
--- a/maven-jxr.spec
+++ b/maven-jxr.spec
@@ -30,60 +30,48 @@
 
 Name:           maven-jxr
 Version:        2.3
-Release:        7%{?dist}
+Release:        8%{?dist}
 Epoch:          0
 Summary:        Source cross referencing tool
 # BSD: maven-jxr/src/main/java/org/apache/maven/jxr/JavaCodeTransform.java
 License:        ASL 2.0 and BSD
-Group:          Development/Tools
 URL:            http://maven.apache.org/doxia/
 
 Source0:        http://repo2.maven.org/maven2/org/apache/maven/jxr/jxr/%{version}/jxr-%{version}-source-release.zip
-Patch0:         add-oro-dep.patch
+# taken from maven-jxr/src/main/java/org/apache/maven/jxr/JavaCodeTransform.java
+Source1:        LICENSE-BSD
 
 BuildArch:      noarch
 
-BuildRequires:  jpackage-utils >= 0:1.7.2
 BuildRequires:  maven-local
-BuildRequires:  maven-resources-plugin
-BuildRequires:  maven-compiler-plugin
-BuildRequires:  maven-resources-plugin
-BuildRequires:  maven-compiler-plugin
-BuildRequires:  maven-surefire-plugin
-BuildRequires:  maven-jar-plugin
-BuildRequires:  maven-install-plugin
-BuildRequires:  maven-javadoc-plugin
-BuildRequires:  maven-site-plugin
-BuildRequires:  maven-plugin-plugin
-BuildRequires:  maven-doxia-sitetools
-BuildRequires:  maven-surefire-provider-junit4
-BuildRequires:  maven-plugin-testing-harness
-BuildRequires:  junit >= 3.8.2
-BuildRequires:  apache-commons-collections >= 3.1
-BuildRequires:  jakarta-oro >= 2.0.8
-BuildRequires:  plexus-utils >= 1.2
-BuildRequires:  velocity >= 1.4
-
-Requires:       junit >= 3.8.2
-Requires:       apache-commons-collections >= 3.1
-Requires:       jakarta-oro >= 2.0.8
-Requires:       plexus-utils >= 1.2
-Requires:       velocity >= 1.4
+BuildRequires:  mvn(commons-io:commons-io)
+BuildRequires:  mvn(commons-lang:commons-lang)
+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.wagon:wagon-provider-api)
+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-project)
+BuildRequires:  mvn(org.apache.velocity:velocity)
+BuildRequires:  mvn(org.codehaus.plexus:plexus-utils)
+BuildRequires:  mvn(oro:oro)
+BuildRequires:  mvn(xalan:xalan)
+BuildRequires:  mvn(xml-apis:xml-apis)
 
 %description
 Maven JXR is a source cross referencing tool.
 
 %package javadoc
 Summary:        Javadoc for %{name}
-Group:          Documentation
-Requires:       jpackage-utils
 
 %description javadoc
 API documentation for %{name}.
 
 %package -n maven-plugin-jxr
 Summary:        Maven plugin for JXR
-Group:          Development/Tools
 Requires:       %{name} = %{version}-%{release}
 
 %description -n maven-plugin-jxr
@@ -91,7 +79,14 @@ Maven plugin for JXR.
 
 %prep
 %setup -q -n jxr-%{version}
-%patch0
+
+cp %{SOURCE1} .
+
+# Missing dependency
+%pom_add_dep oro:oro maven-jxr
+
+%mvn_package :maven-jxr-plugin maven-plugin-jxr
+
 # maven-core has scope "provided" in Plugin Testing Harness, so we
 # need to provide it or tests will fail to compile.  This works for
 # upstream because upstream uses a different version of Plugin Testing
@@ -100,64 +95,33 @@ Maven plugin for JXR.
 %pom_add_dep org.apache.maven:maven-core::test
 
 %build
-
 # The test failures seem to have something to do with:
 # http://jira.codehaus.org/browse/MCHANGES-88
 # We can investigate when we upgrade to 2.2.x to see if they still occur.
 # Update: Seems that tests fail because they are trying to access
 # plexus component descriptors which seem to be different?
-mvn-rpmbuild \
-        -Dmaven.test.failure.ignore=true \
-        install javadoc:aggregate
+%mvn_build -f
 
 %install
-# jars/poms
-install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
-install -d -m 755 $RPM_BUILD_ROOT/%{_mavenpomdir}
-
-install -pm 644 maven-jxr/target/%{name}-%{version}.jar \
-                $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-%add_to_maven_depmap org.apache.maven.jxr jxr %{version} JPP %{name}-parent
-%add_to_maven_depmap org.apache.maven maven-jxr %{version} JPP %{name}
-
-install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}-parent.pom
-install -pm 644 maven-jxr/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
+%mvn_install
 
-# maven-jxr plugin
-%add_to_maven_depmap org.apache.maven.plugins maven-jxr-plugin %{version} JPP maven-plugin-jxr
-install -pm 644 maven-jxr-plugin/target/maven-jxr-plugin-%{version}.jar \
-                $RPM_BUILD_ROOT%{_javadir}/maven-plugin-jxr.jar
+%files -f .mfiles
+%dir %{_javadir}/%{name}
+%doc LICENSE LICENSE-BSD NOTICE
 
-install -pm 644 maven-jxr-plugin/pom.xml \
-        $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-maven-plugin-jxr.pom
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE LICENSE-BSD NOTICE
 
-# javadoc
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-
-cp -pr target/site/apidocs/* \
-                $RPM_BUILD_ROOT%{_javadocdir}/%{name}/
-
-%pre javadoc
-# workaround for rpm bug, can be removed in F-17
-[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
-rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
-
-%files
-%doc LICENSE NOTICE
-%{_javadir}/%{name}*.jar
-%{_mavenpomdir}/JPP-%{name}-parent.pom
-%{_mavenpomdir}/JPP-%{name}.pom
-%{_mavendepmapfragdir}/%{name}
-
-%files javadoc
-%doc LICENSE NOTICE
-%doc %{_javadocdir}/*
-
-%files -n maven-plugin-jxr
-%{_mavenpomdir}/JPP-maven-plugin-jxr.pom
-%{_javadir}/maven-plugin-jxr*.jar
+%files -n maven-plugin-jxr -f .mfiles-maven-plugin-jxr
 
 %changelog
+* Tue Jul 23 2013 Michal Srb <msrb at redhat.com> - 0:2.3-8
+- Build with XMvn
+- Add BSD license text
+- Drop group tag
+- Replace patch with %%pom_ macro
+- Fix BR
+
 * Mon Mar 11 2013 Mikolaj Izdebski <mizdebsk at redhat.com> - 0:2.3-7
 - Add maven-core to test dependencies
 - Resolves: rhbz#914171


More information about the scm-commits mailing list