SAP-archive / teched2019-cloud-cf-product-list

Resources for SAP TechEd SEC364 Hands-on workshop, "Secure Microservices in Cloud Foundry Environment on SAP Cloud Platform".
Apache License 2.0
56 stars 50 forks source link

Missing POM dependencies #22

Closed mcanalesmayo closed 5 years ago

mcanalesmayo commented 5 years ago

Expected Behavior

Maven should fetch the required dependencies to build the Spring application artifact, which will be deployed in SAP Cloud Platform.

Current Behavior

Maven can't resolve the following dependencies:

Steps to reproduce the issue

Context

OS/Platform: macOS High Sierra 10.13.6 Maven version: 3.5.4

Stack trace/log output

Output of command mvn clean install:

[ERROR] Failed to execute goal on project product-list: Could not resolve dependencies for project com.sap.cp.cf.demoapps:product-list:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.sap.xs2.security:security-commons:jar:0.28.6, com.sap.xs2.security:java-container-security:jar:0.28.6, com.sap.security.nw.sso.linuxx86_64.opt:sapjwt.linuxx86_64:jar:1.1.19, com.sap.security.nw.sso.ntamd64.opt:sapjwt.ntamd64:jar:1.1.19, com.sap.security.nw.sso.linuxppc64.opt:sapjwt.linuxppc64:jar:1.1.19, com.sap.security.nw.sso.darwinintel64.opt:sapjwt.darwinintel64:jar:1.1.19: Could not find artifact com.sap.xs2.security:security-commons:jar:0.28.6 in central (https://repo.maven.apache.org/maven2)

Resolution

The above mentioned dependencies are not publicly available in the Maven Central repo. If SAP has its own public maven repo I suggest adding it to the POM. Otherwise, uploading the artifacts to the Maven Central repo would also work.

mwdb commented 5 years ago

Spring libraries are currently only delivered through SAP Marketplace. Please check https://github.com/SAP/cloud-cf-product-list-sample/blob/master/exercises/09_secure/Spring.md on how to download them.

Alterative is to use the SAP Java buildpack with a non-Spring Java application, see option 2 in step3 on https://github.com/SAP/cloud-cf-product-list-sample/blob/master/exercises/09_secure/README.md.

We're working on getting the Spring libraries to Maven Central, expected to be end of Q4 this year.

mcanalesmayo commented 5 years ago

Thanks for the quick response @mwdb. Downloading and installing the libraries in my local repo did the trick.

Hopefully everything will be set up in Maven Central by the end of this year.

mwdb commented 5 years ago

We have a first release candate for the spring libraries available at https://github.com/SAP/cloud-security-xsuaa-integration/tree/develop/samples/spring-security-xsuaa-usage