cancel
Showing results for 
Search instead for 
Did you mean: 

Missing Maven dependencies with CAP Java 1.4 and 1.5.1

vfweiss
Participant
0 Kudos

Dear CAP Java Experts,

As I am trying to help others with using CAP Java, I am trying to get a minor template application working. As theory crafting how things might be in Java from a NodeJS perspective only gets you so far.

However I am already running into issues in the early stages of creating an app.

I have a new Dev Space in the Business Application Studio to start my development and generated a starter app with the yeoman generator. (After having updated the cds-dk package to 1.8.2 as the default available version 1.7.1 didn't work).

Now I noticed that cds-dk ~1.8.0 generates a 1.4.0 boiler plate application, ah well, let's first get it running.. So I fire up the terminal and as noted down at https://cap.cloud.sap/docs/java/getting-started#install-java--maven

I start it with:
mvn spring-boot:run

Which shortly after fails:

[ERROR] Failed to execute goal on project CAPJavaTemplate: Could not resolve dependencies for project customer:CAPJavaTemplate:jar:1.0-SNAPSHOT: Failure tofind com.sap.cds:cds-feature-mt:jar:1.4.0in https://repo.maven.apache.org/maven2/ was cached in the local repository,resolution will not be reattempted until the update interval ofpublic has elapsed or updates are forced ->[Help1]

As I check the mentioned repo, I only notice the 1.5.1 jar, so I update my pom.xml to list 1.5.1 and run the command again.
This time it fails on other files:

[ERROR] Failed to execute goal on project CAPJavaTemplate: Could not resolve dependencies for project customer:CAPJavaTemplate:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: com.sap.xsa.core.instancemanager:client:pom:1.15.4, com.sap.cloud.instancemanager:client-api:jar:1.15.3, com.sap.cloud.instancemanager:util:jar:1.15.3: Failure tofind com.sap.xsa.core.instancemanager:client:pom:1.15.4in https://repo.maven.apache.org/maven2/ was cached in the local repository,resolution will not be reattempted until the update interval ofpublic has elapsed or updates are forced ->[Help1]

Ok, now I am at a loss.

It's been ages that I have written any Java, so maybe it's something small, but how can I fix this?

BTW also manually followed through with both the quick start cds init as well as the Maven Archetype as described here:
https://cap.cloud.sap/docs/java/getting-started#install-java--maven
And both will result in one of the errors (1.4 vs 1.5.1)

Accepted Solutions (1)

Accepted Solutions (1)

vfweiss
Participant

Apparently cds-feature-mt is still not usable and now also the default templates are affected.

Fixable by excluding that feature as also done in the sample app:
https://github.com/SAP-samples/cloud-cap-samples-java/commit/32f6ca62be209283cd1a7688d18c8e0b4666feb...

Answers (0)