Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Jetty 9.4.43.v20210629 #35

Merged
merged 1 commit into from
Aug 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions mrm-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,14 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
<!-- last version to run on JVM 1.4 -->
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5.20110712</version>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down
3 changes: 2 additions & 1 deletion mrm-maven-plugin/src/it/hostedrepo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>2.0.0</version>
<version>3.2.2</version>
<executions>
<execution>
<goals>
Expand All @@ -32,6 +32,7 @@
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
</filterProperties>
<postBuildHookScript>verify</postBuildHookScript>
<streamLogs>true</streamLogs>
<goal>verify</goal>
</configuration>
</plugin>
Expand Down
37 changes: 35 additions & 2 deletions mrm-maven-plugin/src/it/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,38 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<settings/>
<!--<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"/>-->
<settings>
<profiles>
<profile>
<id>it-repo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.codehaus.mojo.mrm.api.FileSystem;
import org.codehaus.mojo.mrm.servlet.FileSystemServlet;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;

import java.net.InetAddress;
import java.net.UnknownHostException;
Expand All @@ -32,6 +32,7 @@
*/
public class FileSystemServer
{

/**
* Guard for {@link #starting}, {@link #started}, {@link #finishing}, {@link #finished}, {@link #boundPort}
* and {@link #problem}.
Expand Down Expand Up @@ -262,18 +263,13 @@ public void run()
try {
Server server = new Server(requestedPort);
try {
Context root = new Context(server, "/", Context.SESSIONS);
root.addServlet(new ServletHolder(new FileSystemServlet(fileSystem, settingsServletPath)), "/*");
ServletContextHandler context = new ServletContextHandler();
context.setContextPath("/");
context.addServlet(new ServletHolder(new FileSystemServlet(fileSystem, settingsServletPath)), "/*");
server.setHandler(context);
server.start();
synchronized (lock) {
boundPort = 0;
Connector[] connectors = server.getConnectors();
for (int i = 0; i < connectors.length; i++) {
if (connectors[i].getLocalPort() > 0) {
boundPort = connectors[i].getLocalPort();
break;
}
}
boundPort = ((ServerConnector)server.getConnectors()[0]).getLocalPort();
starting = false;
started = true;
lock.notifyAll();
Expand All @@ -282,6 +278,7 @@ public void run()
synchronized (lock) {
problem = e;
}
e.printStackTrace();
throw e;
}
synchronized (lock) {
Expand Down
2 changes: 1 addition & 1 deletion mrm-servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions mrm-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -66,7 +66,7 @@
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
23 changes: 5 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<scmpublish.content>target/staging/mrm</scmpublish.content>
<mavenVersion>2.2.1</mavenVersion>
<mojo.java.target>1.8</mojo.java.target>
<jetty.version>9.4.43.v20210629</jetty.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -138,11 +139,6 @@
<artifactId>plexus-archiver</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>backport-util-concurrent</groupId>
<artifactId>backport-util-concurrent</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
Expand All @@ -165,8 +161,8 @@
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -194,9 +190,9 @@
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.16.v20140903</version>
<version>${jetty.version}</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -273,15 +269,6 @@
</build>

<profiles>
<profile>
<id>disable-doclint-for-jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
</profile>
<profile>
<!-- run integration tests
to use this profile:
Expand Down