English French
Hardcoded paths
Packages MUST NOT hardcode paths to JAR files they use. When package needs to reference a JAR file, packager SHOULD use one of tools designed to locating JAR files in the system.
Maven pom.xml files
If upstream project is shipping Maven `+pom.xml+` files, these MUST be installed. Additionally package MUST install mapping between upstream artifact and filesystem by using the `+%mvn_install+` macro.
If upstream project does not ship Maven `+pom.xml+` file, official https://mvnrepository.com/[maven repository] should be searched and if there are `+pom.xml+` files they SHOULD be installed.
If modifications to Maven pom.xml files are needed `+%pom_*+` family of macros SHOULD be used
Wrapper Scripts
Applications wishing to provide a convenient method of execution SHOULD provide a wrapper script in `+%{_bindir}+`. Packages SHOULD use `+%jpackage_script+` to create these wrapper scripts.
Compatibility packages
In certain cases it might be necessary to create compatibility packages that provide older API/ABI level of the same library. However creating these compatibility packages is strongly discouraged. To standardize and simplify packaging of such compatibility packages following rules apply:
Compatibility packages MUST be named in the same way as original except addition of version to package name,
Any JAR and POM files MUST be versioned.
Packaging JAR files that use JNI
Applicability
Java programs that wish to make calls into native libraries do so via the Java Native Interface (JNI). A Java package uses JNI if it contains a .so file. Note that this file can be embedded within JAR files themselves.
Guideline
JNI packages MUST follow guidelines of ordinary Java packages with exceptions listed here
JAR files using JNI or containing JNI shared objects themselves MUST be placed in `+%{_jnidir}+` and MAY be symlinked to `+%{_libdir}/%{name}+`.
JNI shared objects MUST be placed in `+%{_libdir}/%{name}+`