There was an error while building the project in Jenkins today, the local build was fine
The error message is as follows
[ERROR] Failed to execute goal on project policy-info-common: Could not resolve dependencies for project com.hLM. Aircom :policy-info-common:jar: 1.0-snapshot: Failed to collect dependencies at com.hLM. Aircom :price-data-common:jar: 1.0-snapshot: Failed to read artifact Descriptor for com.hLM. Aircom :price-data-common:jar: 1.0-snapshot: artifact Descriptor Failed to read artifact Descriptor for com.hlm. Aircom :price-data-common:jar: 1.0-snapshot: Aircom :price-data: POM :1.0-SNAPSHOT in nexus (http://nexus.xxx.com/repository/maven-public/) -> [Help 1]Copy the code
Error reason
- Whether to push local items to nexus, as prompted in
http://nexus.xxx.com/repository/maven-public/
To find if there is - If it’s in the Nexus, it’s probably due to caching
The solution
Change the original MVN package command to MVN package -u
instructions
-u: snapshots and releases cannot be found in the local repository.
- For release versions that already exist locally, there will be no repeat downloads
- Snapshots and snapshots are always forced to refresh regardless of whether the JAR is local or not. However, updating the jar does not mean re-downloading the jar. Download only a few small files to determine whether the local and remote repository versions are the same, and then decide whether to download