Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Maven error "ffi requires Ruby version >= 2.3", but Ruby is 2.3.3

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am trying to create a WAR file in Maven, but the build stops with the following:

[INFO] Building DSpace XML-UI Mirage2 Theme :: Local Customisations 6.3  [4/13]
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java) @ xmlui-mirage2 ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ xmlui-mirage2 ---
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (default) @ xmlui-mirage2 ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks

main:
    [echo] PATH=/usr/bin/maven/bin:/usr/bin/maven/bin:/usr/bin/maven/bin:/usr/bin/maven/bin:/usr/bin/maven/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
    [echo] GEM_PATH=/usr/lib/ruby/gems/2.3.0
    [echo] GEM_HOME=/usr/bin
    [echo] mirage2.deps.included=true
    [echo] grunt.color.scheme=classic_mirage_color_scheme
    [echo] grunt.environment=prod
    [echo] source=/opt/dspace/dspace/modules/xmlui-mirage2/src/main/webapp/themes/
[INFO] Executed tasks
[INFO]
[INFO] --- gem-maven-plugin:1.0.6:initialize (default) @ xmlui-mirage2 ---
[WARNING] ERROR:  Error installing /home/dspace/.m2/repository/rubygems/rb-inotify/0.10.1/rb-inotify-0.10.1.gem:
[WARNING]       rb-inotify requires Ruby version >= 2.2.
[WARNING] ERROR:  Error installing /home/dspace/.m2/repository/rubygems/ffi/1.13.1/ffi-1.13.1.gem:
[WARNING]       ffi requires Ruby version >= 2.3.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for DSpace Parent Project 6.3:
[INFO]
[INFO] DSpace Parent Project .............................. SUCCESS [  1.410 s]
[INFO] DSpace Addon Modules ............................... SUCCESS [  0.048 s]
[INFO] DSpace Kernel :: Additions and Local Customizations  SUCCESS [  6.112 s]
[INFO] DSpace XML-UI Mirage2 Theme :: Local Customisations  FAILURE [ 18.103 s]
[INFO] DSpace XML-UI (Manakin) :: Local Customizations .... SKIPPED
[INFO] DSpace JSP-UI :: Local Customizations .............. SKIPPED
[INFO] DSpace RDF :: Local Customizations ................. SKIPPED
[INFO] DSpace REST :: Local Customizations ................ SKIPPED
[INFO] DSpace SWORD :: Local Customizations ............... SKIPPED
[INFO] DSpace SWORD v2 :: Local Customizations ............ SKIPPED
[INFO] DSpace SOLR :: Local Customizations ................ SKIPPED
[INFO] DSpace OAI-PMH :: Local Customizations ............. SKIPPED
[INFO] DSpace Assembly and Configuration .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  26.525 s
[INFO] Finished at: 2020-09-29T22:16:45+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal de.saumya.mojo:gem-maven-plugin:1.0.6:initialize (default) on project xmlui-mirage2: Execution default of goal de.saumya.mojo:gem-maven-plugin:1.0.6:initialize failed: Java returned: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.saumya.mojo:gem-maven-plugin:1.0.6:initialize (default) on project xmlui-mirage2: Execution default of goal de.saumya.mojo:gem-maven-plugin:1.0.6:initialize failed: Java returned: 1

The problem is that my Ruby version is 2.3.3:

dspace@dstest:/opt/dspace$ ruby -v
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]

What am I doing wrong? Did I set GEM_HOME and GEM_PATH incorrectly?

 
Saloon Keeper
Posts: 12419
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please show us your POM.
 
Stephan van Hulst
Saloon Keeper
Posts: 12419
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How did you install Ruby? Did you use RVM?
 
Diego Schiavon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I installed Ruby with apt.

My pom.xml is fairly long, I cannot paste it in one go and I am not able to attach it to this post. I will paste it in chunks in successive posts:
 
Stephan van Hulst
Saloon Keeper
Posts: 12419
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I can't help you because of the way you copied your POM. You copied and pasted overlapping segments, so it's hard to tell what lines are part of your actual POM and what parts are duplicates.

I removed your POM to make the topic more readable. Please post your POM again without overlapping segments, or post it in an online editor and I will copy it here in its entirety.
 
Diego Schiavon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apologies, my bad.

I pasted the pom.xml here: https://xmleditoronline.org/?id=fd3862bef8140e6b692f067f5d6b766e-wPaMOj
 
Saloon Keeper
Posts: 22648
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can tell you one thing. That POM seems to have an awful lot of explicit file directory references. Maven doesn't like that and it reduces the chance that one of Maven's major strengths can be exploited.  An ideal Maven project can be cleaned, ZIPped and sent to a completely new system on the other side of the planet then rebuilt exactly with only an installed JDK and copy of Maven. It should not require or assume any files or directories external to the project itself. Maven should be allowed to build into its standard build areas (in the target directory) without being told via symbolic substitution. Maven isn't Ant and works very differently than Ant.

Beyond that, this appears to be a multi-language build. For that, I'd recommend something more like Gradle, which, unlike Maven is not as focused on Java and Java alone.
 
Diego Schiavon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answer Tim.
Unfortunately I am not in the position to choose which build tool I want to use. I am not a programmer and I am not changing the code, I only need to get a WAR file from Maven and deploy it on Tomcat.
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic