Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon PA API 5.0 migration - Cannot find Maven SDK dependency (public repository)

I need to do Amazon PA API Migration on March. I'm trying to find a Maven public repository where is published the 'PA API 5.0 sdk'.

This is the official documentation : link

It says :

  1. Download paapi5-java-sdk-and-samples archive and unzip it.
  2. Open the project in any editor of your preference.
  3. Add all jars present in dependencies folder to the build path.

It's not professional and not maintainable doing like this..

Also many of these jars are old versions (2016 like).

I've tried to contact AWS PA API support but I've got generic response (read documentation etc.)

Suggestions? Do you know Java unofficial libraries? Thanks

like image 513
Luca Zoffoli Avatar asked Feb 22 '20 08:02

Luca Zoffoli


2 Answers

Same here. There is only an old maven sdk available. I cannot even import correctly the jar on intellij idea. The IDE is able to find alle the classes needed by the examples, but on building it says: "error: package com.amazon.paapi5.v1 does not exist". I added the jar with this procedure

like image 154
QuasarLex Avatar answered Sep 28 '22 03:09

QuasarLex


I have the same problem and totally agree that it's not professional and not maintainable at all.

My current workaround is just to integrate manually the paapi5-java-sdk-1.0.0.jar and then figure out what other dependencies were missing, and which one I don't need (for example junit-4.12.jar does not make not much sense for me when I just want to use it in production).

You might already having some dependencies in place that you don't need to add. For example you might already have Jackson. So don't add this to your pom.

All other dependencies that you need, instead of using the jar files, just add the offical repo of them to your pom as usual with the same version as you find in the zip file. That way you have the least manual dependencies as currently possible and are sure all additional dependencies work fine with the Amazon SDK.

In my case I just had to add okhttp, okio, gson, gson-fire and threetenbp from the offical repo.

like image 26
wprogLK Avatar answered Sep 28 '22 01:09

wprogLK