Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
9e2adce7
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,发现更多精彩内容 >>
提交
9e2adce7
编写于
12月 29, 2010
作者:
O
Olivier Lamy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
various MavenReporter will know maven version used during the build.
上级
086cf9a0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
9 deletion
+46
-9
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
+17
-4
maven-plugin/src/main/java/hudson/maven/MavenBuild.java
maven-plugin/src/main/java/hudson/maven/MavenBuild.java
+11
-0
maven-plugin/src/main/java/hudson/maven/MavenBuildProxy.java
maven-plugin/src/main/java/hudson/maven/MavenBuildProxy.java
+2
-0
maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
...lugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
+16
-5
未找到文件。
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
浏览文件 @
9e2adce7
...
...
@@ -26,6 +26,7 @@ package hudson.maven;
import
hudson.Launcher
;
import
hudson.maven.MavenBuild.ProxyImpl2
;
import
hudson.model.BuildListener
;
import
hudson.model.FreeStyleProject
;
import
hudson.model.Hudson
;
import
hudson.model.Result
;
import
hudson.remoting.Channel
;
...
...
@@ -86,12 +87,15 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
private
final
Map
<
ModuleName
,
ProxyImpl2
>
sourceProxies
;
private
final
Map
<
ModuleName
,
List
<
MavenReporter
>>
reporters
=
new
HashMap
<
ModuleName
,
List
<
MavenReporter
>>();
protected
Maven3Builder
(
BuildListener
listener
,
Map
<
ModuleName
,
ProxyImpl2
>
proxies
,
Map
<
ModuleName
,
List
<
MavenReporter
>>
reporters
,
List
<
String
>
goals
,
Map
<
String
,
String
>
systemProps
)
{
private
final
MavenBuildInformation
mavenBuildInformation
;
protected
Maven3Builder
(
BuildListener
listener
,
Map
<
ModuleName
,
ProxyImpl2
>
proxies
,
Map
<
ModuleName
,
List
<
MavenReporter
>>
reporters
,
List
<
String
>
goals
,
Map
<
String
,
String
>
systemProps
,
MavenBuildInformation
mavenBuildInformation
)
{
super
(
listener
,
goals
,
systemProps
);
this
.
mavenBuildInformation
=
mavenBuildInformation
;
sourceProxies
=
new
HashMap
<
ModuleName
,
ProxyImpl2
>(
proxies
);
this
.
proxies
=
new
HashMap
<
ModuleName
,
MavenBuildProxy2
>(
proxies
);
for
(
Entry
<
ModuleName
,
MavenBuildProxy2
>
e
:
this
.
proxies
.
entrySet
())
e
.
setValue
(
new
FilterImpl
(
e
.
getValue
()));
e
.
setValue
(
new
FilterImpl
(
e
.
getValue
()
,
this
.
mavenBuildInformation
));
this
.
reporters
.
putAll
(
reporters
);
}
...
...
@@ -208,8 +212,12 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
}
private
class
FilterImpl
extends
MavenBuildProxy2
.
Filter
<
MavenBuildProxy2
>
implements
Serializable
{
public
FilterImpl
(
MavenBuildProxy2
core
)
{
private
MavenBuildInformation
mavenBuildInformation
;
public
FilterImpl
(
MavenBuildProxy2
core
,
MavenBuildInformation
mavenBuildInformation
)
{
super
(
core
);
this
.
mavenBuildInformation
=
mavenBuildInformation
;
}
@Override
...
...
@@ -218,6 +226,11 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
}
private
static
final
long
serialVersionUID
=
1L
;
public
MavenBuildInformation
getMavenBuildInformation
()
{
return
mavenBuildInformation
;
}
}
...
...
@@ -244,7 +257,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
this
.
proxies
=
new
HashMap
<
ModuleName
,
MavenBuildProxy2
>(
maven3Builder
.
proxies
);
for
(
Entry
<
ModuleName
,
MavenBuildProxy2
>
e
:
this
.
proxies
.
entrySet
())
{
e
.
setValue
(
maven3Builder
.
new
FilterImpl
(
e
.
getValue
()));
e
.
setValue
(
maven3Builder
.
new
FilterImpl
(
e
.
getValue
()
,
maven3Builder
.
mavenBuildInformation
));
executedMojosPerModule
.
put
(
e
.
getKey
(),
new
CopyOnWriteArrayList
<
ExecutedMojo
>()
);
}
this
.
reporters
.
putAll
(
new
HashMap
<
ModuleName
,
List
<
MavenReporter
>>(
maven3Builder
.
reporters
)
);
...
...
maven-plugin/src/main/java/hudson/maven/MavenBuild.java
浏览文件 @
9e2adce7
...
...
@@ -278,7 +278,13 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
futures
.
add
(
Channel
.
current
().
callAsync
(
new
AsyncInvoker
(
core
,
program
)));
}
public
MavenBuildInformation
getMavenBuildInformation
()
{
return
super
.
core
.
getMavenBuildInformation
();
}
private
static
final
long
serialVersionUID
=
1L
;
}
@Override
...
...
@@ -408,6 +414,11 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
private
Object
writeReplace
()
{
return
Channel
.
current
().
export
(
MavenBuildProxy
.
class
,
this
);
}
public
MavenBuildInformation
getMavenBuildInformation
()
{
return
new
MavenBuildInformation
(
MavenBuild
.
this
.
getModuleSetBuild
().
getProject
().
getMavenVersionUsed
());
}
}
public
class
ProxyImpl2
extends
ProxyImpl
implements
MavenBuildProxy2
{
...
...
maven-plugin/src/main/java/hudson/maven/MavenBuildProxy.java
浏览文件 @
9e2adce7
...
...
@@ -170,6 +170,8 @@ public interface MavenBuildProxy {
V
call
(
MavenBuild
build
)
throws
T
,
IOException
,
InterruptedException
;
}
MavenBuildInformation
getMavenBuildInformation
();
/**
* Filter for {@link MavenBuildProxy}.
*
...
...
maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
浏览文件 @
9e2adce7
...
...
@@ -473,6 +473,8 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
String
mavenVersion
=
mavenInformation
.
getVersion
();
MavenBuildInformation
mavenBuildInformation
=
new
MavenBuildInformation
(
mavenVersion
);
project
.
setMavenVersionUsed
(
mavenVersion
);
listener
.
getLogger
().
println
(
"Found mavenVersion "
+
mavenVersion
+
" from file "
+
mavenInformation
.
getVersionResourcePath
());
...
...
@@ -595,7 +597,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
{
reporters
.
put
(
mavenModule
.
getModuleName
(),
mavenModule
.
createReporters
()
);
}
Maven3Builder
maven3Builder
=
new
Maven3Builder
(
slistener
,
proxies
,
reporters
,
margs
.
toList
(),
envVars
);
Maven3Builder
maven3Builder
=
new
Maven3Builder
(
slistener
,
proxies
,
reporters
,
margs
.
toList
(),
envVars
,
mavenBuildInformation
);
MavenProbeAction
mpa
=
null
;
try
{
mpa
=
new
MavenProbeAction
(
project
,
process
.
channel
);
...
...
@@ -610,7 +612,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
}
else
{
Builder
builder
=
new
Builder
(
slistener
,
proxies
,
project
.
sortedActiveModules
,
margs
.
toList
(),
envVars
);
Builder
builder
=
new
Builder
(
slistener
,
proxies
,
project
.
sortedActiveModules
,
margs
.
toList
(),
envVars
,
mavenBuildInformation
);
MavenProbeAction
mpa
=
null
;
try
{
mpa
=
new
MavenProbeAction
(
project
,
process
.
channel
);
...
...
@@ -781,19 +783,22 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
*/
private
final
transient
Map
<
ModuleName
,
ProxyImpl2
>
sourceProxies
;
public
Builder
(
BuildListener
listener
,
Map
<
ModuleName
,
ProxyImpl2
>
proxies
,
Collection
<
MavenModule
>
modules
,
List
<
String
>
goals
,
Map
<
String
,
String
>
systemProps
)
{
public
Builder
(
BuildListener
listener
,
Map
<
ModuleName
,
ProxyImpl2
>
proxies
,
Collection
<
MavenModule
>
modules
,
List
<
String
>
goals
,
Map
<
String
,
String
>
systemProps
,
MavenBuildInformation
mavenBuildInformation
)
{
super
(
listener
,
goals
,
systemProps
);
this
.
sourceProxies
=
proxies
;
this
.
proxies
=
new
HashMap
<
ModuleName
,
MavenBuildProxy2
>(
proxies
);
for
(
Entry
<
ModuleName
,
MavenBuildProxy2
>
e
:
this
.
proxies
.
entrySet
())
e
.
setValue
(
new
FilterImpl
(
e
.
getValue
()));
e
.
setValue
(
new
FilterImpl
(
e
.
getValue
()
,
mavenBuildInformation
));
for
(
MavenModule
m
:
modules
)
reporters
.
put
(
m
.
getModuleName
(),
m
.
createReporters
());
}
private
class
FilterImpl
extends
MavenBuildProxy2
.
Filter
<
MavenBuildProxy2
>
implements
Serializable
{
public
FilterImpl
(
MavenBuildProxy2
core
)
{
private
MavenBuildInformation
mavenBuildInformation
;
public
FilterImpl
(
MavenBuildProxy2
core
,
MavenBuildInformation
mavenBuildInformation
)
{
super
(
core
);
}
...
...
@@ -802,7 +807,13 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
futures
.
add
(
Channel
.
current
().
callAsync
(
new
AsyncInvoker
(
core
,
program
)));
}
public
MavenBuildInformation
getMavenBuildInformation
()
{
return
mavenBuildInformation
;
}
private
static
final
long
serialVersionUID
=
1L
;
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录