You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2018/09/30 14:47:00 UTC
[jira] [Closed] (MNG-6400) can not work with a system dependency on
a unix / mac / windows project
[ https://issues.apache.org/jira/browse/MNG-6400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MNG-6400.
-------------------------------
Resolution: Incomplete
Fix Version/s: (was: waiting-for-feedback)
> can not work with a system dependency on a unix / mac / windows project
> -----------------------------------------------------------------------
>
> Key: MNG-6400
> URL: https://issues.apache.org/jira/browse/MNG-6400
> Project: Maven
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.5.3
> Environment: Windows 07
> Reporter: Terrien Jean-Yves
> Priority: Blocker
>
> the sapjco3.jar and sapIdoc3.jar jars can not be renamed.
> to work with you have to use an addiction system
> however, a unix / windows project can not have an identical absolute path on both systems.
> in previous versions of maven you can set properties in .m2 / settings.xml <sapidoc3> and <spajco3> and use <scope> system </ scope>
> <SystemPath> $ \{sapidoc3} </ systemPath>
> a warnning will be displayed.
> on version 3.5.3 it is an error.
> But that's not all because even putting the system dependency with an absolute path the jar is not found with the correct name
> <dependency>
> <groupId>de.sap</groupId>
> <artifactId>sapjco3</artifactId>
> <version>3.0.0</version>
> <scope>system</scope>
> <systemPath>D:/project-ati/libs/libsap/sapjco3.jar</systemPath>
> </dependency>
> JCO3 code
> protected boolean registerNativeMethods(Class<?> clazz){
> if(!initializedDLL){
> try{
> JCoRuntime.nativeLibraryPath = loadLibrary("sapjco3");
> initializedDLL = true;
> }catch(UnsatisfiedLinkError arg2){
> JCoRuntime.nativeLibraryPath = "not loaded, caused by " + arg2.toString();
> arg2.printStackTrace();
> throw arg2;
> }
> }
> return true;
> }
> java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865)
> at java.lang.Runtime.loadLibrary0(Runtime.java:870)
> at java.lang.System.loadLibrary(System.java:1122)
> at com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:444)
>
> The first sap-schema-plugin is a project with sap dependencies defined by an absolute path or property. it compiles well.
> the second project use this plugin.
> if the plugin project is compiled whith properties
> => error absolute pah is ${sapjco3}
> if the plugin project is compiled with absolute path
> => java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
>
> the same project without change with maven 3.3.9 works perfectly
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)