I'm trying to use "Renjin Maven plugin" to convert an R package to a jar that I can use with renjin in java. There is a description here: http://docs.renjin.org/en/latest/writing-renjin-extensions.html#renjin-maven-plugin on how to create the project, and I have managed to create it and build a jar with the r files converted, but I cannot see how to include c and fortran files.
Renjin does it for you if the package is in https://cran.r-project.org/ so I know it is possible. The package I'm using unfortunetely isn't in cran.
I have tried including the c files in the src/main/R folder and tried putting it in an src/main/c folder and they are ignored in both cases.
The renjin-maven-plugin supports converting c and fortran code into JVM bytecode. This section of the renjin-maven-plugin does the trick:
<execution>
<id>gnur-compile</id>
<phase>compile</phase>
<goals>
<goal>gnur-compile</goal>
</goals>
</execution>
See mjkallens answer to a similar question here. Basically what you do is
I created an example on github which should give you some ideas on the details.