Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
b3c661d5
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
b3c661d5
编写于
2月 03, 2011
作者:
A
alanharder
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
some hudson.war/jenkins.war changes
上级
0b424d69
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
30 deletion
+30
-30
core/src/main/java/hudson/PluginWrapper.java
core/src/main/java/hudson/PluginWrapper.java
+11
-11
core/src/main/java/hudson/lifecycle/Lifecycle.java
core/src/main/java/hudson/lifecycle/Lifecycle.java
+8
-8
core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java
.../src/main/java/hudson/lifecycle/WindowsInstallerLink.java
+3
-3
core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
...c/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
+2
-2
core/src/main/java/hudson/model/UpdateSite.java
core/src/main/java/hudson/model/UpdateSite.java
+6
-6
未找到文件。
core/src/main/java/hudson/PluginWrapper.java
浏览文件 @
b3c661d5
...
...
@@ -50,8 +50,8 @@ import java.util.Enumeration;
import
java.util.jar.JarFile
;
/**
* Represents a
Hudson
plug-in and associated control information
* for
Hudson
to control {@link Plugin}.
* Represents a
Jenkins
plug-in and associated control information
* for
Jenkins
to control {@link Plugin}.
*
* <p>
* A plug-in is packaged into a jar file whose extension is <tt>".hpi"</tt>,
...
...
@@ -60,9 +60,9 @@ import java.util.jar.JarFile;
* <p>
* At the runtime, a plugin has two distinct state axis.
* <ol>
* <li>Enabled/Disabled. If enabled,
Hudson
is going to use it
* next time
Hudson
runs. Otherwise the next run will ignore it.
* <li>Activated/Deactivated. If activated, that means
Hudson
is using
* <li>Enabled/Disabled. If enabled,
Jenkins
is going to use it
* next time
Jenkins
runs. Otherwise the next run will ignore it.
* <li>Activated/Deactivated. If activated, that means
Jenkins
is using
* the plugin in this session. Otherwise it's not.
* </ol>
* <p>
...
...
@@ -104,7 +104,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
/**
* Used to control the unpacking of the bundled plugin.
* If a pin file exists,
Hudson
assumes that the user wants to pin down a particular version
* If a pin file exists,
Jenkins
assumes that the user wants to pin down a particular version
* of a plugin, and will not try to overwrite it. Otherwise, it'll be overwritten
* by a bundled copy, to ensure consistency across upgrade/downgrade.
* @since 1.325
...
...
@@ -113,7 +113,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
/**
* Short name of the plugin. The artifact Id of the plugin.
* This is also used in the URL within
Hudson
, so it needs
* This is also used in the URL within
Jenkins
, so it needs
* to remain stable even when the *.hpi file name is changed
* (like Maven does.)
*/
...
...
@@ -129,7 +129,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
private
final
List
<
Dependency
>
optionalDependencies
;
/**
* Is this plugin bundled in
hudson
.war?
* Is this plugin bundled in
jenkins
.war?
*/
/*package*/
boolean
isBundled
;
...
...
@@ -349,7 +349,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
}
/**
* Enables this plugin next time
Hudson
runs.
* Enables this plugin next time
Jenkins
runs.
*/
public
void
enable
()
throws
IOException
{
if
(!
disableFile
.
delete
())
...
...
@@ -357,7 +357,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
}
/**
* Disables this plugin next time
Hudson
runs.
* Disables this plugin next time
Jenkins
runs.
*/
public
void
disable
()
throws
IOException
{
// creates an empty file
...
...
@@ -378,7 +378,7 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
/**
* If true, the plugin is going to be activated next time
*
Hudson
runs.
*
Jenkins
runs.
*/
public
boolean
isEnabled
()
{
return
!
disableFile
.
exists
();
...
...
core/src/main/java/hudson/lifecycle/Lifecycle.java
浏览文件 @
b3c661d5
...
...
@@ -111,7 +111,7 @@ public abstract class Lifecycle implements ExtensionPoint {
}
/**
* If the location of <tt>
hudson
.war</tt> is known in this life cycle,
* If the location of <tt>
jenkins
.war</tt> is known in this life cycle,
* return it location. Otherwise return null to indicate that it is unknown.
*
* <p>
...
...
@@ -126,22 +126,22 @@ public abstract class Lifecycle implements ExtensionPoint {
}
/**
* Replaces
hudson
.war by the given file.
* Replaces
jenkins
.war by the given file.
*
* <p>
* On some system, most notably Windows, a file being in use cannot be changed,
* so rewriting <tt>
hudson
.war</tt> requires some special trick. Override this method
* so rewriting <tt>
jenkins
.war</tt> requires some special trick. Override this method
* to do so.
*/
public
void
rewriteHudsonWar
(
File
by
)
throws
IOException
{
File
dest
=
getHudsonWar
();
// this should be impossible given the canRewriteHudsonWar method,
// but let's be defensive
if
(
dest
==
null
)
throw
new
IOException
(
"
hudson
.war location is not known."
);
if
(
dest
==
null
)
throw
new
IOException
(
"
jenkins
.war location is not known."
);
// backing up the old
hudson
.war before it gets lost due to upgrading
// (newly downloaded
hudson.war and 'backup' (hudson
.war.tmp) are the same files
// unless we are trying to rewrite
hudson
.war by a backup itself
// backing up the old
jenkins
.war before it gets lost due to upgrading
// (newly downloaded
jenkins.war and 'backup' (jenkins
.war.tmp) are the same files
// unless we are trying to rewrite
jenkins
.war by a backup itself
File
bak
=
new
File
(
dest
.
getPath
()
+
".bak"
);
if
(!
by
.
equals
(
bak
))
FileUtils
.
copyFile
(
dest
,
bak
);
...
...
@@ -156,7 +156,7 @@ public abstract class Lifecycle implements ExtensionPoint {
* Can {@link #rewriteHudsonWar(File)} work?
*/
public
boolean
canRewriteHudsonWar
()
{
// if we don't know where
hudson
.war is, it's impossible to replace.
// if we don't know where
jenkins
.war is, it's impossible to replace.
File
f
=
getHudsonWar
();
return
f
!=
null
&&
f
.
canWrite
();
}
...
...
core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java
浏览文件 @
b3c661d5
...
...
@@ -55,7 +55,7 @@ import java.net.URL;
public
class
WindowsInstallerLink
extends
ManagementLink
{
/**
* Location of the
hudson
.war.
* Location of the
jenkins
.war.
* In general case, we can't determine this value, yet having this is a requirement for the installer.
*/
private
final
File
hudsonWar
;
...
...
@@ -65,8 +65,8 @@ public class WindowsInstallerLink extends ManagementLink {
*/
private
volatile
File
installationDir
;
private
WindowsInstallerLink
(
File
hudson
War
)
{
this
.
hudsonWar
=
hudson
War
;
private
WindowsInstallerLink
(
File
jenkins
War
)
{
this
.
hudsonWar
=
jenkins
War
;
}
public
String
getIconFileName
()
{
...
...
core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
浏览文件 @
b3c661d5
...
...
@@ -87,7 +87,7 @@ public class WindowsServiceLifecycle extends Lifecycle {
}
/**
* On Windows,
hudson
.war is locked, so we place a new version under a special name,
* On Windows,
jenkins
.war is locked, so we place a new version under a special name,
* which is picked up by the service wrapper upon restart.
*/
@Override
...
...
@@ -98,7 +98,7 @@ public class WindowsServiceLifecycle extends Lifecycle {
if
(
dest
==
null
)
throw
new
IOException
(
"jenkins.war location is not known."
);
// backing up the old jenkins.war before its lost due to upgrading
// unless we are trying to rewrite
hudson
.war by a backup itself
// unless we are trying to rewrite
jenkins
.war by a backup itself
File
bak
=
new
File
(
dest
.
getPath
()
+
".bak"
);
if
(!
by
.
equals
(
bak
))
FileUtils
.
copyFile
(
dest
,
bak
);
...
...
core/src/main/java/hudson/model/UpdateSite.java
浏览文件 @
b3c661d5
...
...
@@ -74,7 +74,7 @@ import javax.servlet.ServletContext;
* Source of the update center information, like "http://jenkins-ci.org/update-center.json"
*
* <p>
*
Hudson
can have multiple {@link UpdateSite}s registered in the system, so that it can pick up plugins
*
Jenkins
can have multiple {@link UpdateSite}s registered in the system, so that it can pick up plugins
* from different locations.
*
* @author Andrew Bayer
...
...
@@ -173,7 +173,7 @@ public class UpdateSite {
certs
.
add
(
c
);
}
// all default root CAs in JVM are trusted, plus certs bundled in
Hudson
// all default root CAs in JVM are trusted, plus certs bundled in
Jenkins
Set
<
TrustAnchor
>
anchors
=
CertificateUtil
.
getDefaultRootCAs
();
ServletContext
context
=
Hudson
.
getInstance
().
servletContext
;
for
(
String
cert
:
(
Set
<
String
>)
context
.
getResourcePaths
(
"/WEB-INF/update-center-rootCAs"
))
{
...
...
@@ -320,7 +320,7 @@ public class UpdateSite {
for
(
PluginWrapper
pw
:
Hudson
.
getInstance
().
getPluginManager
().
getPlugins
())
{
if
(!
pw
.
isBundled
()
&&
pw
.
getUpdateInfo
()!=
null
)
// do not advertize updates to bundled plugins, since we generally want users to get them
// as a part of
hudson
.war updates. This also avoids unnecessary pinning of plugins.
// as a part of
jenkins
.war updates. This also avoids unnecessary pinning of plugins.
return
true
;
}
return
false
;
...
...
@@ -352,7 +352,7 @@ public class UpdateSite {
public
final
String
sourceId
;
/**
* The latest
hudson
.war.
* The latest
jenkins
.war.
*/
public
final
Entry
core
;
/**
...
...
@@ -361,7 +361,7 @@ public class UpdateSite {
public
final
Map
<
String
,
Plugin
>
plugins
=
new
TreeMap
<
String
,
Plugin
>(
String
.
CASE_INSENSITIVE_ORDER
);
/**
* If this is non-null,
Hudson
is going to check the connectivity to this URL to make sure
* If this is non-null,
Jenkins
is going to check the connectivity to this URL to make sure
* the network connection is up. Null to skip the check.
*/
public
final
String
connectionCheckUrl
;
...
...
@@ -464,7 +464,7 @@ public class UpdateSite {
*/
public
final
String
compatibleSinceVersion
;
/**
* Version of
Hudson
core this plugin was compiled against.
* Version of
Jenkins
core this plugin was compiled against.
*/
public
final
String
requiredCore
;
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录