Generating unixsocket.mod [files] section with help maven-dependency-plugin details
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
05e377d0f2
commit
ba39ee8b1a
|
@ -11,17 +11,6 @@
|
||||||
<properties>
|
<properties>
|
||||||
<bundle-symbolic-name>${project.groupId}.unixsocket</bundle-symbolic-name>
|
<bundle-symbolic-name>${project.groupId}.unixsocket</bundle-symbolic-name>
|
||||||
</properties>
|
</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>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -31,6 +20,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.jnr</groupId>
|
<groupId>com.github.jnr</groupId>
|
||||||
<artifactId>jnr-unixsocket</artifactId>
|
<artifactId>jnr-unixsocket</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.github.jnr</groupId>
|
||||||
|
<artifactId>jnr-a64asm</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -44,4 +39,81 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</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>
|
</project>
|
||||||
|
|
|
@ -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>
|
|
@ -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
|
||||||
|
|
|
@ -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
|
|
@ -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
|
|
Loading…
Reference in New Issue