mojohaus / appassembler

https://www.mojohaus.org/appassembler/
MIT License
93 stars 49 forks source link

Option to have native libraries in separate directory, not visible in classpath #62

Open vkopichenko opened 6 years ago

vkopichenko commented 6 years ago

Currently both classpath and java.library.path are determined by single setting <repositoryName>lib</repositoryName>.

It would be nice to have them separate like this:

<libDir>lib</libDir>
<nativeDir>bin</nativeDir>

This would prevent classpath scanning problems like this: https://github.com/ronmamo/reflections/issues/80

15:41:53.023 [WrapperSimpleAppMain] WARN  org.reflections.Reflections - could not create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/opt/ecp/lib/wrapper-windows-x86-64.dll]
either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
        at org.reflections.vfs.Vfs.fromURL(Vfs.java:108)
        at org.reflections.vfs.Vfs.fromURL(Vfs.java:90) 
        at org.reflections.Reflections.scan(Reflections.java:236)
        at org.reflections.Reflections.scan(Reflections.java:203)
        at org.reflections.Reflections.<init>(Reflections.java:128)

This feature is also requested at https://stackoverflow.com/questions/34334599/appassembler-maven-plugin-how-to-include-native-library-files-when-generating.