Closed sblantipodi closed 5 months ago
Hi @sblantipodi !
junixsocket-core is a POM-only dependency; it should not cause errors (the junixsocket jars are already modularized / contain module-info.class) Can you please provide a snippet that reproduces the issue?
As a workaround, you may replace the dependency to junixsocket-core
with the dependencies declared in junixsocket-core
directly, and (if necessary) add an exclusion for junixsocket-core
from any of your dependencies (check with mvn dependency:tree
or via your IDE)
<dependencies>
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-native-common</artifactId>
<version>${junixsocket.version}</version>
</dependency>
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-common</artifactId>
<version>${junixsocket.version}</version>
</dependency>
</dependencies>
@sblantipodi Please see the new junixsocket-demo-jpackagejlink
module for instructions how to use junixsocket with jlink and/or jpackage.
I'm using jlink-maven-plugin
instead of maven-jlink-plugin
, and that seems to work just fine.
Please let me know how that goes for your project. — I didn't see the place where you exactly get the error (maybe you could point me at it?)
On a related note: Did you look into using GraalVM native-image instead of jlink? That usually produces much more optimized code. junixsocket supports that, too.
Other than that: Your ambient light project looks really cool! I was reading about such a tool just a few days ago. Good to see that junixsocket can play a small role there. Keep up the great work!
@sblantipodi I've filed a bug with maven-jlink-plugin (MJLINK-82), along with a patch to fix the issue on their end.
I also updated the demo POM with a profile triggering the bug. If you use a local snapshot build of maven-jlink-plugin with the patch applied, linking should work just fine.
@kohlschuetter wow, great! thanks for the awesome work :)
2.9.1 has been released, please verify. Thanks again for reporting!
Hi all.
When I try to use jlink on software that uses junixsocket I get this error: [ERROR] The given dependency C:\Users\sblantipodi.m2\repository\com\kohlschutter\junixsocket\junixsocket-core\2.8.3\junixsocket-core-2.8.3.pom does not have a module-info.java file. So it can't be linked.
any plan to add a module-info?
Thanks :)