[ 
https://issues.apache.org/jira/browse/CAMEL-23334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18073894#comment-18073894
 ] 

Claus Ibsen commented on CAMEL-23334:
-------------------------------------

This is more impacted for SNAPSHOT. But I would assume if its a released 
version like 1.2.3 then the resolution is faster as even maven itself will 
check locally and find the JAR already present. SNAPSHOT on the other hand it 
need to online check if there is a newer build of the SNAPSHOT and this does 
the online check.

 

> JBang plugin resolution checks remote repositories on every CLI invocation 
> even when artifacts are cached locally
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-23334
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23334
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Major
>             Fix For: 4.20.0
>
>
> When a 3rd-party JBang plugin is installed (via camel plugin add with a 
> custom GAV), every camel CLI invocation triggers a full Maven Resolver cycle 
> for the plugin artifact, including remote SNAPSHOT metadata checks. This 
> happens even when the artifact is already present in the local Maven 
> repository (~/.m2/repository).
> The root cause is in _PluginHelper.downloadPlugin()_ which always goes 
> through _MavenDependencyDownloader_ with online resolution. Maven Resolver 
> then contacts remote repositories to check for newer SNAPSHOT metadata, 
> adding 30+ seconds of overhead per invocation, even for unrelated commands 
> like camel version.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to