https://bugzilla.redhat.com/show_bug.cgi?id=1231430
Bug ID: 1231430 Summary: Missing jinterface maven metadata Product: Fedora Version: rawhide Component: erlang Assignee: lemenkov@gmail.com Reporter: puntogil@libero.it QA Contact: extras-qa@fedoraproject.org CC: erlang@lists.fedoraproject.org, lemenkov@gmail.com, rhbugs@n-dimensional.de, s@shk.io
Description of problem: erlang-jinterface do not provides maven metadata, which used by some projects e.g. https://github.com/spring-projects/spring-amqp/ (spring-erlang sub module)
The pom file is available but is not installed https://github.com/erlang/otp/blob/maint/lib/jinterface/java_src/pom.xml.src https://fedoraproject.org/wiki/Packaging:Java#Maven_pom.xml_files and the JAR file should be placed in %_javadir https://fedoraproject.org/wiki/Packaging:Java#JAR_file_installation
The spec file "should be" modified in this way:
%if %{?fedora} >= 21 BuildRequires: javapackages-local %else BuildRequires: maven-local %endif
jinterface_lib_dir="$(ls -d1 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/jinterface-*/ | sed "s,^$RPM_BUILD_ROOT,,")" test -d "$RPM_BUILD_ROOT$jinterface_lib_dir"
rm -rf "${jinterface_lib_dir}priv/OtpErlang.jar"
if the pom file is not processed sed 's/%VSN%/%{version}/' <otp/lib/jinterface/java_src/pom.xml.src >pom.xml
generates maven metadata %mvn_artifact [path of the processed pom file]/pom.xml [path of the built java library]/[name of the java library].jar
install JAR file in %_javadir and generate a its symlink
%mvn_file org.erlang.otp:jinterface erlang/OtpErlang ${jinterface_lib_dir}priv/OtpErlang %mvn_install
Version-Release number of selected component (if applicable): All
How reproducible: Always