https://bugzilla.redhat.com/show_bug.cgi?id=1231430

            Bug ID: 1231430
           Summary: Missing jinterface maven metadata
           Product: Fedora
           Version: rawhide
         Component: erlang
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]



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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
erlang mailing list
[email protected]
https://lists.fedoraproject.org/mailman/listinfo/erlang

Reply via email to