Maven Error: Failed to execute goal on project xxx: Could not resolve dependencies for project

Error Description:

Failed to execute goal on project xxx: Could not resolve dependencies for project com.jd.ka: xxx:war :0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.jd.ka:ka-explore- service:jar :0.0.1-SNAPSHOT, com.jd.ka:ka-explore- rpc:jar :0.0.1-SNAPSHOT: Failure to find com.jd.ka:ka-explore- service:jar :0.0.1-SNAPSHOT in http://artifactory.jd.com/libs-snapshots-local was cached in the local repository, resolution will not be reattempted until the update interval of snapshots_ local has elapsed or updates are forced -> [ Help 1]

Solution:

1. First of all, I believe that since you have made such a mistake, your project should also have multiple modules. It’s like this:

2. Let me give you an example here, so the application is web and service

3. Both projects inherit the parent project

4. In the module, the web depends on the service. After the clean and install in the web, the local warehouse also has the dependency, but the install in the service will appear

Failed to execute goal on project …: Could not resolve dependencies for project …

In this way, I found that I didn’t clean and install the parent project, that is, the interface test project

5. summary: some subprojects under the parent project should run clean and install of the parent project before running clean and install for the first time

Similar Posts: