This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 18883b1e3e feat(plc4x-server): Build a standalone jar too (#1167)
18883b1e3e is described below
commit 18883b1e3eb5b31ad707a21a2ce9d9c3817393f2
Author: Rajmund Takács <[email protected]>
AuthorDate: Sat Oct 21 17:15:59 2023 +0200
feat(plc4x-server): Build a standalone jar too (#1167)
feat(plc4j/plc4x-server): Build a fat jar that contains all the
dependencies, so user can set up a plc4x proxy server much easier.
```
$ java -jar plc4j-plc4x-server-0.12.0-SNAPSHOT-uber-jar.jar
11:50:07.822 [main] DEBUG
io.netty.util.internal.logging.InternalLoggerFactory -- Using SLF4J as the
default logging framework
11:50:07.826 [main] DEBUG io.netty.channel.MultithreadEventLoopGroup --
-Dio.netty.eventLoopThreads: 24
11:50:07.833 [main] DEBUG io.netty.util.concurrent.GlobalEventExecutor --
-Dio.netty.globalEventExecutor.quietPeriodSeconds: 1
11:50:07.839 [main] DEBUG io.netty.util.internal.InternalThreadLocalMap --
-Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
11:50:07.839 [main] DEBUG io.netty.util.internal.InternalThreadLocalMap --
-Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
...
```
---
plc4j/tools/plc4x-server/pom.xml | 43 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/plc4j/tools/plc4x-server/pom.xml b/plc4j/tools/plc4x-server/pom.xml
index f650f1b361..3112acc8bd 100644
--- a/plc4j/tools/plc4x-server/pom.xml
+++ b/plc4j/tools/plc4x-server/pom.xml
@@ -54,6 +54,49 @@
</execution>
</executions>
</plugin>
+ <!-- Build a fat jar containing all dependencies -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-uber-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <transformers combine.children="append">
+ <transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+
<mainClass>org.apache.plc4x.java.tools.plc4xserver.Plc4xServer</mainClass>
+ </transformer>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-uber-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+
<file>${project.build.directory}/${project.artifactId}-${project.version}-uber-jar.jar</file>
+ <type>jar</type>
+ <classifier>standalone</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>