Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when use "jcli cwp", can use mirror to download plugins? #693

Open
usernameisnull opened this issue Jun 11, 2022 · 4 comments
Open

when use "jcli cwp", can use mirror to download plugins? #693

usernameisnull opened this issue Jun 11, 2022 · 4 comments
Labels
enhancement New feature or request good first issue

Comments

@usernameisnull
Copy link

usernameisnull commented Jun 11, 2022

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I am in China, so I always encounter network problems and download plugins are too slow or fail. Is it possible to use mirror sources in China, such as Tsinghua or Tencent, when using the "jcli cwp" command. Or this feature needs to be supported by the "cwp" project .

Or specify the mirror source like the "jcli center download -m tencent" command

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@usernameisnull usernameisnull added the enhancement New feature or request label Jun 11, 2022
@usernameisnull
Copy link
Author

usernameisnull commented Jun 11, 2022

may be I just need to specify maven mirror?
I saw the console output,sorry I am just a rookie

@LinuxSuRen
Copy link
Member

LinuxSuRen commented Jun 12, 2022

The command jcli cwp downloads plugins from the center Maven repository, so I think it should be hard to specific a maven mirror.

See also

cwpArgs = append(cwpArgs, "-jar", localCWP)

I'm not sure about this. But you can try to add a mirror to ~/.m2/config

@SsLaLal
Copy link

SsLaLal commented Jul 26, 2023

我用jcli cwp指定--mvn-settings-file /usr/local/apache-maven-3.6.3/conf/settings.xml ,但是从jcli的执行日志来看,并没有从我自己settings.xml里配置的mirror去下载依赖

@LinuxSuRen
Copy link
Member

LinuxSuRen commented Jul 26, 2023

我用jcli cwp指定--mvn-settings-file /usr/local/apache-maven-3.6.3/conf/settings.xml ,但是从jcli的执行日志来看,并没有从我自己settings.xml里配置的mirror去下载依赖

确实是的,这个参数没有被用到。

https://github.com/search?q=repo%3Ajenkins-zh%2Fjenkins-cli%20MvnSettingsFile&type=code

感兴趣的话,在下面的代码处增加参数引用应该能解决这个问题:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue
Projects
None yet
Development

No branches or pull requests

3 participants