Blob Blame History Raw
# jetty8 is a compat package and as such it shouldn't have any OSGi provides
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^osgi\\(

%global addver v20131031

Name:           jetty8
Version:        8.1.14
Release:        8%{?dist}
Summary:        Java Webserver and Servlet Container
# Jetty is dual licensed under both ASL 2.0 and EPL 1.0, see NOTICE.txt
# some MIT-licensed code (from Utf8Appendable) is used too
License:        (ASL 2.0 or EPL) and MIT
URL:            http://www.eclipse.org/jetty/
BuildArch:      noarch

Source0:        http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/snapshot/jetty-%{version}.%{addver}.tar.bz2

BuildRequires:  maven-local
BuildRequires:  jetty-artifact-remote-resources
BuildRequires:  jetty-assembly-descriptors
BuildRequires:  jetty-build-support
BuildRequires:  jetty-version-maven-plugin
BuildRequires:  jetty-test-policy
BuildRequires:  jetty-parent
BuildRequires:  maven-assembly-plugin
BuildRequires:  maven-dependency-plugin
BuildRequires:  maven-enforcer-plugin
BuildRequires:  maven-license-plugin
BuildRequires:  maven-plugin-build-helper
BuildRequires:  maven-plugin-bundle
BuildRequires:  maven-release-plugin
BuildRequires:  maven-remote-resources-plugin
BuildRequires:  maven-source-plugin
BuildRequires:  slf4j
BuildRequires:  tomcat-servlet-3.0-api

%description
Jetty is a 100% Java HTTP Server and Servlet Container. This means that you
do not need to configure and run a separate web server (like Apache) in order
to use Java, servlets and JSPs to generate dynamic content. Jetty is a fully
featured web server for static and dynamic content. Unlike separate
server/container solutions, this means that your web server and web
application run in the same process, without interconnection overheads
and complications. Furthermore, as a pure java component, Jetty can be simply
included in your application for demonstration, distribution or deployment.
Jetty is available on all Java supported platforms.

%package        javadoc
Summary:        API documentation for %{name}

%description    javadoc
This package provides %{summary}.

%prep
%setup -q -n jetty-%{version}.%{addver}
find -name "*.jar" -delete
find -name "*.war" -delete
find -name "*.class" -delete

%mvn_compat_version : 8.1.14.v20131031

# Disable unneeded modules. This is a compat package and only a
# minimal set of modules are being built.
%pom_xpath_remove "pom:modules"
%pom_xpath_inject "pom:project" "<modules/>"
for mod in continuation http io jmx security server servlet util webapp websocket xml client rewrite; do
  %pom_xpath_inject pom:modules "<module>jetty-$mod</module>"
done

# PMD plugin is not useful in Fedora.
%pom_remove_plugin :maven-pmd-plugin

# this needs jetty6 things, so just remove it
# shouldn't cause any trouble since it handled only in loadClass elsewhere
%pom_remove_dep org.mortbay.jetty:jetty-util jetty-continuation
rm jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Jetty6Continuation.java

iconv -f iso-8859-1 -t utf-8 LICENSE-CONTRIBUTOR/CDDLv1.0.txt > \
      LICENSE-CONTRIBUTOR/CDDLv1.0.txt.con
mv LICENSE-CONTRIBUTOR/CDDLv1.0.txt{.con,}

%build
# Tests disabled because of missing dependencies
%mvn_build -f

%install
%mvn_install

%files -f .mfiles
%{_javadir}/%{name}
%doc NOTICE.txt README.txt VERSION.txt LICENSE*

%files javadoc -f .mfiles-javadoc
%doc NOTICE.txt LICENSE*

%changelog
* Mon Jul 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 8.1.14-8
- Don't generate OSGi provides
- Resolves: rhbz#1079675

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Jun 03 2014 Timothy St. Clair <tstclair@redhat.com> - 8.1.14-6
- Rebuild for metadata change from xmvn

* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 8.1.14-5
- Use Requires: java-headless rebuild (#1067528)

* Tue Feb 4 2014 Peter MacKinnon <pmackinn@redhat.com> - 8.1.14-4
- Add maven-dependency-plugin, jetty-test-policy deps

* Tue Feb 4 2014 Peter MacKinnon <pmackinn@redhat.com> - 8.1.14-3
- Enable rewrite, client modules

* Fri Jan 31 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 8.1.14-2
- Enable websocket module

* Mon Jan 27 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 8.1.14-1
- Initial packaging