I'm using Maven for my project. It is not an issue if my project doesn't use some local resources. So that I'm following this guide https://stackoverflow.com/a/61576687/6720896 to copy my local jar to local maven repository and validated by Maven.
As you can see, in the maven-install-plugin
, I'm setting to install local repository at clean
phase.
It means by mvn clean
, maven will copy my jar to maven local repository.
The problem is, if I run mvn clean
and mvn install
by two commands separately => there is no problem
If i run mvn clean install
=> the build is failed as the log
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project xxxx:xxxx:war:0.0.1-SNAPSHOT: Failure to find org.xxxx:xxxx-ws:jar:1.0.0 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
Seem like by default, maven always execute following order: validate > compile > clean > install. I also tried with 'mvn clean validate' but the error still occurs.
Thank you for reading.