ponziani opened a new issue, #3151: URL: https://github.com/apache/karaf/issues/3151
### Problem The `assembly` and `verify` goals of the karaf-maven-plugin ignore `mvn -o`. Their Maven resolver still contacts the remote repositories: - `assembly`: `Builder#createMavenResolver()` puts the offline flag under `pid + "offline"`. The dot is missing, so the key is `org.ops4j.pax.url.mvnoffline`, and the resolver never sees it. The other keys (`.localRepository`, `.repositories`) have the dot. - `verify`: `VerifyMojo` never passes `maven.offline` to its resolver. So under `mvn -o`, Maven itself resolves offline, but the plugin downloads feature bundles that Maven never resolved, or waits for timeouts behind a firewall. ### Expected Under `mvn -o`, both goals only use the local repository, and fail when an artifact is not there. ### Behaviour change after the fix Builds that use `-o` and need artifacts that are not in the local repository will now fail instead of downloading them. This also applies when an artifact is cached from a different repository id than the one configured, for example: `Cannot access central ... in offline mode and the artifact has not been downloaded from it before`. Release note: *The karaf-maven-plugin `assembly` and `verify` goals now honour Maven offline mode (`-o`). Offline builds that relied on the plugin downloading missing artifacts must run online once first.* The offline key has missed its dot since KARAF-3968 (Karaf 4.0.2). Found during the review of #2979. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
