Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing SIGAR with maven
    text
    copied!<p>I'm currently trying to use Sigar in a maven-build, and it says everytime:</p> <p>"org.hyperic.sigar.SigarException: no libsigar-x86-linux.so in java.library.path"</p> <p>I've installed Sigar to maven with mvn install:install-file -DgroupId=org.hyperic -DartifactId=sigar -Dversion=1.6.4 -Dpackaging=jar -Dfile=sigar.jar (where sigar.jar is a jar only with the files in the org-folder, and the maven dependency with the things in the lib-folder), but then it does not find the .so-file.</p> <p>I've tried to find answers, who mostly say one should unzip the files like <a href="https://stackoverflow.com/questions/5388661/unzip-dependency-in-maven">Unzip dependency in maven</a> . Unzipping (after installing the other things via install:install-file) does work fine, but the file isn't included in the path after all.</p> <p>Then I've tried to find something to include the files in the build path, so I did something like this: <a href="https://stackoverflow.com/questions/10226082/surefire-junit-testing-using-native-libraries">Surefire JUnit Testing using Native Libraries</a> (I want to use sigar in the tests), but this also doesn't change anything. I've tried it with many different folders, and even adding the file itself and not the folder it is in to the library path, but even this:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;forkMode&gt;once&lt;/forkMode&gt; &lt;argLine&gt;-Djava.library.path=${project.build.directory}/lib/libsigar-x86-linux.so&lt;/argLine&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>does not work, but the file is clearly there. I'm using maven 2.2.1.</p> <p>Has anybody an hint how to get sigar in this context working?</p> <p>Thanks in advance, DaGeRe</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload