Skip to content
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

Draft: install SAP libs in the Maven local repository #13

Open
wants to merge 2 commits into
base: camel-3.20.1-branch
Choose a base branch
from

Conversation

johnpoth
Copy link

@johnpoth johnpoth commented May 3, 2023

DO NOT MERGE, DRAFT!

@cunningt @luigidemasi

As we discussed, this is a PR that demonstrates users installing the three SAP libraries in their Maven repository instead of using a lib folder. So for example using version 3.1.4 for sapjco and 3.1.1 for sapidoc on Linux x86 64 bit the user would have to run three commands:

  1. mvn install:install-file -DgroupId=com.sap.conn.jco -DartifactId=sapjco3 -Dversion=3.1.4 -Dpackaging=jar -Dfile=sapjco3.jar

  2. mvn install:install-file -DgroupId=com.sap.conn.idoc -DartifactId=sapidoc3 -Dversion=3.1.1 -Dpackaging=jar -Dfile=sapidoc3.jar

  3. mvn install:install-file -DgroupId=com.sap.conn.jco -DartifactId=sapjco3 -Dversion=3.1.4 -Dclassifier=linux-x86_64 -Dpackaging=so -Dfile=libsapjco3.so

Some drawbacks compared to using the lib folder strategy:

  1. If the user uses a different version for sapjco or sapidoc, he has to update the pom.xml
  2. The command for the native library is OS dependent so error prone. If a different classifier was used the pom.xml also has to be updated.
  3. The standalone version of the quickstarts (not sure if we should keep them here or not as this is for SpringBoot) uses the Camel Maven Plugin which doesn't have an option to add extra dependencies. We would therefore have to use the lib folder strategy.

Given those drawbacks I think I prefer keeping the lib folder strategy but maybe I'm missing something. We can improve on it as @luigidemasi suggested and use a single lib folder too.

Let me know what you think!

@cunningt
Copy link
Collaborator

cunningt commented May 3, 2023

Nice job - this would be a huge improvement over what we currently have. The only thing I worry about - and this doesn't really fall under the scope of this PR but is something I think we need to figure out when documenting the process - is how to explain to users which platform-dependent library (so, dylib, etc) they need for their particular platform. I guess we only have to worry about supported platforms, but I think we need to do some mapping there of platform to library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants