Questions tagged [native-maven-plugin]

13 questions
5
votes
3 answers

maven-nar-plugin vs native-maven-plugin, which is better?

I am going to create a java project that uses JNI. I want to deploy the project as a stand-alone application, but some modules might be used as libraries of other applications as well. I want to support different platforms and everything should be…
4
votes
1 answer

Force relative debug symbol path (maven-native-plugin)

I am using the native-maven-plugin to compile a shared library on linux. I pass the compiler option -g to enable the debug symbol generation. Here is an excerpt from the POM: org.codehaus.mojo
Alexander
  • 1,068
  • 6
  • 22
3
votes
2 answers

Java JNI Maven native-maven-plugin - how to set shared library final name

I am playing around with JNI and Maven to see how to automate the building process. I am encountering some difficulties on Linux platform when it comes to the output file name. When I run the maven build (below is the pom.xml for the linux…
Alex Burdusel
  • 3,015
  • 5
  • 38
  • 49
2
votes
0 answers

Run native tests without JVM tests in Spring Boot 3

Spring 6/Spring Boot 3 allows to run tests using GraalVM's native-image with mvn -Pnative test. This uses the native-maven-plugin. This plugin respects both -DskipTests and -Dmaven.test.skip and there is also a flag -DskipNativeTests to skip native…
1
vote
0 answers

Build c program with Maven?

I have a maven project where I'm building a docker image (using the fabric8 docker-maven-plugin). As part of the build, I want to compile a simple C class: #include #include #include #include int…
rmf
  • 625
  • 2
  • 9
  • 39
1
vote
1 answer

native-maven-plugin fails on "a" packaging type

I am unable to get through the first step of using Maven's native-maven-plugin. I've seen a few posts regarding complications with it, but my pom.xml fails before any of that with: [ERROR] The build could not read 1 project -> [Help…
Paul Munsey
  • 109
  • 1
  • 2
1
vote
1 answer

native-maven-plugin error with msvc compiler "The command line is too long."

I'm trying to build a cpp lib via maven using native-mvn-plugin. However, during the linking part, i'm encountering an error saying "The command line is too long" As for the configuration, im having…
0
votes
0 answers

How to load custom property file located inside a folder in resources in graalvm native image?

I am migrating an existing spring boot project to spring boot native project. In my native spring boot project I have a property file alternate.properties in the location: resources/config/prod/alternate.properties. This file is manually being…
0
votes
0 answers

custom runtime issue with native-maven-plugin having metadataRepository enabled

I have an app built with Spring Boot 3.0.0-M5, Spring Cloud 2022.0.0-M4, Java 17. Its GitHub repo is https://github.com/wenqiglantz/springboot3-webclient/tree/metadata. I am trying to achieve the following: Enable metadataRepository configuration…
0
votes
2 answers

How to get JUnit tests to run after JNI .so creation with native-maven plugin

I have a project that creates both a jni .so file and a java .jar file. All this is working as expected except JUnit test execution. I need the JUnit test to run after the native-maven-plugin creates the .so file. JUnit test will always fail when…
musterjunk
  • 341
  • 3
  • 15
0
votes
1 answer

How to Avoid needing to set LD_LIBRARY_PATH ld : collect2 fails

Is there a command line option equivalent to LD_LIBRARY_PATH for linking? I build native via native-maven-plugin which lack support for setting environment variables and setting prior to maven breaks my other modules. I need to either find an…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
0
votes
1 answer

native-maven-plugin jni osx pom

I'm trying add a JNI library written in c/cpp to a java project. The java project is called Subsonic, it's a media server. I want to add support for .spc files so I wrote some JNI to make that happen. I just don't understand maven very well. This…
Programmer9000
  • 1,959
  • 3
  • 17
  • 27
0
votes
2 answers

No basedir set from native-maven-plugin

I'm having some trouble getting the maven native plugin to work. The problem is that I'm getting an IllegalStateException: "No basedir set" when compiling. The stacktrace follows: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to…