提交 e605d071 编写于 作者: M mindless

[FIXED HUDSON-1375] Maven modules should not be buildable when the parent project is disabled


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@27254 71c3de6d-444a-0410-be80-ed276b4c234a
上级 d4ee4817
......@@ -425,7 +425,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
return scmCheckoutRetryCount != null;
}
public final boolean isBuildable() {
public boolean isBuildable() {
return !isDisabled();
}
......@@ -661,7 +661,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* For the convenience of the caller, this array can contain null, and those will be silently ignored.
*/
public Future<R> scheduleBuild2(int quietPeriod, Cause c, Action... actions) {
if (isDisabled())
if (!isBuildable())
return null;
List<Action> queueActions = new ArrayList<Action>(Arrays.asList(actions));
......@@ -1388,7 +1388,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
String delay = req.getParameter("delay");
if (delay!=null) {
if (!isDisabled()) {
if (isBuildable()) {
try {
// TODO: more unit handling
if(delay.endsWith("sec")) delay=delay.substring(0,delay.length()-3);
......
......@@ -41,7 +41,7 @@ THE SOFTWARE.
<l:task icon="images/24x24/folder-delete.gif" href="${url}/wipeOutWorkspace" title="${%Wipe Out Workspace}" permission="${it.BUILD}" />
</l:task>
<j:if test="${it.configurable}">
<j:if test="${!it.disabled}">
<j:if test="${it.buildable}">
<l:task icon="images/24x24/clock.gif" href="${url}/build?delay=0sec" title="${%Build Now}"
onclick="${it.parameterized?null:'return build(this)'}" permission="${it.BUILD}" />
<script>
......@@ -72,4 +72,4 @@ THE SOFTWARE.
<st:include it="${w}" page="index.jelly" />
</j:forEach>
</l:side-panel>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -143,6 +143,12 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
return false;
}
@Override
public boolean isBuildable() {
// not buildable if the parent project is disabled
return super.isBuildable() && getParent().isBuildable();
}
/**
* Computes the list of {@link MavenModule}s that are 'under' this POM filesystem-wise. The list doens't include
* this module itself.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册