Łukasz Dywicki created KARAF-7316:
-------------------------------------
Summary: Fallback distribution in verify mojo always fail to
resolve
Key: KARAF-7316
URL: https://issues.apache.org/jira/browse/KARAF-7316
Project: Karaf
Issue Type: Bug
Components: karaf
Affects Versions: 4.2.7
Reporter: Łukasz Dywicki
Assignee: Łukasz Dywicki
The {{VerifyMojo}} has several places where "distribution" is being used. Its
primary function is to provide properties needed to launch feature resolution.
Given that we usually can revert to plugin version when we do "verify" call it
should succeed as long as maven configuration is proper. This is not a case for
4.2.7 and upper releases too as constructed "distribution" url is simply
invalid. Instead of downloading {{apache-karaf-4.2.7.zip}} id requests an
artifact with extra {{null}} classifier:
{code:java}
[DEBUG] http-outgoing-0: set socket timeout to 5000
[DEBUG] Executing request GET
/maven2/org/apache/karaf/apache-karaf/4.2.7/apache-karaf-4.2.7-null.zip HTTP/1.1
[DEBUG] Target auth state: UNCHALLENGED
[DEBUG] Proxy auth state: UNCHALLENGED
[DEBUG] http-outgoing-0 >> GET
/maven2/org/apache/karaf/apache-karaf/4.2.7/apache-karaf-4.2.7-null.zip HTTP/1.1
[DEBUG] http-outgoing-0 >> Cache-control: no-cache
[DEBUG] http-outgoing-0 >> Cache-store: no-store
[DEBUG] http-outgoing-0 >> Pragma: no-cache
[DEBUG] http-outgoing-0 >> User-Agent: Aether
[DEBUG] http-outgoing-0 >> Host: repo.maven.apache.org
[DEBUG] http-outgoing-0 >> Connection: Keep-Alive
[DEBUG] http-outgoing-0 >> Accept-Encoding: gzip,deflate
[DEBUG] http-outgoing-0 >> "GET
/maven2/org/apache/karaf/apache-karaf/4.2.7/apache-karaf-4.2.7-null.zip
HTTP/1.1[\r][\n]"
[DEBUG] http-outgoing-0 >> "Cache-control: no-cache[\r][\n]"
[DEBUG] http-outgoing-0 >> "Cache-store: no-store[\r][\n]"
[DEBUG] http-outgoing-0 >> "Pragma: no-cache[\r][\n]"
[DEBUG] http-outgoing-0 >> "User-Agent: Aether[\r][\n]"
[DEBUG] http-outgoing-0 >> "Host: repo.maven.apache.org[\r][\n]"
[DEBUG] http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
[DEBUG] http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
[DEBUG] http-outgoing-0 >> "[\r][\n]"
[DEBUG] http-outgoing-0 << "HTTP/1.1 404 Not Found[\r][\n]"
{code}
Obviously this artifact id is invalid.
In practice all projects I have seen have {{distribution}} parameter set as
well as {{provided}} dependency with specific karaf framework or distro to
avoid failures of this small glitch.
I believe this is improper behavior, not sure when it was introduced, and could
be fixed to avoid propagation of karaf dependency into basic projects which
attempt to build & verify feature file.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)