Skip to content

Commit

Permalink
Merge pull request #3168 from eclipse/jetty-10.0.x-3162_jetty_servlet…
Browse files Browse the repository at this point in the history
…_api

Issue #3162 - Use Jetty specific Servlet API jar.
  • Loading branch information
sbordet authored Feb 7, 2019
2 parents a005bfd + 9286cdc commit e2506d4
Show file tree
Hide file tree
Showing 109 changed files with 233 additions and 272 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pipeline {
agent { node { label 'linux' } }
options { timeout(time: 120, unit: 'MINUTES') }
steps {
mavenBuild("jdk11", "-Pautobahn -Pmongodb install", "maven3")
mavenBuild("jdk11", "-Pautobahn -Pmongodb -Psnapshot-repositories install", "maven3")
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
// Collect up the jacoco execution results (only on main build)
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
Expand Down Expand Up @@ -44,7 +44,7 @@ pipeline {
agent { node { label 'linux' } }
options { timeout(time: 30, unit: 'MINUTES') }
steps {
mavenBuild("jdk11", "install javadoc:javadoc -DskipTests", "maven3")
mavenBuild("jdk11", "-Psnapshot-repositories install javadoc:javadoc -DskipTests", "maven3")
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']]
}
}
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The following artifacts are CDDL + GPLv2 with classpath exception.

https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html

org.eclipse.jetty.toolchain:jetty-schemas
org.eclipse.jetty.toolchain:jetty-servlet-api

------
Assorted
Expand Down
4 changes: 2 additions & 2 deletions aggregates/jetty-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@
<artifactId>javax.websocket-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
Expand Down
4 changes: 2 additions & 2 deletions aggregates/jetty-websocket-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 1 addition & 5 deletions apache-jsp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-schemas</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<artifactId>jetty-servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.mortbay.jasper</groupId>
Expand Down
2 changes: 1 addition & 1 deletion apache-jsp/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
requires java.xml;
requires org.eclipse.jetty.util;
requires org.mortbay.apache.jasper;
requires static javax.servlet.api;
requires static jetty.servlet.api;

provides Log with JuliLog;
provides ServletContainerInitializer with JettyJasperInitializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void init(WebAppContext context, URI baseUri, File scratchDir)
{
context.setAttribute("javax.servlet.context.tempdir", scratchDir);
context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
".*/javax.servlet-[^/]*\\.jar$|.*/servlet-api-[^/]*\\.jar$|.*javax.servlet.jsp.jstl-[^/]*\\.jar|.*taglibs-standard-impl-.*\\.jar");
".*/jetty-servlet-api-[^/]*\\.jar$|.*javax.servlet.jsp.jstl-[^/]*\\.jar|.*taglibs-standard-impl-.*\\.jar");
context.setWar(baseUri.toASCIIString());
context.setResourceBase(baseUri.toASCIIString());
}
Expand Down
4 changes: 2 additions & 2 deletions examples/async-rest/async-rest-jar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions examples/async-rest/async-rest-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.eclipse.jetty.annotations.AnnotationConfiguration;
import org.eclipse.jetty.deploy.DeploymentManager;
import org.eclipse.jetty.deploy.PropertiesConfigurationManager;
import org.eclipse.jetty.deploy.bindings.DebugListenerBinding;
import org.eclipse.jetty.deploy.providers.WebAppProvider;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.jmx.MBeanContainer;
Expand All @@ -35,7 +34,6 @@
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.server.AsyncRequestLogWriter;
import org.eclipse.jetty.server.CustomRequestLog;
import org.eclipse.jetty.server.DebugListener;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
Expand Down Expand Up @@ -174,7 +172,7 @@ public static void main( String[] args ) throws Exception
deployer.setContexts(contexts);
deployer.setContextAttribute(
"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
".*/[^/]*servlet-api-[^/]*\\.jar$|.*/javax.servlet.jsp.jstl-.*\\.jar$|.*/[^/]*taglibs.*\\.jar$");
".*/jetty-servlet-api-[^/]*\\.jar$|.*/javax.servlet.jsp.jstl-.*\\.jar$|.*/[^/]*taglibs.*\\.jar$");

WebAppProvider webapp_provider = new WebAppProvider();
webapp_provider.setMonitoredDirName(jetty_base + "/webapps");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static void main( String[] args ) throws Exception
// scan for them instead.
webapp.setAttribute(
"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
".*/[^/]*servlet-api-[^/]*\\.jar$|.*/javax.servlet.jsp.jstl-.*\\.jar$|.*/[^/]*taglibs.*\\.jar$" );
".*/jetty-servlet-api-[^/]*\\.jar$|.*/javax.servlet.jsp.jstl-.*\\.jar$|.*/[^/]*taglibs.*\\.jar$" );

// A WebAppContext is a ContextHandler as well so it needs to be set to
// the server so it is aware of where to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static final void main( String args[] ) throws Exception
webapp.setWar(warFile.getAbsolutePath());
webapp.setAttribute(
"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
".*/javax.servlet-[^/]*\\.jar$|.*/servlet-api-[^/]*\\.jar$");
".*/jetty-servlet-api-[^/]*\\.jar$");
server.setHandler(webapp);

// Register new transaction manager in JNDI
Expand Down
2 changes: 1 addition & 1 deletion jetty-annotations/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

requires java.naming;
requires java.annotation;
requires javax.servlet.api;
requires jetty.servlet.api;
requires org.objectweb.asm;
requires org.eclipse.jetty.util;
requires org.eclipse.jetty.http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public AnnotationConfiguration()
{
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, FragmentConfiguration.class, PlusConfiguration.class);
addDependents(JettyWebXmlConfiguration.class);
protectAndExpose("org.eclipse.jetty.util.annotation.");
protectAndExpose("org.eclipse.jetty.util.annotations.");
hide("org.objectweb.asm.");
}

Expand Down
7 changes: 2 additions & 5 deletions jetty-ant/src/test/config/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@
<loginServices>
<hashLoginService name="Test Realm" config="realm.properties"/>
</loginServices>
<webApp
war="test.war"
contextpath="/test" >
<webApp war="test.war" contextpath="/test" >
<attributes>
<attribute name="org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern" value=".*/servlet-api-[^/]*\.jar$"/>

<attribute name="org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern" value=".*/jetty-servlet-api-[^/]*\.jar$"/>
</attributes>
</webApp>
</jetty.run>
Expand Down
8 changes: 4 additions & 4 deletions jetty-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<configuration>
<argLine>
@{argLine} ${jetty.surefire.argLine}
--add-reads org.eclipse.jetty.client=javax.servlet.api
--add-reads org.eclipse.jetty.client=jetty.servlet.api
--add-modules java.security.jgss
--add-modules javax.servlet.api
--add-modules jetty.servlet.api
--add-modules org.eclipse.jetty.jmx
--add-modules org.slf4j
</argLine>
Expand Down Expand Up @@ -120,8 +120,8 @@
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-servlet-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion jetty-deploy/src/main/config/etc/jetty-deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</Set>
<Call name="setContextAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<Arg>.*/[^/]*servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\.jar$</Arg>
<Arg>.*/jetty-servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\.jar$</Arg>
</Call>

<!-- Add a customize step to the deployment lifecycle -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<Call name="setContextAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<Arg>.*/servlet-api-[^/]*\.jar$</Arg>
<Arg>.*/jetty-servlet-api-[^/]*\.jar$</Arg>
</Call>

<Call id="webappprovider" name="addAppProvider">
Expand Down
Loading

0 comments on commit e2506d4

Please sign in to comment.