It works !
Thank you.

Now my problem is that I wanted to do this :
<environmentVariables>
    <key>${path.name}</key>
    <value>${project.build.directory}/thirdparty/vtk/lib/vtk-5.4/</value>
 </environmentVariables>

Because on Mac, the environment variable is DYLD_LIBRARY_PATH, on Linux, its 
LD_LIBRARY_PATH and on Windows PATH.
I guess I can't do it anymore... Is there a wa to do it ? Using profiles maybe ?

Thanks

Benoît

Le 21 mai 2010 à 04:52, Marshall Schor a écrit :

> Maybe you need to set the <environmentVariables> this way (see [1]):
> 
> <environmentVariables>
>  <DYLD_LIBRARY_PATH>
>    ${project.build.directory}/thirdparty/vtk/lib/vtk-5.4/
>  </DYLD_LIBRARY_PATH>
> </environmentVariables>
> 
> -Marshall Schor
> 
> [1]
> http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Mapping_Maps
> 
> On 5/20/2010 9:48 AM, Thiébault Benoît wrote:
>> Hi everyone,
>> 
>> I'm trying to execute a Java program accessing native components, following 
>> the very good blog post http://www.buildanddeploy.com/node/17
>> I however have a problem setting environment variables within the exec 
>> plugin. Here is an extract of my POM :
>> 
>> <plugin>
>>                <groupId>org.codehaus.mojo</groupId>
>>                <artifactId>exec-maven-plugin</artifactId>
>>                <version>1.1</version>
>>                <executions>
>>                    <execution>
>>                        <goals>
>>                            <goal>exec</goal>
>>                        </goals>
>>                    </execution>
>>                </executions>
>>                <configuration>
>>                    <environmentVariables>
>>                        <key>DYLD_LIBRARY_PATH</key>
>>                        
>> <value>${project.build.directory}/thirdparty/vtk/lib/vtk-5.4/</value>
>>                    </environmentVariables>
>>                    <executable>java</executable>
>>                    <arguments>
>>                        <argument>-classpath</argument>
>>                        <classpath />
>>                        <argument>
>>                            com.artenum.vtk.maven.ConeDemo
>>                        </argument>
>>                    </arguments>
>>                </configuration>
>>            </plugin>
>> 
>> When I run it, I have a java.lang.UnsatisfiedLinkError.
>> If I do 
>> export DYLD_LIBRARY_PATH=mypath
>> then it works...
>> 
>> Do you know what is wrong in my exec configuration ?
>> 
>> Thank you
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to