From ba39ee8b1aec4ae55117de72f999561d6689b5b2 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 8 Oct 2020 10:50:16 -0500 Subject: [PATCH] Generating unixsocket.mod [files] section with help maven-dependency-plugin details Signed-off-by: Joakim Erdfelt --- jetty-unixsocket/pom.xml | 94 ++++++++++++++++--- jetty-unixsocket/src/main/assembly/config.xml | 28 ++++++ .../etc/jetty-unixsocket-forwarded.xml | 0 .../etc/jetty-unixsocket-http.xml | 0 .../etc/jetty-unixsocket-http2c.xml | 0 .../etc/jetty-unixsocket-proxy-protocol.xml | 0 .../etc/jetty-unixsocket-secure.xml | 0 .../etc/jetty-unixsocket.xml | 0 .../modules/unixsocket-forwarded.mod | 0 .../modules/unixsocket-http.mod | 0 .../modules/unixsocket-http2c.mod | 0 .../modules/unixsocket-prefix.mod | 24 +++++ .../modules/unixsocket-proxy-protocol.mod | 0 .../modules/unixsocket-secure.mod | 0 .../modules/unixsocket-suffix.mod | 20 ++++ .../src/main/config/modules/unixsocket.mod | 60 ------------ 16 files changed, 155 insertions(+), 71 deletions(-) create mode 100644 jetty-unixsocket/src/main/assembly/config.xml rename jetty-unixsocket/src/main/{config => config-template}/etc/jetty-unixsocket-forwarded.xml (100%) rename jetty-unixsocket/src/main/{config => config-template}/etc/jetty-unixsocket-http.xml (100%) rename jetty-unixsocket/src/main/{config => config-template}/etc/jetty-unixsocket-http2c.xml (100%) rename jetty-unixsocket/src/main/{config => config-template}/etc/jetty-unixsocket-proxy-protocol.xml (100%) rename jetty-unixsocket/src/main/{config => config-template}/etc/jetty-unixsocket-secure.xml (100%) rename jetty-unixsocket/src/main/{config => config-template}/etc/jetty-unixsocket.xml (100%) rename jetty-unixsocket/src/main/{config => config-template}/modules/unixsocket-forwarded.mod (100%) rename jetty-unixsocket/src/main/{config => config-template}/modules/unixsocket-http.mod (100%) rename jetty-unixsocket/src/main/{config => config-template}/modules/unixsocket-http2c.mod (100%) create mode 100644 jetty-unixsocket/src/main/config-template/modules/unixsocket-prefix.mod rename jetty-unixsocket/src/main/{config => config-template}/modules/unixsocket-proxy-protocol.mod (100%) rename jetty-unixsocket/src/main/{config => config-template}/modules/unixsocket-secure.mod (100%) create mode 100644 jetty-unixsocket/src/main/config-template/modules/unixsocket-suffix.mod delete mode 100644 jetty-unixsocket/src/main/config/modules/unixsocket.mod diff --git a/jetty-unixsocket/pom.xml b/jetty-unixsocket/pom.xml index 5f86f73df9c..1ef37414733 100644 --- a/jetty-unixsocket/pom.xml +++ b/jetty-unixsocket/pom.xml @@ -11,17 +11,6 @@ ${project.groupId}.unixsocket - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.unixsocket.* - - - - org.eclipse.jetty @@ -31,6 +20,12 @@ com.github.jnr jnr-unixsocket + + + com.github.jnr + jnr-a64asm + + org.eclipse.jetty @@ -44,4 +39,81 @@ test + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.unixsocket.* + + + + org.apache.maven.plugins + maven-dependency-plugin + + + build-deps-file + generate-resources + + list + + + false + ${project.build.directory}/deps.txt + true + org.eclipse.jetty,javax.servlet + true + runtime + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + process-deps + process-resources + + run + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + src/main/assembly/config.xml + + + + + + + diff --git a/jetty-unixsocket/src/main/assembly/config.xml b/jetty-unixsocket/src/main/assembly/config.xml new file mode 100644 index 00000000000..3c97242ba28 --- /dev/null +++ b/jetty-unixsocket/src/main/assembly/config.xml @@ -0,0 +1,28 @@ + + + config + false + + jar + + + + src/main/config-template + + + ** + + + **/unixsocket-prefix.mod + **/unixsocket-suffix.mod + + + + target + modules + + unixsocket.mod + + + + diff --git a/jetty-unixsocket/src/main/config/etc/jetty-unixsocket-forwarded.xml b/jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-forwarded.xml similarity index 100% rename from jetty-unixsocket/src/main/config/etc/jetty-unixsocket-forwarded.xml rename to jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-forwarded.xml diff --git a/jetty-unixsocket/src/main/config/etc/jetty-unixsocket-http.xml b/jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-http.xml similarity index 100% rename from jetty-unixsocket/src/main/config/etc/jetty-unixsocket-http.xml rename to jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-http.xml diff --git a/jetty-unixsocket/src/main/config/etc/jetty-unixsocket-http2c.xml b/jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-http2c.xml similarity index 100% rename from jetty-unixsocket/src/main/config/etc/jetty-unixsocket-http2c.xml rename to jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-http2c.xml diff --git a/jetty-unixsocket/src/main/config/etc/jetty-unixsocket-proxy-protocol.xml b/jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-proxy-protocol.xml similarity index 100% rename from jetty-unixsocket/src/main/config/etc/jetty-unixsocket-proxy-protocol.xml rename to jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-proxy-protocol.xml diff --git a/jetty-unixsocket/src/main/config/etc/jetty-unixsocket-secure.xml b/jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-secure.xml similarity index 100% rename from jetty-unixsocket/src/main/config/etc/jetty-unixsocket-secure.xml rename to jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket-secure.xml diff --git a/jetty-unixsocket/src/main/config/etc/jetty-unixsocket.xml b/jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket.xml similarity index 100% rename from jetty-unixsocket/src/main/config/etc/jetty-unixsocket.xml rename to jetty-unixsocket/src/main/config-template/etc/jetty-unixsocket.xml diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-forwarded.mod b/jetty-unixsocket/src/main/config-template/modules/unixsocket-forwarded.mod similarity index 100% rename from jetty-unixsocket/src/main/config/modules/unixsocket-forwarded.mod rename to jetty-unixsocket/src/main/config-template/modules/unixsocket-forwarded.mod diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-http.mod b/jetty-unixsocket/src/main/config-template/modules/unixsocket-http.mod similarity index 100% rename from jetty-unixsocket/src/main/config/modules/unixsocket-http.mod rename to jetty-unixsocket/src/main/config-template/modules/unixsocket-http.mod diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-http2c.mod b/jetty-unixsocket/src/main/config-template/modules/unixsocket-http2c.mod similarity index 100% rename from jetty-unixsocket/src/main/config/modules/unixsocket-http2c.mod rename to jetty-unixsocket/src/main/config-template/modules/unixsocket-http2c.mod diff --git a/jetty-unixsocket/src/main/config-template/modules/unixsocket-prefix.mod b/jetty-unixsocket/src/main/config-template/modules/unixsocket-prefix.mod new file mode 100644 index 00000000000..9e7f4911133 --- /dev/null +++ b/jetty-unixsocket/src/main/config-template/modules/unixsocket-prefix.mod @@ -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 + diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-proxy-protocol.mod b/jetty-unixsocket/src/main/config-template/modules/unixsocket-proxy-protocol.mod similarity index 100% rename from jetty-unixsocket/src/main/config/modules/unixsocket-proxy-protocol.mod rename to jetty-unixsocket/src/main/config-template/modules/unixsocket-proxy-protocol.mod diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-secure.mod b/jetty-unixsocket/src/main/config-template/modules/unixsocket-secure.mod similarity index 100% rename from jetty-unixsocket/src/main/config/modules/unixsocket-secure.mod rename to jetty-unixsocket/src/main/config-template/modules/unixsocket-secure.mod diff --git a/jetty-unixsocket/src/main/config-template/modules/unixsocket-suffix.mod b/jetty-unixsocket/src/main/config-template/modules/unixsocket-suffix.mod new file mode 100644 index 00000000000..dc5f0272143 --- /dev/null +++ b/jetty-unixsocket/src/main/config-template/modules/unixsocket-suffix.mod @@ -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 diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket.mod b/jetty-unixsocket/src/main/config/modules/unixsocket.mod deleted file mode 100644 index 08651047dcc..00000000000 --- a/jetty-unixsocket/src/main/config/modules/unixsocket.mod +++ /dev/null @@ -1,60 +0,0 @@ -# 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 - -[files] -maven://com.github.jnr/jnr-unixsocket/0.38.3|lib/jnr/jnr-unixsocket-0.38.3.jar -maven://com.github.jnr/jnr-ffi/2.2.0|lib/jnr/jnr-ffi-2.2.0.jar -maven://com.github.jnr/jffi/1.3.0|lib/jnr/jffi-1.3.0.jar -maven://com.github.jnr/jffi/1.3.0/jar/native|lib/jnr/jffi-1.3.0-native.jar -maven://org.ow2.asm/asm/7.3.1|lib/jnr/asm-7.3.1.jar -maven://org.ow2.asm/asm-commons/7.3.1|lib/jnr/asm-commons-7.3.1.jar -maven://org.ow2.asm/asm-analysis/7.3.1|lib/jnr/asm-analysis-7.3.1.jar -maven://org.ow2.asm/asm-tree/7.3.1|lib/jnr/asm-tree-7.3.1.jar -maven://org.ow2.asm/asm-util/7.3.1|lib/jnr/asm-util-7.3.1.jar -maven://com.github.jnr/jnr-a64asm/1.0.2|lib/jnr/jnr-a64asm-1.0.2.jar -maven://com.github.jnr/jnr-x86asm/1.0.2|lib/jnr/jnr-x86asm-1.0.2.jar -maven://com.github.jnr/jnr-constants/0.10.0|lib/jnr/jnr-constants-0.10.0.jar -maven://com.github.jnr/jnr-enxio/0.32.1|lib/jnr/jnr-enxio-0.32.1.jar -maven://com.github.jnr/jnr-posix/3.1.2|lib/jnr/jnr-posix-3.1.2.jar - -[lib] -lib/jetty-unixsocket-${jetty.version}.jar -lib/jnr/*.jar - -[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