Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
a8ae4cbc
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,发现更多精彩内容 >>
提交
a8ae4cbc
编写于
7月 19, 2013
作者:
O
Olivier Lamy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
push a bit of job in this branch to run all tests in ci server: too long locally
上级
0b91480b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
131 deletion
+24
-131
maven-plugin/pom.xml
maven-plugin/pom.xml
+6
-19
maven-plugin/src/main/java/hudson/maven/EmbedderLoggerImpl.java
...plugin/src/main/java/hudson/maven/EmbedderLoggerImpl.java
+0
-82
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
+6
-11
maven-plugin/src/main/java/hudson/maven/MavenUtil.java
maven-plugin/src/main/java/hudson/maven/MavenUtil.java
+10
-17
maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java
...src/main/java/hudson/maven/util/ExecutionEventLogger.java
+1
-1
pom.xml
pom.xml
+1
-1
未找到文件。
maven-plugin/pom.xml
浏览文件 @
a8ae4cbc
...
...
@@ -41,11 +41,11 @@ THE SOFTWARE.
<url>
http://wiki.jenkins-ci.org/display/JENKINS/Maven+Project+Plugin
</url>
<properties>
<mavenInterceptorsVersion>
1.
3
</mavenInterceptorsVersion>
<mavenInterceptorsVersion>
1.
4-SNAPSHOT
</mavenInterceptorsVersion>
<mavenVersion>
3.1.0
</mavenVersion>
<maven.version>
${mavenVersion}
</maven.version>
<aetherVersion>
0.9.0.M2
</aetherVersion>
<sisuInjectVersion>
2.3.0
</sisuInjectVersion>
<sisuInjectVersion>
0.0.0.M2a
</sisuInjectVersion>
<wagonVersion>
2.4
</wagonVersion>
</properties>
...
...
@@ -176,11 +176,11 @@ THE SOFTWARE.
<artifactId>
plexus-container-default
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<groupId>
org.
sonatyp
e.sisu
</groupId>
<artifactId>
sisu-inject-
plexus
</artifactId>
<groupId>
org.
eclips
e.sisu
</groupId>
<artifactId>
org.eclipse.sisu.
plexus
</artifactId>
<version>
${sisuInjectVersion}
</version>
</dependency>
...
...
@@ -200,19 +200,6 @@ THE SOFTWARE.
</exclusions>
</dependency>
<dependency>
<groupId>
org.sonatype.sisu
</groupId>
<artifactId>
sisu-inject-bean
</artifactId>
<version>
${sisuInjectVersion}
</version>
<exclusions>
<!-- prevent inclusion of one with classfifier no_aop -->
<exclusion>
<groupId>
org.sonatype.sisu
</groupId>
<artifactId>
sisu-guice
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- JENKINS-10819 : This wagon is safer and more configurable to provide http(s) support -->
<dependency>
<groupId>
org.apache.maven.wagon
</groupId>
...
...
maven-plugin/src/main/java/hudson/maven/EmbedderLoggerImpl.java
已删除
100644 → 0
浏览文件 @
0b91480b
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Tom Huybrechts
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package
hudson.maven
;
import
hudson.model.TaskListener
;
import
java.io.PrintStream
;
import
java.util.StringTokenizer
;
import
org.apache.maven.cli.MavenLoggerManager
;
import
org.codehaus.plexus.logging.Logger
;
import
org.codehaus.plexus.logging.console.ConsoleLogger
;
/**
* {@link MavenEmbedderLogger} implementation that
* sends output to {@link TaskListener}.
*
* @author Kohsuke Kawaguchi
*/
// TODO this is gone in 3.1.0, replaced by SLF4J
public
final
class
EmbedderLoggerImpl
extends
MavenLoggerManager
{
private
final
PrintStream
logger
;
public
EmbedderLoggerImpl
(
TaskListener
listener
,
int
threshold
)
{
super
(
new
ConsoleLogger
(
threshold
,
"hudson-logger"
));
logger
=
listener
.
getLogger
();
}
private
void
print
(
String
message
,
Throwable
throwable
,
int
threshold
,
String
prefix
)
{
if
(
getThreshold
()
<=
threshold
)
{
StringTokenizer
tokens
=
new
StringTokenizer
(
message
,
"\n"
);
while
(
tokens
.
hasMoreTokens
())
{
logger
.
print
(
prefix
);
logger
.
println
(
tokens
.
nextToken
());
}
if
(
throwable
!=
null
)
throwable
.
printStackTrace
(
logger
);
}
}
public
void
debug
(
String
message
,
Throwable
throwable
)
{
print
(
message
,
throwable
,
Logger
.
LEVEL_DEBUG
,
"[DEBUG] "
);
}
public
void
info
(
String
message
,
Throwable
throwable
)
{
print
(
message
,
throwable
,
Logger
.
LEVEL_INFO
,
"[INFO ] "
);
}
public
void
warn
(
String
message
,
Throwable
throwable
)
{
print
(
message
,
throwable
,
Logger
.
LEVEL_WARN
,
"[WARN ] "
);
}
public
void
error
(
String
message
,
Throwable
throwable
)
{
print
(
message
,
throwable
,
Logger
.
LEVEL_ERROR
,
"[ERROR] "
);
}
public
void
fatalError
(
String
message
,
Throwable
throwable
)
{
print
(
message
,
throwable
,
Logger
.
LEVEL_FATAL
,
"[FATAL] "
);
}
}
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
浏览文件 @
a8ae4cbc
...
...
@@ -25,13 +25,12 @@ package hudson.maven;
import
hudson.maven.MavenBuild.ProxyImpl2
;
import
hudson.maven.reporters.TestFailureDetector
;
import
hudson.maven.util.ExecutionEventLogger
;
import
hudson.model.BuildListener
;
import
hudson.model.Result
;
import
hudson.remoting.Channel
;
import
hudson.remoting.DelegatingCallable
;
import
hudson.util.IOException2
;
import
org.apache.maven.cli.
PrintStream
Logger
;
import
org.apache.maven.cli.
event.ExecutionEvent
Logger
;
import
org.apache.maven.execution.AbstractExecutionListener
;
import
org.apache.maven.execution.ExecutionEvent
;
import
org.apache.maven.execution.ExecutionListener
;
...
...
@@ -41,6 +40,7 @@ import org.apache.maven.project.MavenProject;
import
org.jvnet.hudson.maven3.agent.Maven3Main
;
import
org.jvnet.hudson.maven3.launcher.Maven3Launcher
;
import
org.jvnet.hudson.maven3.listeners.HudsonMavenExecutionResult
;
import
org.slf4j.LoggerFactory
;
import
java.io.IOException
;
import
java.io.PrintStream
;
...
...
@@ -173,6 +173,8 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
private
final
AbstractMavenBuilder
maven3Builder
;
private
AtomicBoolean
hasTestFailures
=
new
AtomicBoolean
();
private
org
.
slf4j
.
Logger
logger
=
LoggerFactory
.
getLogger
(
MavenExecutionListener
.
class
);
/**
* Number of total nanoseconds {@link Maven3Builder} spent.
...
...
@@ -198,16 +200,9 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
}
this
.
reporters
=
new
ConcurrentHashMap
<
ModuleName
,
List
<
MavenReporter
>>(
maven3Builder
.
reporters
);
// 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.
// TODO replace with SLF4J
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
);
}
...
...
maven-plugin/src/main/java/hudson/maven/MavenUtil.java
浏览文件 @
a8ae4cbc
...
...
@@ -23,23 +23,26 @@
*/
package
hudson.maven
;
import
edu.umd.cs.findbugs.annotations.SuppressWarnings
;
import
hudson.AbortException
;
import
hudson.FilePath
;
import
hudson.Util
;
import
hudson.model.AbstractBuild
;
import
hudson.model.AbstractProject
;
import
hudson.model.BuildListener
;
import
hudson.util.MaskingClassLoader
;
import
jenkins.model.Jenkins
;
import
jenkins.mvn.SettingsProvider
;
import
hudson.model.TaskListener
;
import
hudson.tasks.Maven.MavenInstallation
;
import
hudson.tasks.Maven.ProjectWithMaven
;
import
jenkins.model.Jenkins
;
import
jenkins.mvn.SettingsProvider
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.maven.artifact.versioning.ComparableVersion
;
import
org.apache.maven.cli.logging.Slf4jLoggerManager
;
import
org.apache.maven.project.MavenProject
;
import
org.apache.maven.project.ProjectBuildingException
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -49,14 +52,6 @@ import java.util.Map;
import
java.util.Properties
;
import
java.util.logging.Logger
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.maven.artifact.versioning.ComparableVersion
;
import
org.apache.maven.project.MavenProject
;
import
org.apache.maven.project.ProjectBuildingException
;
import
edu.umd.cs.findbugs.annotations.SuppressWarnings
;
/**
* @author Kohsuke Kawaguchi
*/
...
...
@@ -191,10 +186,8 @@ public class MavenUtil {
}
mavenRequest
.
setTransferListener
(
mer
.
getTransferListener
()
);
}
EmbedderLoggerImpl
logger
=
new
EmbedderLoggerImpl
(
mer
.
getListener
(),
debugMavenEmbedder
?
org
.
codehaus
.
plexus
.
logging
.
Logger
.
LEVEL_DEBUG
:
org
.
codehaus
.
plexus
.
logging
.
Logger
.
LEVEL_INFO
);
mavenRequest
.
setMavenLoggerManager
(
logger
);
mavenRequest
.
setMavenLoggerManager
(
new
Slf4jLoggerManager
()
);
ClassLoader
mavenEmbedderClassLoader
=
mer
.
getClassLoader
();
...
...
maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java
浏览文件 @
a8ae4cbc
...
...
@@ -40,7 +40,7 @@ import org.codehaus.plexus.logging.Logger;
*
* @author Benjamin Bentmann
*/
// Note: copied from package org.apache.maven.cli with just one minor adaption for Maven3Mojo
Note
// Note: copied from package org.apache.maven.cli with just one minor adaption for Maven3Mojo
public
class
ExecutionEventLogger
extends
AbstractExecutionListener
{
...
...
pom.xml
浏览文件 @
a8ae4cbc
...
...
@@ -95,7 +95,7 @@ THE SOFTWARE.
<project.patchManagement.url>
https://api.github.com
</project.patchManagement.url>
<patch.tracker.serverId>
jenkins-jira
</patch.tracker.serverId>
<slf4jVersion>
1.
6.2
</slf4jVersion>
<!-- < 1.6.x version didn't specify the license (MIT) -->
<slf4jVersion>
1.
7.4
</slf4jVersion>
<!-- < 1.6.x version didn't specify the license (MIT) -->
<netbeans.compile.on.save>
none
</netbeans.compile.on.save>
<!-- we rely on Maven source generation -->
<animal.sniffer.skip>
${skipTests}
</animal.sniffer.skip>
</properties>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录