Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
3ab72a8e
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,发现更多精彩内容 >>
提交
3ab72a8e
编写于
12月 17, 2010
作者:
O
Olivier Lamy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix issues with forked projects and/or forked mojo executions
上级
95f90a66
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
63 addition
and
22 deletion
+63
-22
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
+59
-20
maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
...lugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
+3
-1
pom.xml
pom.xml
+1
-1
未找到文件。
maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
浏览文件 @
3ab72a8e
...
...
@@ -320,9 +320,13 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
* @see org.apache.maven.execution.ExecutionListener#projectStarted(org.apache.maven.execution.ExecutionEvent)
*/
public
void
projectStarted
(
ExecutionEvent
event
)
{
maven3Builder
.
listener
.
getLogger
().
println
(
"projectStarted in MavenExecutionListener "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
()
);
maven3Builder
.
listener
.
getLogger
().
println
(
"projectStarted "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
()
+
":"
+
event
.
getProject
().
getVersion
()
);
reccordProjectStarted
(
event
);
}
public
void
reccordProjectStarted
(
ExecutionEvent
event
)
{
MavenProject
mavenProject
=
event
.
getProject
();
List
<
MavenReporter
>
mavenReporters
=
getMavenReporters
(
mavenProject
);
...
...
@@ -360,9 +364,14 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
* @see org.apache.maven.execution.ExecutionListener#projectSucceeded(org.apache.maven.execution.ExecutionEvent)
*/
public
void
projectSucceeded
(
ExecutionEvent
event
)
{
maven3Builder
.
listener
.
getLogger
().
println
(
"projectSucceeded
in MavenExecutionListener
"
maven3Builder
.
listener
.
getLogger
().
println
(
"projectSucceeded "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
()
);
+
event
.
getProject
().
getArtifactId
()
+
":"
+
event
.
getProject
().
getVersion
());
reccordProjectSucceeded
(
event
);
}
public
void
reccordProjectSucceeded
(
ExecutionEvent
event
)
{
MavenProject
mavenProject
=
event
.
getProject
();
List
<
MavenReporter
>
mavenReporters
=
getMavenReporters
(
mavenProject
);
...
...
@@ -394,31 +403,41 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
}
}
}
}
/**
* @see org.apache.maven.execution.ExecutionListener#projectFailed(org.apache.maven.execution.ExecutionEvent)
*/
public
void
projectFailed
(
ExecutionEvent
event
)
{
maven3Builder
.
listener
.
getLogger
().
println
(
"projectFailed "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
());
maven3Builder
.
listener
.
getLogger
().
println
(
"projectFailed "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
()
+
":"
+
event
.
getProject
().
getVersion
());
reccordProjectFailed
(
event
);
}
public
void
reccordProjectFailed
(
ExecutionEvent
event
)
{
MavenBuildProxy2
mavenBuildProxy2
=
getMavenBuildProxy2
(
event
.
getProject
()
);
mavenBuildProxy2
.
end
();
mavenBuildProxy2
.
setResult
(
Result
.
FAILURE
);
}
}
/**
* @see org.apache.maven.execution.ExecutionListener#mojoSkipped(org.apache.maven.execution.ExecutionEvent)
*/
public
void
mojoSkipped
(
ExecutionEvent
event
)
{
// TODO ?
maven3Builder
.
listener
.
getLogger
().
println
(
"mojoSkipped "
);
}
/**
* @see org.apache.maven.execution.ExecutionListener#mojoStarted(org.apache.maven.execution.ExecutionEvent)
*/
public
void
mojoStarted
(
ExecutionEvent
event
)
{
initMojoStartTime
(
event
.
getProject
()
);
maven3Builder
.
listener
.
getLogger
().
println
(
"mojoStarted "
+
event
.
getMojoExecution
().
getArtifactId
());
reccordMojoStarted
(
event
);
}
public
void
reccordMojoStarted
(
ExecutionEvent
event
)
{
initMojoStartTime
(
event
.
getProject
()
);
MavenProject
mavenProject
=
event
.
getProject
();
XmlPlexusConfiguration
xmlPlexusConfiguration
=
new
XmlPlexusConfiguration
(
event
.
getMojoExecution
().
getConfiguration
()
);
...
...
@@ -444,15 +463,19 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
}
}
}
}
}
/**
* @see org.apache.maven.execution.ExecutionListener#mojoSucceeded(org.apache.maven.execution.ExecutionEvent)
*/
public
void
mojoSucceeded
(
ExecutionEvent
event
)
{
maven3Builder
.
listener
.
getLogger
().
println
(
"mojoSucceeded "
+
event
.
getMojoExecution
().
getArtifactId
());
reccordMojoSucceeded
(
event
);
}
public
void
reccordMojoSucceeded
(
ExecutionEvent
event
)
{
Long
startTime
=
getMojoStartTime
(
event
.
getProject
()
);
Date
endTime
=
new
Date
();
maven3Builder
.
listener
.
getLogger
().
println
(
"mojoSucceeded "
+
event
.
getMojoExecution
().
getArtifactId
());
MavenProject
mavenProject
=
event
.
getProject
();
XmlPlexusConfiguration
xmlPlexusConfiguration
=
new
XmlPlexusConfiguration
(
event
.
getMojoExecution
().
getConfiguration
()
);
...
...
@@ -492,13 +515,17 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
}
}
}
}
}
/**
* @see org.apache.maven.execution.ExecutionListener#mojoFailed(org.apache.maven.execution.ExecutionEvent)
*/
public
void
mojoFailed
(
ExecutionEvent
event
)
{
maven3Builder
.
listener
.
getLogger
().
println
(
"mojoFailed "
+
event
.
getMojoExecution
().
getArtifactId
());
reccordMojoFailed
(
event
);
}
public
void
reccordMojoFailed
(
ExecutionEvent
event
)
{
Long
startTime
=
getMojoStartTime
(
event
.
getProject
()
);
Date
endTime
=
new
Date
();
MavenProject
mavenProject
=
event
.
getProject
();
...
...
@@ -541,49 +568,61 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
}
}
}
}
}
/**
* @see org.apache.maven.execution.ExecutionListener#forkStarted(org.apache.maven.execution.ExecutionEvent)
*/
public
void
forkStarted
(
ExecutionEvent
event
)
{
// TODO !
maven3Builder
.
listener
.
getLogger
().
println
(
"forkStarted "
);
reccordMojoStarted
(
event
);
}
/**
* @see org.apache.maven.execution.ExecutionListener#forkSucceeded(org.apache.maven.execution.ExecutionEvent)
*/
public
void
forkSucceeded
(
ExecutionEvent
event
)
{
// TODO !
maven3Builder
.
listener
.
getLogger
().
println
(
"forkSucceeded "
);
reccordMojoSucceeded
(
event
);
}
/**
* @see org.apache.maven.execution.ExecutionListener#forkFailed(org.apache.maven.execution.ExecutionEvent)
*/
public
void
forkFailed
(
ExecutionEvent
event
)
{
// TODO !
maven3Builder
.
listener
.
getLogger
().
println
(
"forkFailed "
);
reccordMojoFailed
(
event
);
}
/**
* @see org.apache.maven.execution.ExecutionListener#forkedProjectStarted(org.apache.maven.execution.ExecutionEvent)
*/
public
void
forkedProjectStarted
(
ExecutionEvent
event
)
{
// TODO !
maven3Builder
.
listener
.
getLogger
().
println
(
"forkedProjectStarted "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
()
+
event
.
getProject
().
getVersion
()
);
reccordProjectStarted
(
event
);
}
/**
* @see org.apache.maven.execution.ExecutionListener#forkedProjectSucceeded(org.apache.maven.execution.ExecutionEvent)
*/
public
void
forkedProjectSucceeded
(
ExecutionEvent
event
)
{
// TODO !
maven3Builder
.
listener
.
getLogger
().
println
(
"forkedProjectSucceeded "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
()
+
event
.
getProject
().
getVersion
());
reccordProjectSucceeded
(
event
);
}
/**
* @see org.apache.maven.execution.ExecutionListener#forkedProjectFailed(org.apache.maven.execution.ExecutionEvent)
*/
public
void
forkedProjectFailed
(
ExecutionEvent
event
)
{
// TODO !
maven3Builder
.
listener
.
getLogger
().
println
(
"forkedProjectFailed "
+
event
.
getProject
().
getGroupId
()
+
":"
+
event
.
getProject
().
getArtifactId
()
+
":"
+
event
.
getProject
().
getVersion
());
reccordProjectFailed
(
event
);
}
}
...
...
maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
浏览文件 @
3ab72a8e
...
...
@@ -469,7 +469,9 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
mvn
=
mvn
.
forEnvironment
(
envVars
).
forNode
(
Computer
.
currentComputer
().
getNode
(),
listener
);
String
mavenVersion
=
getModuleRoot
().
act
(
new
MavenVersionCallable
(
mvn
.
getHome
()
));
if
(
debug
)
{
logger
.
println
(
"mavenVersion "
+
mavenVersion
+
" for mavenHome "
+
mvn
.
getHome
());
}
if
(!
project
.
isAggregatorStyleBuild
())
{
parsePoms
(
listener
,
logger
,
envVars
,
mvn
);
// start module builds
...
...
pom.xml
浏览文件 @
3ab72a8e
...
...
@@ -318,7 +318,7 @@ THE SOFTWARE.
<dependency>
<groupId>
org.sonatype.sisu
</groupId>
<artifactId>
sisu-inject-plexus
</artifactId>
<version>
1.4.
2
</version>
<version>
1.4.
3.1
</version>
</dependency>
<dependency>
<groupId>
org.codehaus.plexus
</groupId>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录