Extend maven deployment to Maven Central
#5847 implemented maven support by deploying to github packages. As a followup we should add deployment to Maven Central. This will require extra secrets and considerations.
This issue is an extension of #3652
Hi, Does it will simplify the use of HDF5 in a classic Java Maven project ? I'm a little bit disappointed on how to get started using the v2.0.0 many release artefacts... I'm working in a closed environnement where the "proper" way to get hdf5 (java and associated native libraries) would be from our internal mirror of Maven Central. I'm using redhat enterprise 8.4. We would definitively love trying HDF5 but it's hard to get started just for the installation. Tks for your support ! Denis
We are just getting into Maven distribution and support. This release is our first try and we are still learning. We have not had any projects that use maven so everything is brand new for us. With some luck, we will quickly get up to speed, so any help or pointers you can provide, any tutorials or blogs to read, anything that could help us learn how to do maven properly would be appreciated.
@byrnHDF I'm trying to use the Maven artifacts published in github packages, but there are several issues.
- I'm using my github username/token pair successfully with other projects, but not with HDFGroup/hdf5:
Could not find artifact org.hdfgroup:hdf5-java-jni:jar:windows-x86_64:2.0.0-SNAPSHOT in github-hdfgroup-hdf5 (https://maven.pkg.github.com/HDFGroup/hdf5)
I'm not sure what the problem is as I can see the packages in https://github.com/orgs/HDFGroup/packages. I tried successfully with https://github.com/TobseF/HelloMaven which can be an example about how to publish using github actions.
- the Maven artifacts do not contain the native libraries. Then we would need a way to make the native libraries available at runtime. A way is with https://github.com/scijava/native-lib-loader
I can help you with this second part.
Thank you for your time and interest on this. This is our first experience with Maven artifacts and welcome any help from the community! The first release of anything is just a starting point for improvement.
Please take a look at the JavaCPP project: https://github.com/bytedeco/javacpp-presets/blob/master/hdf5%2FREADME.md
https://central.sonatype.com/artifact/org.bytedeco/hdf5-platform
They have been publishing native HDF5 libraries on maven for years, although we could use help updating this for recent versions.
@saudet is the main developer there. I highly suggest cooperation before trying to reinvent the wheel.
There are a number of issues that could your help: https://github.com/search?q=org%3Abytedeco+hdf5&type=issues
In particular, the build script here would benefit Immediately from HDF Group expertise: https://github.com/bytedeco/javacpp-presets/blob/master/hdf5/cppbuild.sh
Regarding thr SciJava project, @ctrueden and I have discussed this in the past. This would be an alternative mechanism, but we lack the infrastructure to keep up with HDF development.
Scijava does refer to the JavaCPP maven artifacts that I referred to above: https://github.com/scijava/pom-scijava/blob/master/pom.xml
- the Maven artifacts do not contain the native libraries. Then we would need a way to make the native libraries available at runtime. A way is with https://github.com/scijava/native-lib-loader
I can help you with this second part.
I created a repo with how the final stage (at least for the JNI version) could be: https://github.com/matteodg/hdf5-java