Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
2df71d07
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,发现更多精彩内容 >>
提交
2df71d07
编写于
4月 10, 2012
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixing last set of test failures
上级
1803f9da
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
16 deletion
+16
-16
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
+16
-16
未找到文件。
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
浏览文件 @
2df71d07
...
@@ -35,6 +35,7 @@ import org.apache.maven.execution.AbstractExecutionListener;
...
@@ -35,6 +35,7 @@ import org.apache.maven.execution.AbstractExecutionListener;
import
org.apache.maven.execution.ExecutionEvent
;
import
org.apache.maven.execution.ExecutionEvent
;
import
org.apache.maven.execution.ExecutionListener
;
import
org.apache.maven.execution.ExecutionListener
;
import
org.apache.maven.plugin.MojoExecution
;
import
org.apache.maven.plugin.MojoExecution
;
import
org.apache.maven.plugin.MojoExecutionException
;
import
org.apache.maven.project.MavenProject
;
import
org.apache.maven.project.MavenProject
;
import
org.jvnet.hudson.maven3.agent.Maven3Main
;
import
org.jvnet.hudson.maven3.agent.Maven3Main
;
import
org.jvnet.hudson.maven3.launcher.Maven3Launcher
;
import
org.jvnet.hudson.maven3.launcher.Maven3Launcher
;
...
@@ -223,15 +224,6 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -223,15 +224,6 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
for
(
Entry
<
ModuleName
,
FilterImpl
>
e
:
this
.
proxies
.
entrySet
())
{
for
(
Entry
<
ModuleName
,
FilterImpl
>
e
:
this
.
proxies
.
entrySet
())
{
MavenProject
project
=
buildingProjects
.
get
(
e
.
getKey
());
MavenProject
project
=
buildingProjects
.
get
(
e
.
getKey
());
if
(
project
!=
null
)
{
if
(
project
!=
null
)
{
//maven3Builder.listener.getLogger().println("Project " + e.getKey() + " needs not be build");
// set all modules which are not actually being build (in incremental builds) to NOT_BUILD (JENKINS-9072)
// TODO: this is an abuse of abstraction
MavenBuildProxy2
proxy
=
e
.
getValue
();
proxy
.
start
();
proxy
.
setResult
(
Result
.
NOT_BUILT
);
proxy
.
end
();
for
(
MavenReporter
mavenReporter
:
fixNull
(
reporters
.
get
(
e
.
getKey
())))
{
for
(
MavenReporter
mavenReporter
:
fixNull
(
reporters
.
get
(
e
.
getKey
())))
{
try
{
try
{
mavenReporter
.
preBuild
(
e
.
getValue
()
,
project
,
maven3Builder
.
listener
);
mavenReporter
.
preBuild
(
e
.
getValue
()
,
project
,
maven3Builder
.
listener
);
...
@@ -241,6 +233,14 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -241,6 +233,14 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
x
.
printStackTrace
();
x
.
printStackTrace
();
}
}
}
}
}
else
{
// set all modules which are not actually being build (in incremental builds) to NOT_BUILD (JENKINS-9072)
LOGGER
.
fine
(
"Project "
+
e
.
getKey
()
+
" needs not be build"
);
MavenBuildProxy2
proxy
=
e
.
getValue
();
proxy
.
start
();
proxy
.
setResult
(
Result
.
NOT_BUILT
);
proxy
.
end
();
}
}
}
}
}
}
...
@@ -400,11 +400,11 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -400,11 +400,11 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
*/
*/
public
void
mojoSucceeded
(
ExecutionEvent
event
)
{
public
void
mojoSucceeded
(
ExecutionEvent
event
)
{
debug
(
"mojoSucceeded "
+
mojoExec
(
event
));
debug
(
"mojoSucceeded "
+
mojoExec
(
event
));
recordMojoEnded
(
event
);
recordMojoEnded
(
event
,
null
);
this
.
eventLogger
.
mojoSucceeded
(
event
);
this
.
eventLogger
.
mojoSucceeded
(
event
);
}
}
private
void
recordMojoEnded
(
ExecutionEvent
event
)
{
private
void
recordMojoEnded
(
ExecutionEvent
event
,
Exception
problem
)
{
MavenProject
mavenProject
=
event
.
getProject
();
MavenProject
mavenProject
=
event
.
getProject
();
MojoInfo
mojoInfo
=
new
MojoInfo
(
event
);
MojoInfo
mojoInfo
=
new
MojoInfo
(
event
);
...
@@ -418,7 +418,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -418,7 +418,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
for
(
MavenReporter
mavenReporter
:
fixNull
(
mavenReporters
))
{
for
(
MavenReporter
mavenReporter
:
fixNull
(
mavenReporters
))
{
try
{
try
{
mavenReporter
.
postExecute
(
mavenBuildProxy2
,
mavenProject
,
mojoInfo
,
maven3Builder
.
listener
,
getExecutionException
(
event
)
);
mavenReporter
.
postExecute
(
mavenBuildProxy2
,
mavenProject
,
mojoInfo
,
maven3Builder
.
listener
,
problem
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
@@ -445,7 +445,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -445,7 +445,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
*/
*/
public
void
mojoFailed
(
ExecutionEvent
event
)
{
public
void
mojoFailed
(
ExecutionEvent
event
)
{
debug
(
"mojoFailed "
+
mojoExec
(
event
));
debug
(
"mojoFailed "
+
mojoExec
(
event
));
recordMojoEnded
(
event
);
recordMojoEnded
(
event
,
getExecutionException
(
event
)
);
this
.
eventLogger
.
mojoFailed
(
event
);
this
.
eventLogger
.
mojoFailed
(
event
);
}
}
...
@@ -463,7 +463,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -463,7 +463,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
try
{
try
{
return
event
.
getException
();
return
event
.
getException
();
}
catch
(
NoSuchMethodError
e
)
{
}
catch
(
NoSuchMethodError
e
)
{
return
n
ull
;
return
n
ew
MojoExecutionException
(
event
.
getMojoExecution
()+
" failed"
)
;
}
}
}
}
...
@@ -480,7 +480,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -480,7 +480,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
*/
*/
public
void
forkSucceeded
(
ExecutionEvent
event
)
{
public
void
forkSucceeded
(
ExecutionEvent
event
)
{
LOGGER
.
fine
(
"mojo forkSucceeded "
+
mojoExec
(
event
));
LOGGER
.
fine
(
"mojo forkSucceeded "
+
mojoExec
(
event
));
recordMojoEnded
(
event
);
recordMojoEnded
(
event
,
null
);
}
}
/**
/**
...
@@ -488,7 +488,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
...
@@ -488,7 +488,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
*/
*/
public
void
forkFailed
(
ExecutionEvent
event
)
{
public
void
forkFailed
(
ExecutionEvent
event
)
{
LOGGER
.
fine
(
"mojo forkFailed "
+
mojoExec
(
event
));
LOGGER
.
fine
(
"mojo forkFailed "
+
mojoExec
(
event
));
recordMojoEnded
(
event
);
recordMojoEnded
(
event
,
getExecutionException
(
event
)
);
}
}
/*
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录