%global addver v20131031
Name: jetty8
Version: 8.1.14
Release: 1%{?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: maven-assembly-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" ""
for mod in continuation http io jmx security server servlet util webapp xml; do
%pom_xpath_inject pom:modules "jetty-$mod"
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
%doc NOTICE.txt README.txt VERSION.txt LICENSE*
%files javadoc -f .mfiles-javadoc
%doc NOTICE.txt LICENSE*
%changelog
* Mon Jan 27 2014 Mikolaj Izdebski - 8.1.14-1
- Initial packaging