Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
roginluo
Jenkins
提交
cff691e0
J
Jenkins
项目概览
roginluo
/
Jenkins
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
Jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cff691e0
编写于
2月 16, 2013
作者:
C
Christoph Kutzinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FIXED JENKINS-16843] Maven 3 builds ignored quiet (-q) and debug (-X) flags
上级
e7466435
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
3 deletion
+30
-3
changelog.html
changelog.html
+3
-0
maven-plugin/src/main/java/hudson/maven/AbstractMavenBuilder.java
...ugin/src/main/java/hudson/maven/AbstractMavenBuilder.java
+14
-0
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
+13
-3
未找到文件。
changelog.html
浏览文件 @
cff691e0
...
...
@@ -86,6 +86,9 @@ Upcoming changes</a>
<li
class=
bug
>
Changed the way matrix axis values are exposed as env variables
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-11577"
>
issue 11577
</a>
)
<li
class=
bug
>
Maven 3 builds ignored quiet (-q) and debug (-X) options
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-16843"
>
issue 16843
</a>
)
<li
class=
rfe
>
JNLP slave installers can now work transparently with secured Jenkins.
(SECURITY-54 / despite the ticket marker, this is not a security vulnerability)
...
...
maven-plugin/src/main/java/hudson/maven/AbstractMavenBuilder.java
浏览文件 @
cff691e0
...
...
@@ -199,6 +199,20 @@ public abstract class AbstractMavenBuilder implements DelegatingCallable<Result,
}
}
protected
boolean
isDebug
()
{
for
(
String
goal
:
goals
)
{
if
(
goal
.
equals
(
"-X"
)
||
goal
.
equals
(
"--debug"
))
return
true
;
}
return
false
;
}
protected
boolean
isQuiet
()
{
for
(
String
goal
:
goals
)
{
if
(
goal
.
equals
(
"-q"
)
||
goal
.
equals
(
"--quiet"
))
return
true
;
}
return
false
;
}
protected
static
class
FilterImpl
extends
MavenBuildProxy2
.
Filter
<
MavenBuildProxy2
>
implements
Serializable
{
private
MavenBuildInformation
mavenBuildInformation
;
...
...
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
浏览文件 @
cff691e0
...
...
@@ -167,7 +167,7 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
private
static
final
long
serialVersionUID
=
4942789836756366116L
;
private
final
Maven3
Builder
maven3Builder
;
private
final
AbstractMaven
Builder
maven3Builder
;
private
AtomicBoolean
hasTestFailures
=
new
AtomicBoolean
();
...
...
@@ -187,14 +187,24 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
private
ExecutionEventLogger
eventLogger
;
public
MavenExecutionListener
(
Maven3
Builder
maven3Builder
)
{
public
MavenExecutionListener
(
AbstractMaven
Builder
maven3Builder
)
{
this
.
maven3Builder
=
maven3Builder
;
this
.
proxies
=
new
ConcurrentHashMap
<
ModuleName
,
FilterImpl
>(
maven3Builder
.
proxies
);
for
(
ModuleName
name
:
this
.
proxies
.
keySet
())
{
executedMojosPerModule
.
put
(
name
,
new
CopyOnWriteArrayList
<
ExecutedMojo
>()
);
}
this
.
reporters
=
new
ConcurrentHashMap
<
ModuleName
,
List
<
MavenReporter
>>(
maven3Builder
.
reporters
);
this
.
eventLogger
=
new
ExecutionEventLogger
(
new
PrintStreamLogger
(
maven3Builder
.
listener
.
getLogger
()
)
);
// TODO: we should think about reusing the code in org.apache.maven.cli.DefaultMavenExecutionRequestBuilder#logging?
// E.g. there's also the option to redirect logging to a file which is handled there, but not here.
PrintStreamLogger
logger
=
new
PrintStreamLogger
(
maven3Builder
.
listener
.
getLogger
()
);
if
(
maven3Builder
.
isDebug
())
{
logger
.
setThreshold
(
PrintStreamLogger
.
LEVEL_DEBUG
);
}
else
if
(
maven3Builder
.
isQuiet
())
{
logger
.
setThreshold
(
PrintStreamLogger
.
LEVEL_ERROR
);
}
this
.
eventLogger
=
new
ExecutionEventLogger
(
logger
);
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录