commit 0382c59efd2b3ca96c97db2fc4413de7e1985bdf Author: gil puntogil@libero.it Date: Tue Jul 2 12:54:33 2013 +0200
build with XMvn
apache-commons-chain.spec | 89 ++++++++++++++++++--------------------------- 1 files changed, 35 insertions(+), 54 deletions(-) --- diff --git a/apache-commons-chain.spec b/apache-commons-chain.spec index be5f3b1..7479d60 100644 --- a/apache-commons-chain.spec +++ b/apache-commons-chain.spec @@ -2,53 +2,36 @@ %global short_name commons-%{base_name} Name: apache-commons-chain Version: 1.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: An implementation of the GoF Chain of Responsibility pattern -Group: Development/Libraries License: ASL 2.0 URL: http://commons.apache.org/%%7Bbase_name%7D/ Source0: ftp://ftp.gbnet.net/pub/apache/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz -# replace myfaces-api with jboss-jsf-2.1-api -Patch0: %{name}-%{version}-pom.patch # javax.servlet 3.0 api support -Patch1: %{name}-%{version}-tests-servlet30.patch +Patch0: %{name}-%{version}-tests-servlet30.patch # javax.portlet 2.0 api support -Patch2: %{name}-%{version}-portlet20.patch +Patch1: %{name}-%{version}-portlet20.patch
BuildRequires: java-devel -BuildRequires: jpackage-utils
-BuildRequires: apache-commons-beanutils -BuildRequires: apache-commons-digester -BuildRequires: apache-commons-logging -BuildRequires: jboss-jsf-2.1-api -BuildRequires: portlet-2.0-api -BuildRequires: tomcat-servlet-3.0-api +BuildRequires: mvn(commons-beanutils:commons-beanutils) +BuildRequires: mvn(commons-digester:commons-digester) +BuildRequires: mvn(commons-logging:commons-logging) +BuildRequires: mvn(javax.portlet:portlet-api) +BuildRequires: mvn(org.apache.tomcat:tomcat-servlet-api) +BuildRequires: mvn(org.jboss.spec.javax.faces:jboss-jsf-api_2.1_spec)
# test deps -BuildRequires: junit +BuildRequires: mvn(junit:junit)
+BuildRequires: buildnumber-maven-plugin BuildRequires: maven-local BuildRequires: maven-antrun-plugin -BuildRequires: maven-compiler-plugin -BuildRequires: maven-install-plugin -BuildRequires: maven-jar-plugin -BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-bundle -BuildRequires: maven-resources-plugin +BuildRequires: maven-remote-resources-plugin BuildRequires: maven-site-plugin -BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit
-Requires: apache-commons-beanutils -Requires: apache-commons-digester -Requires: apache-commons-logging -Requires: jboss-jsf-2.1-api -Requires: portlet-2.0-api -Requires: tomcat-servlet-3.0-api - -Requires: java -Requires: jpackage-utils BuildArch: noarch
%description @@ -70,9 +53,7 @@ whether or not processing for the current chain has been completed command in the chain (false).
%package javadoc -Group: Documentation Summary: Javadoc for %{name} -Requires: jpackage-utils
%description javadoc This package contains javadoc for %{name}. @@ -83,41 +64,41 @@ find . -name '*.class' -delete find . -name '*.jar' -delete
perl -pi -e 's/\r$//g;' *.txt -%patch0 -p0 -%patch1 -p1 -%patch2 -p0 -# Failed tests: testDefaut(org.apache.commons.chain.config.ConfigParserTestCase): Correct command count expected:<17> but was:<19> -rm -r src/test/org/apache/commons/chain/config/ConfigParserTestCase.java
-%build +%patch0 -p1 +%patch1 -p0 +# Failed tests: testDefaut(org.apache.commons.chain.config.ConfigParserTestCase): +# Correct command count expected:<17> but was:<19> +rm -r src/test/org/apache/commons/chain/config/ConfigParserTestCase.java
-mvn-rpmbuild -Dmaven.compile.source=1.5 -Dmaven.compile.target=1.5 install javadoc:aggregate +%pom_remove_dep :myfaces-api +%pom_add_dep org.jboss.spec.javax.faces:jboss-jsf-api_2.1_spec +# Force tomcat apis +%pom_remove_dep javax.servlet:servlet-api +%pom_add_dep org.apache.tomcat:tomcat-servlet-api
-%install +%mvn_file :%{short_name} %{name} +%mvn_file :%{short_name} %{short_name}
-mkdir -p %{buildroot}%{_javadir} -install -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar -( cd %{buildroot}%{_javadir} && ln -s %{name}.jar %{short_name}.jar ) +%build
-mkdir -p %{buildroot}%{_mavenpomdir} -install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom -%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar +%mvn_build -- -Dmaven.compile.source=1.5 -Dmaven.compile.target=1.5
-mkdir -p %{buildroot}%{_javadocdir}/%{name} -cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} +%install +%mvn_install
-%files -%{_javadir}/%{name}.jar -%{_javadir}/%{short_name}.jar -%{_mavenpomdir}/JPP-%{short_name}.pom -%{_mavendepmapfragdir}/%{name} +%files -f .mfiles %doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
-%files javadoc -%{_javadocdir}/%{name} +%files javadoc -f .mfiles-javadoc %doc LICENSE.txt NOTICE.txt
%changelog +* Tue Jul 02 2013 gil cattaneo puntogil@libero.it 1.2-7 +- build with XMvn +- swith to pom macros +- minor changes to adapt to current guideline + * Sun Feb 17 2013 gil cattaneo puntogil@libero.it 1.2-6 - added missing BR surefire-provider-junit
java-sig-commits@lists.fedoraproject.org