-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended search #35
Extended search #35
Conversation
* <ol> | ||
* <li> as "<code>${name}-${version}</code>" library name if the version can be determined. | ||
* <li> as "<code>${name}</code>" library name | ||
* </ol> | ||
* <li> system library path: This is where the JVM looks for JNI libraries by default. | ||
* <ol> | ||
* <li> as "<code>${name}${bit-model}-${version}</code>" library name if the version can be determined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add that? System library path (LD_LIBRARY_PATH
, rpath
) will unlikely contain the bit model. It looks unnecessary to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did I add to documentation what was done in code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then this is OK, assumed you have changed the code too. It's an unrelated change though.
* <li> as "<code>${name}-${version}</code>" library name if the version can be determined. | ||
* <li> as "<code>${name}</code>" library name | ||
* </ol> | ||
* <li> classpath path: If the JNI library can be found on the classpath, it will get extracted | ||
* and then loaded. This way you can embed your JNI libraries into your packaged JAR files. | ||
* They are looked up as resources in this order: | ||
* <ol> | ||
* <li> "<code>META-INF/native/${platform}/${arch}/${library}</code>": Store your library here if you want to embed | ||
* <li> "<code>META-INF/native/${platform}/${arch}/${library[-version]}</code>": Store your library here if you want to embed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this version necessary for our usecase? Especially because only one version of the native library should exist once in the classpath OR the JAR from central contains its version anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once again, I'm not judging anything: I'm just keeping existing features, even if I never used it myself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Looks good to me after review. |
Could you rebase your PR please ? |
|
||
if( customPath!=null ) { | ||
// Try to extract it to the custom path... | ||
File target = extract(errors, resource, prefix, suffix, file(customPath)); | ||
File target = extracttoTmpFile(errors, resource, tmpFilePrefix, tmpFileSuffix, file(customPath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extractToTmpFile
?
@@ -240,7 +284,7 @@ private boolean extractAndLoad(ArrayList<String> errors, String version, String | |||
|
|||
// Fall back to extracting to the tmp dir | |||
customPath = System.getProperty("java.io.tmpdir"); | |||
File target = extract(errors, resource, prefix, suffix, file(customPath)); | |||
File target = extracttoTmpFile(errors, resource, tmpFilePrefix, tmpFileSuffix, file(customPath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
* <ol> | ||
* <li> as "<code>${name}-${version}</code>" library name if the version can be determined. | ||
* <li> as "<code>${name}</code>" library name | ||
* </ol> | ||
* <li> system library path: This is where the JVM looks for JNI libraries by default. | ||
* <ol> | ||
* <li> as "<code>${name}${bit-model}-${version}</code>" library name if the version can be determined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then this is OK, assumed you have changed the code too. It's an unrelated change though.
* <li> as "<code>${name}-${version}</code>" library name if the version can be determined. | ||
* <li> as "<code>${name}</code>" library name | ||
* </ol> | ||
* <li> classpath path: If the JNI library can be found on the classpath, it will get extracted | ||
* and then loaded. This way you can embed your JNI libraries into your packaged JAR files. | ||
* They are looked up as resources in this order: | ||
* <ol> | ||
* <li> "<code>META-INF/native/${platform}/${arch}/${library}</code>": Store your library here if you want to embed | ||
* <li> "<code>META-INF/native/${platform}/${arch}/${library[-version]}</code>": Store your library here if you want to embed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Manually merged. |
Extended search in library.$name.path to do the same as in META-INF/native:
this will enable scenario where a distribution extracts native libraries to avoid temp file creation if the lib auto-extracts on each run
see https://issues.apache.org/jira/browse/MNG-6186 for a use case in Maven