Maven Build Failure releated to com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin - s4sdk

I am facing an issue during the Maven build. The issue on my
terminal is: [ERROR] Failed to execute goal
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.12.0:usage-analytics
(default) on project demo-generator-application: Execution default
of goal
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.12.0:usage-analytics
failed: Plugin
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.12.0 or one of its
dependencies could not be resolved: Failed to collect dependencies
at com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:jar:2.12.0 ->
com.sap.cloud.s4hana.plugins:usage-analytics:jar:2.12.1-M1: Failed
to read artifact descriptor for
com.sap.cloud.s4hana.plugins:usage-analytics:jar:2.12.1-M1: Failure
to find com.sap.cloud.s4hana:sdk-modules-bom:pom:2.12.1-M1 in
https://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced -> [Help 1]
The maven project I used can be found here:
https://github.com/SAP/cloud-s4-sdk-examples/blob/master/VDMGenerator/application
The document can be found:
https://blogs.sap.com/2018/04/30/deep-dive-10-with-sap-s4hana-cloud-sdk-generating-java-vdm-for-s4hana-custom-odata-service/

Please try to run mvn clean install -U to force an update of dependencies.

Related

Building dss library lastest version

Dear members of support,
I am trying to build the dss code from master branch. But I get
[ERROR] Failed to execute goal on project dss-asic-xades: Could not resolve dependencies for project eu.europa.ec.joinup.sd-dss:dss-asic-xades:jar:5.8.RC1: Failure to find eu.europa.ec.joinup.sd-dss:dss-asic-common:jar:tests:5.8.RC1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
but dependency exists. See here
Could you help me, please?

Error: Failed to execute goal on project xxxx inside jenkins build

when i run the build in jenkins i got below error when i am trying to run in local its building fine.
[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project xxx:xxx-bin:pom:10-2.1.0-test: The following artifacts could not be resolved: xxx-alerts:alerts-loader:jar:xxx:3-95210ce313-2.1.0-test, xxx-alerts:alerts-loader:zip:resources:3-95210ce313-2.1.0-test: Failure to find xxx-alerts:alerts-loader:jar:deps:3-95210ce313-2.1.0-test in http://xxx:8080/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
[ERROR]
Delete ~.m2\repository and this should work for you.
Also, make sure u run the mvn command with clean before install

Spring MVC issues in STS 3.7.3

I am getting this error on importing https://github.com/spring-projects/spring-mvc-showcase in STS 3.7.3:---
Description Resource Path Location Type
Failure to transfer org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from/to central: connect timed out pom.xml /spring-mvc-showcase line 1 Maven pom Loading Problem
Edit
Mvn is ok now but pom.xml error still persists if I remove the errors and do maven clean I get errors as:
[INFO] https://repo.maven.apache.org/maven2/org/codehaus/mojo/aspectj-maven-plugin/1.2/aspectj-maven-plugin-1.2.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [ERROR] Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:aspectj-maven-plugin:jar:1.2: Could not transfer artifact org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from/to central: connect timed out -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
First of all STS is build on Eclipse. So you can easily install the IDE Integration Eclipse IDE - M2Eclipse for STS. You can see how here. If you want to use it with this integration plugin you dont need to have a local maven repository.
Resolving Maven dependencies from the Eclipse workspace without installing to local Maven repository
But its also possible to use maven as a local system repository. Download is here and follow the steps for the installation and configuration here.
To see if you have a valid maven installation done, you can test it by typing mvn -v in a cmd shell or using STS -> right click on your project -> run as -> maven build or maven install.
Update:
I would say delete the project from your workspace and try it again. Download the project from gitHub as a zip file and import it again to your workspace. Right Click -> import -> existing maven project.
If you need to use a proxy for your connection you have to create a settings.xml in your .m2 folder. Look here for more info

Different maven build result from Jenkins than directly

I'm setting up Jenkins for an existing maven project. When a build runs, the Jenkins console shows the following error (filenames/URLs changed):
[ERROR] Failed to execute goal on project: Could not resolve dependencies for project: Failure to find (file jar) in http://example.com:8081/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of repo has elapsed or updates are forced -> [Help 1]
[ERROR]
When I cd /var/lib/jenkins/jobs/Project/workspace and run mvn package myself, the build completes successfully.
I've tried forcing/cleaning, I've tried deleting the Jenkins project and re-adding.
How can I force the build through Jenkins, or what could be causing the cache error?

Archiva/Maven failed to execute goal

When I try to build using Archiva/Maven, the system return this message:
Failed to execute goal on project ... The following artifacts could not be resolved: net.sf.josql:josql:jar:1.5, net.sf.josql:gentlyweb-utils:jar:1.5: Failure to find net.sf.josql:josql:jar:1.5 in ... repository/internal was cached in the local repository, resolution will not be reattempted until the update interval of ... has elapsed or updates are forced -> [Help 1]
How can I fix this?
Remove from your local repository directory (or all file with version 1.5):
$M2_HOME/repository/net/fs/josql/josql
It only work when I change from Archiva to Maven (local). Need further investigation...

Resources