Re: module resource loading - opens {package} when {package} only holds resources

2021-09-20 Thread Rob Bygrave
*> is that you expect code outside of your module to locate these resources* That's right, the external module reading the resources is not application specific but a library (its job is to "run database migrations" - open source, published to maven central etc). The background is that I have an

Re: jlink SystemModulesPlugin use of hashCode breaks reproducibility

2021-09-20 Thread Craig Raw
Sure - I'm using the Gradle badass-jlink-plugin. The command it is executing is: /Users/craigraw/.sdkman/candidates/java/16.0.1.hs-adpt/bin/jlink -v --strip-debug --compress 2 --no-header-files --no-man-pages --ignore-signing-information --exclude-files **.png --exclude-resources glob:/com.sparrow

Re: module resource loading - opens {package} when {package} only holds resources

2021-09-20 Thread Alan Bateman
On 20/09/2021 11:13, Rob Bygrave wrote: Well ok, silly me really because I think it is now clear that the "proper answer" is that the module really needs to open the subdirectories. opens dbmigration.postgres; opens dbmigration.mysql; So thanks and apologies Alan. It's all making sense to me n

Re: module resource loading - opens {package} when {package} only holds resources

2021-09-20 Thread Rob Bygrave
Well ok, silly me really because I think it is now clear that the "proper answer" is that the module really needs to open the subdirectories. opens dbmigration.postgres; opens dbmigration.mysql; So thanks and apologies Alan. It's all making sense to me now, unfortunately I got muddled by that er

Re: module resource loading - opens {package} when {package} only holds resources

2021-09-20 Thread Rob Bygrave
*> "dbmigration" resources have not been copied into target/classes?* target/classes/dbmigration exists *BUT* ... now I noticed that dbmigration only contained other sub-directories (which then contain the resources). So putting an empty junk.txt file into dbmigration fixes the problem. So if the

Re: jlink SystemModulesPlugin use of hashCode breaks reproducibility

2021-09-20 Thread Alan Bateman
On 20/09/2021 07:52, Craig Raw wrote: Hi, While I've noticed significant improvements in making reproducible builds with JDK 16, there is a remaining issue I'm stumped by. The issue is this: Using jlink invokes the SystemModulesPlugin, which creates .class files containing module descriptors fo

Re: module resource loading - opens {package} when {package} only holds resources

2021-09-20 Thread Alan Bateman
On 20/09/2021 09:55, Rob Bygrave wrote: Hi, I have a case where I believe I have a module where I would like to use: opens {package}; ... *where {package} only contains resources*, there are no .class files in {package}. Currently when {package} only contains resources, we get an InvalidModuleD

module resource loading - opens {package} when {package} only holds resources

2021-09-20 Thread Rob Bygrave
Hi, I have a case where I believe I have a module where I would like to use: opens {package}; ... *where {package} only contains resources*, there are no .class files in {package}. Currently when {package} only contains resources, we get an InvalidModuleDescriptorException error: Error occurred