Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
dac7decd
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dac7decd
编写于
3月 15, 2016
作者:
K
kzantow
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Implement @jglick's idea: move implicit dependency modifications to
UpdateSite, when reading plugin metadata
上级
4e3295bb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
15 deletion
+14
-15
core/src/main/java/hudson/ClassicPluginStrategy.java
core/src/main/java/hudson/ClassicPluginStrategy.java
+1
-0
core/src/main/java/hudson/PluginManager.java
core/src/main/java/hudson/PluginManager.java
+0
-13
core/src/main/java/hudson/model/UpdateSite.java
core/src/main/java/hudson/model/UpdateSite.java
+13
-2
未找到文件。
core/src/main/java/hudson/ClassicPluginStrategy.java
浏览文件 @
dac7decd
...
...
@@ -275,6 +275,7 @@ public class ClassicPluginStrategy implements PluginStrategy {
/**
* Returns all the plugin dependencies that are implicit based on a particular Jenkins version
*/
@Nonnull
public
static
List
<
PluginWrapper
.
Dependency
>
getImpliedDependencies
(
String
pluginName
,
String
jenkinsVersion
)
{
List
<
PluginWrapper
.
Dependency
>
out
=
new
ArrayList
<>();
for
(
DetachedPlugin
detached
:
DETACHED_LIST
)
{
...
...
core/src/main/java/hudson/PluginManager.java
浏览文件 @
dac7decd
...
...
@@ -1156,19 +1156,6 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
if
(
p
==
null
)
{
throw
new
Failure
(
"No such plugin: "
+
n
);
}
// JENKINS-33308 - automatically install implied/previously bundled dependencies for older plugins that may need them
for
(
PluginWrapper
.
Dependency
previouslyBundledDependency
:
ClassicPluginStrategy
.
getImpliedDependencies
(
p
.
name
,
p
.
requiredCore
))
{
// if they aren't already installed, note the dependencies show 'need restart' messages if installed multiple times
// but it can't be prevented here
if
(
getPlugin
(
previouslyBundledDependency
.
shortName
)
==
null
)
{
// as these are basically jenkins core, these should always be installed from the default update center
UpdateSite
.
Plugin
previouslyBundledPlugin
=
getPlugin
(
previouslyBundledDependency
.
shortName
,
UpdateCenter
.
ID_DEFAULT
);
Future
<
UpdateCenter
.
UpdateCenterJob
>
jobFuture
=
previouslyBundledPlugin
.
deploy
(
dynamicLoad
,
correlationId
);
installJobs
.
add
(
jobFuture
);
}
}
Future
<
UpdateCenter
.
UpdateCenterJob
>
jobFuture
=
p
.
deploy
(
dynamicLoad
,
correlationId
);
installJobs
.
add
(
jobFuture
);
}
...
...
core/src/main/java/hudson/model/UpdateSite.java
浏览文件 @
dac7decd
...
...
@@ -25,6 +25,7 @@
package
hudson.model
;
import
hudson.ClassicPluginStrategy
;
import
hudson.PluginManager
;
import
hudson.PluginWrapper
;
import
hudson.Util
;
...
...
@@ -467,7 +468,17 @@ public class UpdateSite {
core
=
null
;
}
for
(
Map
.
Entry
<
String
,
JSONObject
>
e
:
(
Set
<
Map
.
Entry
<
String
,
JSONObject
>>)
o
.
getJSONObject
(
"plugins"
).
entrySet
())
{
plugins
.
put
(
e
.
getKey
(),
new
Plugin
(
sourceId
,
e
.
getValue
()));
Plugin
p
=
new
Plugin
(
sourceId
,
e
.
getValue
());
// JENKINS-33308 - include implied dependencies for older plugins that may need them
List
<
PluginWrapper
.
Dependency
>
implicitDeps
=
ClassicPluginStrategy
.
getImpliedDependencies
(
p
.
name
,
p
.
requiredCore
);
if
(!
implicitDeps
.
isEmpty
())
{
for
(
PluginWrapper
.
Dependency
dep
:
implicitDeps
)
{
if
(!
p
.
dependencies
.
containsKey
(
dep
.
shortName
))
{
p
.
dependencies
.
put
(
dep
.
shortName
,
dep
.
version
);
}
}
}
plugins
.
put
(
e
.
getKey
(),
p
);
}
connectionCheckUrl
=
(
String
)
o
.
get
(
"connectionCheckUrl"
);
...
...
@@ -612,7 +623,7 @@ public class UpdateSite {
public
final
String
[]
categories
;
/**
* Dependencies of this plugin.
* Dependencies of this plugin
, a name -> version mapping
.
*/
@Exported
public
final
Map
<
String
,
String
>
dependencies
=
new
HashMap
<
String
,
String
>();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录