I have the following script:
mylib is a library (for which I have sources, so I would like to put them in a Maven mylib project: mylib, for example). There is a jar dependency in this library, for which I only have a jar, and it cannot be found in the Maven repository (and I don't want to install it there). To compile it, something like this will work: add the jar file to the mylib project in the "lib" folder, for example. "lib / thirdpartylib.jar" and in mylib pom.xml, add the dependency with the group / artifact / version you selected and the entry " <scope>system</scope><systemPath>${project.basedir}/lib/thirdpartylib.jar</systemPath>
". The mylib project will compile fine.
Note that mylib also has a dependency on the executable in the dll file, say thirdparty.dll. But this is not important for compilation.
However, now I am wondering how to achieve the following:
Any other projects, for example. the "X" project that uses mylib will need
- mylib.jar - thirdpartylib.jar - thirdpartylib.dll
and he will have to install java.library.path in the directory (for example, "."), so that the third-party drum and dll will be found by the executing virtual machine.
My concern is this: I would like the jar / dll Thirdparty stuff to be responsible for the mylib project. That is, I want to determine the knowledge that you need to copy the thirdparty and dll jar to the target folder and that java.library.path refers to them to be part of the mylib project (mylib pom knows how it should be used in other projects). However, I need this knowledge (for example, copying instructions, no matter how accurately they are executed in Maven), to be transitively passed to any other project using mylib, for example X. Is this possible?
[My solution for hacking now will be that I have an instance of third-party things in X, but even then I donβt know how to copy / process the dll file, so I would have to write readme that said the dll file must be copied to the bin folder of the executing virtual machine).
Any suggestions are welcome!