From 9a3ea0b8863014b5e9868138e6becb484cb80928 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 6 Feb 2020 11:48:16 -0500 Subject: [PATCH] import jetty-9.4.19-1.v20190610.module+el8.1.1+4657+f90e8085 --- .gitignore | 1 + .jetty.metadata | 1 + SOURCES/0001-Fedora-jetty.home.patch | 26 + SOURCES/LICENSE-MIT | 10 + SOURCES/jetty.logrotate | 7 + SOURCES/jetty.service | 18 + SOURCES/jetty.sh | 135 +++ SPECS/jetty.spec | 1670 ++++++++++++++++++++++++++ 8 files changed, 1868 insertions(+) create mode 100644 .gitignore create mode 100644 .jetty.metadata create mode 100644 SOURCES/0001-Fedora-jetty.home.patch create mode 100644 SOURCES/LICENSE-MIT create mode 100644 SOURCES/jetty.logrotate create mode 100644 SOURCES/jetty.service create mode 100644 SOURCES/jetty.sh create mode 100644 SPECS/jetty.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85b4868 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/jetty-9.4.19.v20190610.tar.gz diff --git a/.jetty.metadata b/.jetty.metadata new file mode 100644 index 0000000..8b24a0c --- /dev/null +++ b/.jetty.metadata @@ -0,0 +1 @@ +4dd985caa797f18938d1a3def31bf82bfdb8d961 SOURCES/jetty-9.4.19.v20190610.tar.gz diff --git a/SOURCES/0001-Fedora-jetty.home.patch b/SOURCES/0001-Fedora-jetty.home.patch new file mode 100644 index 0000000..90b4743 --- /dev/null +++ b/SOURCES/0001-Fedora-jetty.home.patch @@ -0,0 +1,26 @@ +From 46f7ec33b83c28459496739f4d8b91329fb82bc6 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Tue, 2 Jun 2015 22:52:21 +0200 +Subject: [PATCH 1/2] Fedora jetty.home + +--- + .../eclipse/jetty/start/config/CommandLineConfigSource.java | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java b/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java +index f0c9e07..7d2ee3e 100644 +--- a/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java ++++ b/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java +@@ -120,6 +120,9 @@ public class CommandLineConfigSource implements ConfigSource + try + { + Path home = new File(new URI(m.group(1))).getParentFile().toPath(); ++ if (home.endsWith("/usr/share/java/jetty")) ++ home = new File(home.toString().replaceAll("java/jetty$", "jetty")).toPath(); ++ + setProperty(BaseHome.JETTY_HOME,home.toString(),ORIGIN_INTERNAL_FALLBACK); + return home; + } +-- +2.19.1 + diff --git a/SOURCES/LICENSE-MIT b/SOURCES/LICENSE-MIT new file mode 100644 index 0000000..30a4628 --- /dev/null +++ b/SOURCES/LICENSE-MIT @@ -0,0 +1,10 @@ +Copyright (c) 2008-2009 Bjoern Hoehrmann +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/SOURCES/jetty.logrotate b/SOURCES/jetty.logrotate new file mode 100644 index 0000000..9d98d0b --- /dev/null +++ b/SOURCES/jetty.logrotate @@ -0,0 +1,7 @@ +/var/log/jetty/jetty-console.log { + copytruncate + weekly + rotate 52 + compress + missingok +} diff --git a/SOURCES/jetty.service b/SOURCES/jetty.service new file mode 100644 index 0000000..ae69ebf --- /dev/null +++ b/SOURCES/jetty.service @@ -0,0 +1,18 @@ +# Systemd unit file for jetty +# +# Multiple copies of this service (i.e. multiple concurrently running +# jetty servers) are not supported right now. Expect this to come with +# future updates + +[Unit] +Description=Jetty Web Application Server +After=syslog.target network.target + +[Service] +Type=simple +ExecStart=/usr/share/jetty/bin/jetty.sh +User=jetty +Group=jetty + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/jetty.sh b/SOURCES/jetty.sh new file mode 100644 index 0000000..b69084b --- /dev/null +++ b/SOURCES/jetty.sh @@ -0,0 +1,135 @@ +#!/usr/bin/env bash +# Configuration files +# +# /etc/default/jetty +# If it exists, this is read at the start of script. It may perform any +# sequence of shell commands, like setting relevant environment variables. +# +# /etc/jetty.conf +# If found, and no configurations were given on the command line, +# the file will be used as this script's configuration. +# Each line in the file may contain: +# - A comment denoted by the pound (#) sign as first non-blank character. +# - The path to a regular file, which will be passed to jetty as a +# config.xml file. +# - The path to a directory. Each *.xml file in the directory will be +# passed to jetty as a config.xml file. +# - All other lines will be passed, as-is to the start.jar +# +# The files will be checked for existence before being passed to jetty. +# +# Configuration variables +# +# JAVA +# Command to invoke Java. If not set, java (from the PATH) will be used. +# +# JAVA_OPTIONS +# Extra options to pass to the JVM +# +# JETTY_HOME +# Where Jetty is installed. If not set, the script will try go +# guess it by first looking at the invocation path for the script, +# and then by looking in standard locations as $HOME/opt/jetty +# and /opt/jetty. The java system property "jetty.home" will be +# set to this value for use by configure.xml files, f.e.: +# +# /webapps/jetty.war +# +# JETTY_BASE +# Where your Jetty base directory is. If not set, the value from +# $JETTY_HOME will be used. +# +# JETTY_ARGS +# The default arguments to pass to jetty. +# For example +# JETTY_ARGS=jetty.port=8080 jetty.spdy.port=8443 jetty.secure.port=443 +# + +set -e -C + +readConfig() +{ + echo "Reading $1.." + source "$1" +} + +CONFIGS=() + +if [ -f /etc/default/jetty ]; then + readConfig /etc/default/jetty +fi + +if [ -z "$JETTY_HOME" ]; then + JETTY_HOME=/usr/share/jetty +fi + +if [ -z "$JETTY_BASE" ]; then + JETTY_BASE="$JETTY_HOME" +fi + +cd "$JETTY_BASE" +JETTY_BASE="$PWD" + +if [ -z "$JETTY_CONF" ] +then + JETTY_CONF=/etc/jetty.conf +fi + +if [ -f "$JETTY_CONF" ] && [ -r "$JETTY_CONF" ] +then + while read -r CONF + do + if expr "$CONF" : '#' >/dev/null ; then + continue + fi + + if [ -d "$CONF" ] + then + # assume it's a directory with configure.xml files + # for example: /etc/jetty.d/ + # sort the files before adding them to the list of JETTY_ARGS + for XMLFILE in "$CONF/"*.xml + do + if [ -r "$XMLFILE" ] && [ -f "$XMLFILE" ] + then + JETTY_ARGS+=("$XMLFILE") + else + echo "** WARNING: Cannot read '$XMLFILE' specified in '$JETTY_CONF'" + fi + done + else + # assume it's a command line parameter (let start.jar deal with its validity) + JETTY_ARGS+=("$CONF") + fi + done < "$JETTY_CONF" +fi + +if [ -z "$JAVA" ] +then + . /usr/share/java-utils/java-functions + set_jvm + set_javacmd + JAVA="$JAVACMD" +fi + +if [ -z "$JETTY_LOGS" ] && [ -d $JETTY_BASE/logs ] +then + JETTY_LOGS=/var/log/jetty/logs +fi +JAVA_OPTIONS+=("-Djetty.logs=$JETTY_LOGS") + +JAVA_OPTIONS+=("-Djetty.home=$JETTY_HOME" "-Djetty.base=$JETTY_BASE") + +JETTY_START="$JETTY_HOME/start.jar" +START_INI="$JETTY_BASE/start.ini" +if [ ! -f "$START_INI" ] +then + echo "Cannot find a start.ini in your JETTY_BASE directory: $JETTY_BASE" 2>&2 + exit 1 +fi + +RUN_ARGS=(${JAVA_OPTIONS[@]} -jar "$JETTY_START" ${JETTY_ARGS[*]}) +RUN_CMD=("$JAVA" ${RUN_ARGS[@]}) + +echo -n "Starting Jetty: " +${RUN_CMD[*]} diff --git a/SPECS/jetty.spec b/SPECS/jetty.spec new file mode 100644 index 0000000..c1a71e8 --- /dev/null +++ b/SPECS/jetty.spec @@ -0,0 +1,1670 @@ +# Copyright (c) 2000-2007, JPackage Project +# All rights reserved. +# +# 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 of the JPackage Project 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 THE COPYRIGHT HOLDERS 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 THE COPYRIGHT +# OWNER 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. +# + +%global jtuid 110 +%global username %{name} +%global confdir %{_sysconfdir}/%{name} +%global logdir %{_localstatedir}/log/%{name} +%global homedir %{_datadir}/%{name} +%global jettycachedir %{_localstatedir}/cache/%{name} +%global tempdir %{jettycachedir}/temp +%global rundir %{_localstatedir}/run/%{name} +%global jettylibdir %{_localstatedir}/lib/%{name} +%global appdir %{jettylibdir}/webapps + + +%global addver .v20190610 + +# minimal version required to build eclipse and thermostat +# eclipse needs: util, server, http, continuation, io, security, servlet +# thermostat needs: server, jaas, webapp +# above modules need: jmx, xml +%bcond_with jp_minimal + +Name: jetty +Version: 9.4.19 +Release: 1%{addver}%{?dist} +Summary: Java Webserver and Servlet Container + +# Jetty is dual licensed under both ASL 2.0 and EPL 1.0, see NOTICE.txt +License: ASL 2.0 or EPL-1.0 +URL: http://www.eclipse.org/jetty/ +Source0: https://github.com/eclipse/%{name}.project/archive/%{name}-%{version}%{addver}.tar.gz +Source1: jetty.sh +Source3: jetty.logrotate +Source5: %{name}.service +# MIT license text taken from Utf8Appendable.java +Source6: LICENSE-MIT + +Patch1: 0001-Fedora-jetty.home.patch + +BuildRequires: maven-local +BuildRequires: mvn(javax.servlet:javax.servlet-api) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) +BuildRequires: mvn(org.slf4j:slf4j-api) + +%if %{without jp_minimal} +BuildRequires: maven-local +BuildRequires: mvn(com.github.jnr:jnr-unixsocket) +BuildRequires: mvn(javax.annotation:javax.annotation-api) +BuildRequires: mvn(javax.enterprise:cdi-api) +BuildRequires: mvn(javax.servlet:javax.servlet-api) +BuildRequires: mvn(javax.servlet.jsp:javax.servlet.jsp-api) +BuildRequires: mvn(javax.servlet:jstl) +BuildRequires: mvn(javax.transaction:javax.transaction-api) +BuildRequires: mvn(javax.websocket:javax.websocket-api) +BuildRequires: mvn(javax.websocket:javax.websocket-client-api) +BuildRequires: mvn(org.apache.ant:ant) +BuildRequires: mvn(org.apache.ant:ant-launcher) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven:maven-artifact) +BuildRequires: mvn(org.apache.maven:maven-core) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.apache.maven:maven-project) +BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-war-plugin) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-tools-api) +BuildRequires: mvn(org.apache.maven.shared:maven-artifact-transfer) +BuildRequires: mvn(org.apache.taglibs:taglibs-standard-impl) +BuildRequires: mvn(org.apache.taglibs:taglibs-standard-spec) +BuildRequires: mvn(org.apache.tomcat:tomcat-jasper) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) +BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin) +BuildRequires: mvn(org.eclipse.jetty.alpn:alpn-api) +BuildRequires: mvn(org.eclipse.jetty.orbit:javax.mail.glassfish) +BuildRequires: mvn(org.eclipse.jetty.orbit:javax.security.auth.message) +BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-assembly-descriptors) +BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-schemas) +BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-test-helper) +BuildRequires: mvn(org.jboss.weld.servlet:weld-servlet-core) +BuildRequires: mvn(org.mongodb:mongo-java-driver) +BuildRequires: mvn(org.ow2.asm:asm) +BuildRequires: mvn(org.ow2.asm:asm-commons) +BuildRequires: mvn(org.slf4j:slf4j-api) +BuildRequires: mvn(org.springframework:spring-beans) + +BuildRequires: mvn(org.mortbay.jetty.alpn:alpn-boot) +BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-artifact-remote-resources) +BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-distribution-remote-resources) +BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-test-policy) +#BuildRequires: mvn(org.eclipse.jetty.toolchain.setuid:jetty-setuid-java) +BuildRequires: maven-javadoc-plugin +BuildRequires: glassfish-el +BuildRequires: systemd +BuildRequires: junit5 + +# duplicate providers, choose one +BuildRequires: jboss-websocket-1.0-api +Requires: jboss-websocket-1.0-api +%endif # without jp_minimal + +BuildArch: noarch + +# jp_minimal doesn't have main package +%if %{without jp_minimal} +# Explicit requires for javapackages-tools since jetty.sh script +# uses /usr/share/java-utils/java-functions +Requires: javapackages-tools +Requires: %{name}-annotations = %{version}-%{release} +Requires: %{name}-ant = %{version}-%{release} +Requires: %{name}-client = %{version}-%{release} +Requires: %{name}-continuation = %{version}-%{release} +Requires: %{name}-deploy = %{version}-%{release} +Requires: %{name}-fcgi-client = %{version}-%{release} +Requires: %{name}-fcgi-server = %{version}-%{release} +Requires: %{name}-http = %{version}-%{release} +Requires: %{name}-http-spi = %{version}-%{release} +Requires: %{name}-io = %{version}-%{release} +Requires: %{name}-jaas = %{version}-%{release} +Requires: %{name}-jaspi = %{version}-%{release} +Requires: %{name}-jmx = %{version}-%{release} +Requires: %{name}-jndi = %{version}-%{release} +Requires: %{name}-jsp = %{version}-%{release} +Requires: %{name}-jspc-maven-plugin = %{version}-%{release} +Requires: %{name}-maven-plugin = %{version}-%{release} +Requires: %{name}-plus = %{version}-%{release} +Requires: %{name}-proxy = %{version}-%{release} +Requires: %{name}-rewrite = %{version}-%{release} +Requires: %{name}-security = %{version}-%{release} +Requires: %{name}-server = %{version}-%{release} +Requires: %{name}-servlet = %{version}-%{release} +Requires: %{name}-servlets = %{version}-%{release} +Requires: %{name}-spring = %{version}-%{release} +Requires: %{name}-start = %{version}-%{release} +Requires: %{name}-unixsocket = %{version}-%{release} +Requires: %{name}-util = %{version}-%{release} +Requires: %{name}-util-ajax = %{version}-%{release} +Requires: %{name}-webapp = %{version}-%{release} +Requires: %{name}-xml = %{version}-%{release} +Requires: %{name}-cdi = %{version}-%{release} +Requires: %{name}-websocket-api = %{version}-%{release} +Requires: %{name}-websocket-client = %{version}-%{release} +Requires: %{name}-websocket-common = %{version}-%{release} +Requires: %{name}-websocket-server = %{version}-%{release} +Requires: %{name}-websocket-servlet = %{version}-%{release} +Requires: %{name}-javax-websocket-client-impl = %{version}-%{release} +Requires: %{name}-javax-websocket-server-impl = %{version}-%{release} +Requires: %{name}-nosql = %{version}-%{release} +Requires: %{name}-quickstart = %{version}-%{release} +Requires: %{name}-jstl = %{version}-%{release} +Requires: %{name}-alpn-client = %{version}-%{release} +Requires: %{name}-alpn-server = %{version}-%{release} +Requires: %{name}-http2-client = %{version}-%{release} +Requires: %{name}-http2-common = %{version}-%{release} +Requires: %{name}-http2-hpack = %{version}-%{release} +Requires: %{name}-http2-http-client-transport = %{version}-%{release} +Requires: %{name}-http2-server = %{version}-%{release} + +Requires(pre): shadow-utils +%{?systemd_ordering} + + +Provides: group(%username) = %jtuid +Provides: user(%username) = %jtuid +%endif # without jp_minimal + +# (Added in F25) +Obsoletes: %{name}-monitor < 9.4.0-0.4 +# Hazelcast in Fedora is too old for jetty to build against (Added in F29) +Obsoletes: %{name}-hazelcast < 9.4.18-1 +# Infinispan in Fedora is too old for jetty to build against (Added in F31) +Obsoletes: %{name}-infinispan < 9.4.18-1 +# Eclipse no longer available (Added in F31) +Obsoletes: %{name}-osgi-alpn < 9.4.18-1 +Obsoletes: %{name}-osgi-boot < 9.4.18-1 +Obsoletes: %{name}-osgi-boot-jsp < 9.4.18-1 +Obsoletes: %{name}-osgi-boot-warurl < 9.4.18-1 + +%description +%global desc \ +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. +%{desc} +%global extdesc %{desc}\ +\ +This package contains + +# packages in jp_minimal set +%package client +Summary: client module for Jetty + +%description client +%{extdesc} %{summary}. + +%package continuation +Summary: continuation module for Jetty + +%description continuation +%{extdesc} %{summary}. + +%package http +Summary: http module for Jetty + +%description http +%{extdesc} %{summary}. + +%package http-spi +Summary: http-spi module for Jetty + +%description http-spi +%{extdesc} %{summary}. + +%package io +Summary: io module for Jetty + +%description io +%{extdesc} %{summary}. + +%package jaas +Summary: jaas module for Jetty + +%description jaas +%{extdesc} %{summary}. + +%package jsp +Summary: jsp module for Jetty +Requires: glassfish-el + +%description jsp +%{extdesc} %{summary}. + +%package security +Summary: security module for Jetty + +%description security +%{extdesc} %{summary}. + +%package server +Summary: server module for Jetty + +%description server +%{extdesc} %{summary}. + +%package servlet +Summary: servlet module for Jetty +# Eclipse no longer available (Added in F31) +Obsoletes: %{name}-httpservice < 9.4.18-1 + +%description servlet +%{extdesc} %{summary}. + +%package util +Summary: util module for Jetty +# Utf8Appendable.java is additionally under MIT license +License: (ASL 2.0 or EPL-1.0) and MIT + +%description util +%{extdesc} %{summary}. + +%package webapp +Summary: webapp module for Jetty + +%description webapp +%{extdesc} %{summary}. + +%package jmx +Summary: jmx module for Jetty + +%description jmx +%{extdesc} %{summary}. + +%package xml +Summary: xml module for Jetty + +%description xml +%{extdesc} %{summary}. + + + +%if %{without jp_minimal} +%package project +Summary: POM files for Jetty +Obsoletes: %{name}-websocket-parent < 9.4.0-0.4 +Provides: %{name}-websocket-parent = %{version}-%{release} +Obsoletes: %{name}-osgi-project < 9.4.0-0.4 +Provides: %{name}-osgi-project = %{version}-%{release} + +%description project +%{extdesc} %{summary}. + +%package deploy +Summary: deploy module for Jetty + +%description deploy +%{extdesc} %{summary}. + +%package annotations +Summary: annotations module for Jetty + +%description annotations +%{extdesc} %{summary}. + +%package ant +Summary: ant module for Jetty + +%description ant +%{extdesc} %{summary}. + +%package cdi +Summary: Jetty CDI Configuration + +%description cdi +%{extdesc} %{summary}. + +%package fcgi-client +Summary: FastCGI client module for Jetty + +%description fcgi-client +%{extdesc} %{summary}. + +%package fcgi-server +Summary: FastCGI client module for Jetty + +%description fcgi-server +%{extdesc} %{summary}. + +%package jaspi +Summary: jaspi module for Jetty + +%description jaspi +%{extdesc} %{summary}. + +%package jndi +Summary: jndi module for Jetty + +%description jndi +%{extdesc} %{summary}. + +%package jspc-maven-plugin +Summary: jspc-maven-plugin module for Jetty + +%description jspc-maven-plugin +%{extdesc} %{summary}. + +%package maven-plugin +Summary: maven-plugin module for Jetty + +%description maven-plugin +%{extdesc} %{summary}. + +%package plus +Summary: plus module for Jetty + +%description plus +%{extdesc} %{summary}. + +%package proxy +Summary: proxy module for Jetty + +%description proxy +%{extdesc} %{summary}. + +%package rewrite +Summary: rewrite module for Jetty + +%description rewrite +%{extdesc} %{summary}. + +%package servlets +Summary: servlets module for Jetty + +%description servlets +%{extdesc} %{summary}. + +%package spring +Summary: spring module for Jetty + +%description spring +%{extdesc} %{summary}. + +%package start +Summary: start module for Jetty + +%description start +%{extdesc} %{summary}. + +%package unixsocket +Summary: unixsocket module for Jetty + +%description unixsocket +%{extdesc} %{summary}. + +%package util-ajax +Summary: util-ajax module for Jetty + +%description util-ajax +%{extdesc} %{summary}. + +%package websocket-api +Summary: websocket-api module for Jetty + +%description websocket-api +%{extdesc} %{summary}. + +%package websocket-client +Summary: websocket-client module for Jetty + +%description websocket-client +%{extdesc} %{summary}. + +%package websocket-common +Summary: websocket-common module for Jetty + +%description websocket-common +%{extdesc} %{summary}. + +%package websocket-server +Summary: websocket-server module for Jetty + +%description websocket-server +%{extdesc} %{summary}. + +%package websocket-servlet +Summary: websocket-servlet module for Jetty + +%description websocket-servlet +%{extdesc} %{summary}. + +%package javax-websocket-client-impl +Summary: javax-websocket-client-impl module for Jetty + +%description javax-websocket-client-impl +%{extdesc} %{summary}. + +%package javax-websocket-server-impl +Summary: javax-websocket-server-impl module for Jetty + +%description javax-websocket-server-impl +%{extdesc} %{summary}. + +%package nosql +Summary: nosql module for Jetty + +%description nosql +%{extdesc} %{summary}. + +%package quickstart +Summary: quickstart module for Jetty + +%description quickstart +%{extdesc} %{summary}. + +%package alpn-client +Summary: alpn-client module for Jetty + +%description alpn-client +%{extdesc} %{summary}. + +%package alpn-server +Summary: alpn-server module for Jetty + +%description alpn-server +%{extdesc} %{summary}. + +%package http2-client +Summary: http2-client module for Jetty + +%description http2-client +%{extdesc} %{summary}. + +%package http2-common +Summary: http2-common module for Jetty + +%description http2-common +%{extdesc} %{summary}. + +%package http2-hpack +Summary: http2-hpack module for Jetty + +%description http2-hpack +%{extdesc} %{summary}. + +%package http2-http-client-transport +Summary: http2-http-client-transport module for Jetty + +%description http2-http-client-transport +%{extdesc} %{summary}. + +%package http2-server +Summary: http2-server module for Jetty + +%description http2-server +%{extdesc} %{summary}. + +%package jstl +Summary: jstl module for Jetty + +%description jstl +%{extdesc} %{summary}. + +%endif # without jp_minimal + +%package javadoc +Summary: Javadoc for %{name} +# some MIT-licensed code (from Utf8Appendable) is used to generate javadoc +License: (ASL 2.0 or EPL-1.0) and MIT + +%description javadoc +%{summary}. + +%prep +%setup -q -n %{name}.project-%{name}-%{version}%{addver} + +%patch1 -p1 + +find . -name "*.?ar" -exec rm {} \; +find . -name "*.class" -exec rm {} \; + +# Plugins irrelevant or harmful to building the package +%pom_remove_plugin -r :findbugs-maven-plugin +%pom_remove_plugin -r :maven-enforcer-plugin +%pom_remove_plugin -r :clirr-maven-plugin +%pom_remove_plugin -r :maven-eclipse-plugin +%pom_remove_plugin -r :maven-pmd-plugin +%pom_remove_plugin -r :license-maven-plugin +%pom_remove_plugin -r :maven-site-plugin +%pom_remove_plugin -r :maven-source-plugin +%pom_remove_plugin -r :maven-deploy-plugin +%pom_remove_plugin -r :jacoco-maven-plugin +%pom_remove_plugin -r :maven-release-plugin +%pom_remove_plugin -r :buildnumber-maven-plugin +%pom_remove_plugin -r :h2spec-maven-plugin + +# Unnecessary pom flattening can be skipped +%pom_remove_plugin -r :flatten-maven-plugin jetty-bom + +%pom_disable_module aggregates/jetty-all + +# Use proper groupId for apache ant +%pom_xpath_replace "pom:groupId[text()='ant']" "org.apache.ant" jetty-ant/pom.xml + +%pom_remove_dep "com.sun.net.httpserver:http" jetty-http-spi + +%pom_change_dep -r org.mortbay.jasper:apache-jsp org.apache.tomcat:tomcat-jasper + +%pom_add_dep 'org.junit.jupiter:junit-jupiter-engine:${junit.version}' tests/test-sessions/test-sessions-common + +# Old version of jetty not available for tests, so use this version +%pom_change_dep 'org.eclipse.jetty:jetty-util' 'org.eclipse.jetty:jetty-util:${project.version}' tests/test-webapps/test-servlet-spec/test-spec-webapp + +# provided by glassfish-jsp-api that has newer version +%pom_change_dep -r javax.servlet.jsp:jsp-api javax.servlet.jsp:javax.servlet.jsp-api + +# txt artifact - not installable +%pom_remove_plugin ":jetty-version-maven-plugin" +%pom_xpath_remove "pom:artifactItem[pom:classifier='version']" jetty-home + +# Disable building source release +%pom_xpath_remove 'pom:execution[pom:id="sources"]' jetty-home + +# Unwanted JS in javadoc +sed -i '/^\s*\*.*