I've created a test which extends GWTTestCase but I'm getting this error:
mvn integration-test gwt:test
...
Running com.myproject.test.ui.GwtTestMyFirstTestCase
Translatable source found in...
[WARN] No source path entries; expect subsequent failures
[ERROR] Unable to find type 'java.lang.Object'
[ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.1 sec <<< FAILURE!
GwtTestMyFirstTestCase.java is in /src/test/java, while the GWT module is located in src/main/java. I assume this shouldn't be a problem.
I've done everything required according to http://mojo.codehaus.org/gwt-maven-plugin/user-guide/testing.html and of course that my gwt module already has com.google.gwt.core.Core indirectly imported.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myproject</groupId>
<artifactId>main</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Main Module</name>
<properties>
<gwt.module>com.myproject.MainModule</gwt.module>
</properties>
<parent>
<groupId>com.myproject</groupId>
<artifactId>app</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.myproject</groupId>
<artifactId>app-commons</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<outputFile>../app/src/main/webapp/WEB-INF/main.tree</outputFile>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classesDirectory>
${project.build.directory}/${project.build.finalName}/${gwt.module}
</classesDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Here is the test case, located in /src/test/java/com/myproject/test/ui
public class GwtTestMyFirstTestCase extends GWTTestCase {
#Override
public String getModuleName() {
return "com.myproject.MainModule";
}
public void testSomething() {
}
}
Here is the gwt module I'm trying to test, located in src/main/java/com/myproject/MainModule.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.1/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name='com.myproject.Commons' />
<source path="site" />
<source path="com.myproject.test.ui" />
<set-property name="gwt.suppressNonStaticFinalFieldWarnings" value="true" />
<entry-point class='com.myproject.site.SiteModuleEntry' />
</module>
Can anyone give me a hint or two about what I'm doing wrong?
To reproduce the solution used by KevinWong from the maven-gwt-plugin doc, which worked for me after losing over an hour trying the other solutions.
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
<additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
</additionalClasspathElements>
<useManifestOnlyJar>false</useManifestOnlyJar>
<forkMode>always</forkMode>
<systemProperties>
<property>
<name>gwt.args</name>
<value>-out \${webAppDirectory}</value>
</property>
</systemProperties>
</configuration>
</plugin>
I don't think the right thing to do is just to exclude the tests from your maven life cycle. What's the point of writen them? What you have to do is to properly configure the maven-surefire-plugin in order to make it work.
You see, that plugin uses a system classloader to look up the classes but GWTTestCase needs an URLClassLoader. That's the reason you are getting [WARN] No source path entries; expect subsequent failures. and the following ClassNotFoundException. No worries, though. It's easy to tell maven to use a URLClassLoader instead:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/src/main/java</additionalClasspathElement>
<additionalClasspathElement>${basedir}/src/test/java</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
Please, notice the <userSystemClassLoader>false</useSystemClassLoader> entry.
Also, notice that I added the sources of my tests and main directories in order to allow GWT find the needed classes to generate the Javascript. You might need to configure it differently.
The problem was that the test was run by surefire instead of gwt-maven plugin. I had to explicitly exclude my gwt tests from surefire plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*GwtTest*.java</exclude>
<exclude>**/*Gwt*Suite*.java</exclude>
</excludes>
</configuration>
</plugin>
I still can't run my GWTTestCase tests, but that's another problem and subject for another question. I consider this issue solved.
First exclude gwt testcases from maven-surefire-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<excludes>
<exclude>**/*GwtTest.java</exclude>
</excludes>
</configuration>
</plugin>
Then configure gwt-maven-plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.5.0</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>**/*GwtTest.java</includes>
<mode>htmlunit</mode>
</configuration>
</plugin>
Now you can easily run gwt testcases using gwt:test.
I am very confident that this error has nothing to do with maven setup. My first guess would be that tests are not on gwt compile path... I guess the problematic source code is:
<source path="com.myproject.test.ui" />
try changing to:
<source path="com/myproject/test/ui" />
or whatever is the appropriate path.
the solution to this
"[ERROR] Unable to find type 'java.lang.Object'
[ant:java] [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core'
either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')"
GWT compilation error is to use "fork='true'" when invoking GWT compiler.
that's why the solutions posted here magically worked - they have "forkMode=always" and similar.
here's how I call GWT compiler:
ant.java(classname: 'com.google.gwt.dev.Compiler', failOnError: 'yes', maxmemory: '1000m', fork: 'true')
and here's the full GWT compiler call in Gradle:
war {
// Exclude unneccessery GWT Compiler artifacts
exclude "**/gwt-unitCache/**"
}
task widgetset << {
// Create widgetset directory (if needed)
def created = (new File(gwtBuildDir)).mkdirs()
// Compile
ant.java(classname: 'com.google.gwt.dev.Compiler', failOnError: 'yes', maxmemory: '1000m', fork: 'true')
{
classpath {
pathElement(path: configurations.compile.asPath)
pathElement(path: sourceSets.main.runtimeClasspath.asPath)
sourceSets.main.java.srcDirs.each {
pathelement(location: it.absolutePath)
}
}
arg(line: '-war ' + gwtBuildDir)
arg(line: '-logLevel INFO')
arg(line: '-style OBF')
arg(line: '-localWorkers 2')
arg(line: widgetsetClass)
// jvmarg(value: '-Djava.awt.headless=true')
// jvmarg(value: '-XX:MaxPermSize=256M')
// jvmarg(value: '-Xmx500M')
}
}
// Require widgetset compilation before WAR is built
war.dependsOn widgetset
This sunfire config worked for me.
Related
I have just started with java dev. I am given a task of doing object serialization of avro format. I have broken my head trying different methods. The different IDEs and different tools, none of which have I been able to use to solve the issue, moreover they have made everything more complex and frustrating. I tried following a tutorial which didnt use an IDE per say but that was also unsuccessful as the Serialize.java class wasnt compiling. I'm presently trying to achieve the task using maven plugins and dependencies. I have just made a new Maven project on Intellij. This is my pom.xml where I have pasted the dependencies and plugins for avro format:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>avroTrial2</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.10.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.10.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.source>12</maven.compiler.source>
<maven.compiler.target>12</maven.compiler.target>
</properties>
</project>
The second plugin shows an error, I have done the maven syncing on intellij and thats how the error from first plugin was rectified. Now the error being shown is : "Plugin 'org.apache.maven.plugins:maven-compiler-plugin:' not found". I need to deal with this error first before I can go and get stuck on some avro error after this.
This might be the reason behind it. The configuration part in the maven compiler plugin section and the properties basically do the same thing. You have configured twice and with different versions. It should be either one of them and in general should match with the java version you are using (more details could be found here.
This is not matching
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
with
<properties>
<maven.compiler.source>12</maven.compiler.source>
<maven.compiler.target>12</maven.compiler.target>
</properties>
and only use one of them.
I have encountered same problem so what I did to resolve it is:
Navigated to File->Settings in IntelliJ
Select Plugin from left bar and then I unchecked Maven plugin
Restarted the IDE
Again clicked on Plugin and checked Maven
Restarted the IDE
A few days ago i started with Maven. I have to put only a few of my dependencies in my generated jar file. This is needed because my code is only a plugin (Minecraft Plugin) executed by an api (Minecraft Server Software Spigot). Now the Problem is, that my Plugin depends on an other api (json-simple-1.1).
The last days i tried to edit the maven shade plugin to get the wished result. I failed, and now i did it in this way:
maven include the json-simple-1.1 api, i needing for my plugin
eclipse include the spigot api (Minecraft server software), which will executing my plugin
pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.falco.essentialsXXX</groupId>
<artifactId>EssentialsXXX-bungeecord</artifactId>
<version>0.0.1-SNAPSHOT</version>
<description>Basic class for every Plugin
</description>
<build>
<sourceDirectory>src</sourceDirectory>
<!-- COMPILE -->
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- BUILD -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-json</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
</project>
When i now execute 'mvn clean install' (in the right directory) i get many many errors. That make completely sense. Maven can not find types or classes and everything else comeing from the spigot-api.
My Problem is, that this isnt a real error because when the spigot-api execute my plugin i have the classes and types i need. Maven dont know that and dont compile my Programm :(
At this point a have no idea what to do. I read so many articles but i couldnt find a solution. Every article say ohhh an error here try to use tags and the right api values. That isnt what i need.
I need something like a "bypass" attribute for the compiler so the compiler know "yes this is an error but the coder knows what he does"
If you need something for compilation, it needs to be a Maven dependency.
So take that artifact, install it in your local repository and add it as dependency.
Then your compilation process will probably work.
Note that using a dependency does not mean that you have to include the dependency into the resulting jar.
In Gradle, we can specify different PMD configurations (including different rulesets) for the pmdMain and pmdTest source sets. e.g.
pmdMain {
ruleSetFiles = files("$javaBuildSystemRoot/src-pmd-rulesets.xml")
}
pmdTest {
ruleSetFiles = files("$javaBuildSystemRoot/test-pmd-rulesets.xml")
}
We want to be less stringent on test code than main code.
There is a separate maven based project, where we cannot use gradle currently.But for now, we would like to at least apply the 2 different rulesets based on main vs test. It is a single module single project, using the maven PMD plugin.
How do we do this in the Maven pom file?
It is "rather unconventional" to pmd over test sources, but that is not part of the question. :)
Using the executions tag and utilizing maven-pmd-plugin, you can do this with maven.
EDIT: In short & applied to the given input (and maybe more than you wanted/need), it enables/forces you to make both checks in every build:
<project><build><plugins>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.11.0</version> <!-- latest up-to-date -->
<executions>
<execution>
<id>pmd-execution</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rulesets>
<ruleset>/path/to/.../src-pmd-rulesets.xml</ruleset>
</rulesets>
</configuration>
</execution>
<execution>
<id>pmd-test-execution</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<includeTests>true</includeTests> <!-- this defaults to false! -->
<rulesets>
<ruleset>/path/to/.../test-pmd-rulesets.xml</ruleset>
</rulesets>
</configuration>
</execution>
</executions>
</plugin>
...
See also: Can I configure multiple plugin executions in pluginManagement, and choose from them in my child POM?
EDIT 2: If you indeed don't need "both executions" (in 1 build), but only "two configurations" for "different builds", then:
Maven Profiles fits your needs (with profiles ... your "possibilities converge to infinity") !
You would introduce profiles like:
<project>
...
<profiles>
<profile>
<id>pmdMain</id>
<properties>
<myPmdRuleSetLocation>/path/to/.../src-pmd-rulesets.xml</myPmdRuleSetLocation>
<myPmdTestsInclude>false</myPmdTestsInclude>
</properties>
</profile>
<profile>
<id>pmdTest</id>
<properties>
<myPmdRuleSetLocation>/path/to/.../test-pmd-rulesets.xml</myPmdRuleSetLocation>
<myPmdTestsInclude>true</myPmdTestsInclude>
</properties>
</profile>
<profiles>
...
</project>
And use it in your (single execution) pmd-plugin configuration:
...
<ruleset>${myPmdRuleSetLocation}</ruleset>
<includeTests>${myPmdTestsInclude}</includeTests>
...
Please read further on profiles and their activation.
(additionally <profile/> can contain & override <build/> tag!)
I am developing an eclipse plugin which needs an com.lmax.disruptor.It imports sun.misc. I have this in my p2 repository but when I maven build my plugin I am getting this error "unable to satisfy dependency from com.lmax.disruptor 3.2.0 to package sun.misc 0.0.0."
I have gone through the sites Resolve a dependency on package sun.misc with Tycho they are saying to create a plugin fragment but when I tried to create it and added export page as sun.misc, It is throwing an error like "package sun.misc doesnot exsist in the plugin".
How can solve this issue please help me with this.? Instead of creating new plugin fragment,is there is any possible way i can add in my plugin itself ?
Thanks,
As mentioned in oberlies' answer in the question you link to, you need to build a system bundle fragment, which exposes, i.e., exports, the sun.misc package. I don't know of any other way. However, this is easier than could be expected.
You do this by creating an OSGi MANIFEST.MF that exports sun.misc, and then bundle it into a fragment. This is done via Maven as follows.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>your.group</groupId>
<version>1.0.0</version>
<artifactId>your.group.fragment.sun.misc</artifactId>
<packaging>jar</packaging>
<name>System Bundle Fragment exporting sun.misc</name>
<description>This bundle extends the System Bundle export list with the sun.misc package such that OSGi bundles may refer to Sun's misc implementation without the OSGi framework itself to provide it in a non-portable way.</description>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<forceCreation>true</forceCreation>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Export-Package>sun.misc</Export-Package>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.4</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-Category>your.group</Bundle-Category>
<Fragment-Host>system.bundle; extension:=framework</Fragment-Host>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
Run mvn clean install on this POM. Now you need to make the fragment consumable for Tycho, i.e., you need to make it available via a p2 Software Site.
Thankfully there is a great Maven plugin which can help with that: reficio's p2-maven-plugin. You can use it to basically wrap any mavenized JAR into an OSGi bundle and then provide it via a p2 site.
Set up the respective POM as follows.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>sun-misc-p2</groupId>
<artifactId>site</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.reficio</groupId>
<artifactId>p2-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<artifacts>
<!-- specify your depencies here -->
<!-- groupId:artifactId:version -->
<artifact><id>com.lmax:disruptor:3.3.2</id></artifact>
<artifact><id>your.group:your.group.fragment.sun.misc:1.0.0</id></artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppSourceDirectory>${basedir}/target/repository/</webAppSourceDirectory>
<webApp>
<contextPath>/site</contextPath>
</webApp>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>reficio</id>
<url>http://repo.reficio.org/maven/</url>
</pluginRepository>
</pluginRepositories>
</project>
Note that I use this plugin to provide the LMAX Disruptor (version 3.3.2, the latest one at the time of writing, is thankfully available from Maven Central).
Run mvn p2:site on the POM. This will create a p2 site containing the sun.misc fragment at {project-folder}/target/repository.
This p2 repository - and with it the sun.misc fragment - can now be added to your target platform, and hence used in your Tycho build.
This should fix it, and - to answer your question if "there is any possible way [you] can add in [your] plugin itself" - this is the only possible way to do it (I know of).
The sources are also available at https://github.com/newcodeontheblock/eclipse-rcp-with-async-logging. The whole procedure is also described in more detail in this - my - blog post about using async Log4j 2 loggers in an Eclipse RCP.
I have two maven modules:
native-wrapper - is a JNI wrapper over system lib, that is build by nar-maven-plugin.
main-module - depends on native-wrapper and uses it's JNI calls during tests.
Tests in native-wrapper work fine. But, during tests in main-module, I get "UnsatisfiedLinkError" - NarSystem is unable to locate my JNI lib.
native-wrapper's pom includes:
...
<packaging>nar</packaging>
...
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.0.0-rc-2</version>
<extensions>true</extensions>
<configuration>
<libraries>
<library>
<type>jni</type>
<narSystemPackage>some.native.wrapper</narSystemPackage>
</library>
</libraries>
</configuration>
</plugin>
I opened generated .nar in ./target/ - it does contain "/lib/amd64-Linux-gpp/jni/libnative-wrapper-0.1.0-SNAPSHOT.so". The other nar (with java classes) contains "/META-INF/nar/some.native.wrapper/native-wrapper/nar.properties".
main-module's pom:
...
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>native-wrapper</artifactId>
<version>${project.version}</version>
<type>nar</type>
</dependency>
...
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.0.0-rc-2</version>
<extensions>true</extensions>
</plugin>
If I remove nar-maven-plugin plugin from main-module's pom, maven does not find any classes from native-wrapper module.
How can I make nar find the lib?
It seems like, one can't just add artifact with <type>nar</type> and run tests. You should set proper library path for java yourself. I did it like this (in addition to main-module's pom):
<packaging>nar</packaging>
...
<properties>
<LIBRARY_PATH>${project.build.directory}/nar/native-wrapper-${project.version}-amd64-Linux-gpp-jni/lib/amd64-Linux-gpp/jni/:${project.build.directory}</LIBRARY_PATH>
</properties>
...
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<environmentVariables>
<LD_LIBRARY_PATH>${LIBRARY_PATH}</LD_LIBRARY_PATH>
<DYLD_LIBRARY_PATH>${LIBRARY_PATH}</DYLD_LIBRARY_PATH>
</environmentVariables>
<systemProperties>
<property>
<name>java.library.tmpdir</name>
<value>${LIBRARY_PATH}</value>
</property>
<property>
<name>java.library.path</name>
<value>${LIBRARY_PATH}</value>
</property>
</systemProperties>
...
</plugin>