http-builder/http-builder.spec
2020-03-07 10:12:31 +08:00

81 lines
2.8 KiB
RPMSpec

Name: http-builder
Version: 0.7.2
Release: 6
Summary: Easy HTTP client for Groovy
License: ASL 2.0
URL: https://github.com/jgritman/httpbuilder
Source0: https://github.com/jgritman/httpbuilder/archive/http-builder-%{version}.tar.gz
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
BuildRequires: maven-local mvn(commons-io:commons-io) mvn(junit:junit) mvn(log4j:log4j:1.2.17)
BuildRequires: mvn(net.sf.json-lib:json-lib) mvn(net.sourceforge.nekohtml:nekohtml)
BuildRequires: mvn(oauth.signpost:signpost-core) mvn(org.apache.httpcomponents:httpclient)
BuildRequires: mvn(org.codehaus.gmavenplus:gmavenplus-plugin) mvn(org.codehaus.groovy:groovy)
BuildRequires: mvn(org.codehaus.groovy:groovy-json) mvn(org.codehaus.groovy:groovy-xml) mvn(xerces:xercesImpl)
BuildRequires: mvn(xml-resolver:xml-resolver) mvn(oauth.signpost:signpost-commonshttp4)
BuildArch: noarch
%description
HTTPBuilder exposes convenience methods for common request types,
(i.e. GET and POST) and a more complex request method that allows
fine-grained configuration of each request and response.
%package help
Summary: Help document for http-builder
Provides: http-builder-javadoc = %{version}-%{release}
Obsoletes: http-builder-javadoc < %{version}-%{release}
%description help
Help documentation for http-builder.
%prep
%autosetup -n httpbuilder-http-builder-%{version} -p1
find . -name "*.jar" -exec rm -rf {} \;
find . -name "*.class" -exec rm -rf {} \;
%pom_remove_plugin :cobertura-maven-plugin
%pom_remove_plugin :gmaven-plugin
%pom_add_plugin org.codehaus.gmavenplus:gmavenplus-plugin:1.5 . "
<executions>
<execution>
<goals>
<goal>testGenerateStubs</goal>
</goals>
</execution>
</executions>"
%pom_remove_plugin :maven-assembly-plugin
%pom_remove_plugin :maven-deploy-plugin
%pom_remove_plugin :maven-release-plugin
%pom_remove_plugin :maven-site-plugin
%pom_remove_plugin :maven-surefire-report-plugin
%pom_remove_plugin :maven-javadoc-plugin
%pom_xpath_remove pom:build/pom:extensions
%pom_change_dep log4j: ::1.2.17
%pom_xpath_remove "pom:dependency[pom:artifactId = 'json-lib']/pom:classifier"
%pom_remove_dep :appengine-api-1.0-sdk
rm -r src/main/java/groovyx/net/http/thirdparty \
src/test/groovy/groovyx/net/http/thirdparty
cp -p %{SOURCE1} LICENSE
sed -i 's/\r//' LICENSE
%pom_add_dep org.codehaus.groovy:groovy-xml
%pom_add_dep org.codehaus.groovy:groovy-json
%mvn_file org.codehaus.groovy.modules.http-builder:http-builder http-builder
rm src/test/groovy/groovyx/net/http/HTTPBuilderTest.groovy
rm src/test/groovy/groovyx/net/http/HttpURLClientTest.groovy
%build
%mvn_build
%install
%mvn_install
%files -f .mfiles
%doc README LICENSE
%files help -f .mfiles-javadoc
%doc LICENSE
%changelog
* Tue Mar 3 2020 likexin <likexin4@huawei.com> - 0.7.2-6
- package init