Skip to content

Commit

Permalink
Merge pull request #5408 from eclipse/dependency/jetty-9.4.x/jnr-unix…
Browse files Browse the repository at this point in the history
…socket-0.38.3

Bump jnr-unixsocket from 0.24 to 0.38.3
  • Loading branch information
joakime committed Oct 8, 2020
2 parents 5e0e99d + ba39ee8 commit 6ffd045
Show file tree
Hide file tree
Showing 17 changed files with 156 additions and 71 deletions.
94 changes: 83 additions & 11 deletions jetty-unixsocket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@
<properties>
<bundle-symbolic-name>${project.groupId}.unixsocket</bundle-symbolic-name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.unixsocket.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand All @@ -31,6 +20,12 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-unixsocket</artifactId>
<exclusions>
<exclusion>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-a64asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand All @@ -44,4 +39,81 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.unixsocket.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>build-deps-file</id>
<phase>generate-resources</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<appendOutput>false</appendOutput>
<outputFile>${project.build.directory}/deps.txt</outputFile>
<sort>true</sort>
<excludeGroupIds>org.eclipse.jetty,javax.servlet</excludeGroupIds>
<prependGroupId>true</prependGroupId>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>process-deps</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="${project.build.directory}/deps.txt" tofile="${project.build.directory}/deps-orig.txt" />
<!-- regex the deps with classifiers first -->
<replaceregexp file="${project.build.directory}/deps.txt" match=" *(.*):(.*):jar:(.*):(.*):.*$" replace="maven://\1/\2/\4/jar/\3|lib/jnr/\2-\4-\3.jar" byline="true" />
<!-- regex the normal deps -->
<replaceregexp file="${project.build.directory}/deps.txt" match=" *(.*):(.*):jar:(.*):.*$" replace="maven://\1/\2/\3|lib/jnr/\2-\3.jar" byline="true" />
<replaceregexp file="${project.build.directory}/deps.txt" match="The following files have been resolved:" replace="[files]" />
<concat destfile="${project.build.directory}/unixsocket.mod">
<fileset file="src/main/config-template/modules/unixsocket-prefix.mod" />
<fileset file="${project.build.directory}/deps.txt" />
<fileset file="src/main/config-template/modules/unixsocket-suffix.mod" />
</concat>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/config.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
28 changes: 28 additions & 0 deletions jetty-unixsocket/src/main/assembly/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>config</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>jar</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main/config-template</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/unixsocket-prefix.mod</exclude>
<exclude>**/unixsocket-suffix.mod</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>modules</outputDirectory>
<includes>
<include>unixsocket.mod</include>
</includes>
</fileSet>
</fileSets>
</assembly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html

[description]
Enables a Unix Domain Socket Connector that can receive
requests from a local proxy and/or SSL offloader (eg haproxy) in either
HTTP or TCP mode. Unix Domain Sockets are more efficient than
localhost TCP/IP connections as they reduce data copies, avoid
needless fragmentation and have better dispatch behaviours.
When enabled with corresponding support modules, the connector can
accept HTTP, HTTPS or HTTP2C traffic.

[tags]
connector

[depend]
server

[xml]
etc/jetty-unixsocket.xml

[lib]
lib/jetty-unixsocket-${jetty.version}.jar
lib/jnr/*.jar
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[license]
Jetty UnixSockets is implemented using the Java Native Runtime, which is an
open source project hosted on Github and released under the Apache 2.0 license.
https://github.com/jnr/jnr-unixsocket
http://www.apache.org/licenses/LICENSE-2.0.html

[ini-template]
### Unix SocketHTTP Connector Configuration

## Unix socket path to bind to
# jetty.unixsocket.path=/tmp/jetty.sock

## Connector idle timeout in milliseconds
# jetty.unixsocket.idleTimeout=30000

## Number of selectors (-1 picks default)
# jetty.unixsocket.selectors=-1

## ServerSocketChannel backlog (0 picks platform default)
# jetty.unixsocket.acceptQueueSize=0
59 changes: 0 additions & 59 deletions jetty-unixsocket/src/main/config/modules/unixsocket.mod

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-unixsocket</artifactId>
<version>0.24</version>
<version>0.38.3</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
Expand Down

0 comments on commit 6ffd045

Please sign in to comment.