Package hudson.maven
Class MavenBuilder
java.lang.Object
jenkins.security.MasterToSlaveCallable<Result,IOException>
hudson.maven.AbstractMavenBuilder
hudson.maven.MavenBuilder
- All Implemented Interfaces:
hudson.remoting.Callable<Result,
,IOException> hudson.remoting.DelegatingCallable<Result,
,IOException> Serializable
,org.jenkinsci.remoting.RoleSensitive
public abstract class MavenBuilder
extends AbstractMavenBuilder
implements hudson.remoting.DelegatingCallable<Result,IOException>
Callable
that invokes Maven CLI (in process) and drives a build.
As a callable, this function returns the build result.
This class defines a series of event callbacks, which are invoked during the build. This allows subclass to monitor the progress of a build.
- Since:
- 1.133
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.maven.AbstractMavenBuilder
AbstractMavenBuilder.FilterImpl
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
Used by selectedMavenReporter
s to notify the maven build agent that even though Maven is going to fail, we should report the build as success.Fields inherited from class hudson.maven.AbstractMavenBuilder
futures, goals, listener, proxies, reporters, sourceProxies, systemProps
-
Constructor Summary
ModifierConstructorDescriptionprotected
MavenBuilder
(BuildListener listener, Collection<MavenModule> modules, List<String> goals, Map<String, String> systemProps) -
Method Summary
Modifier and TypeMethodDescriptioncall()
This code is executed inside the maven jail process.abstract boolean
Whether there where test failures detected during the build.Methods inherited from class hudson.maven.AbstractMavenBuilder
format, formatArgs, getClassLoader, initializeAsynchronousExecutions, isDebug, isQuiet, recordAsynchronousExecution, registerSystemProperties, waitForAsynchronousExecutions
Methods inherited from class jenkins.security.MasterToSlaveCallable
checkRoles
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.remoting.Callable
getChannelOrFail, getOpenChannelOrFail
Methods inherited from interface hudson.remoting.DelegatingCallable
getClassLoader
Methods inherited from interface org.jenkinsci.remoting.RoleSensitive
checkRoles
-
Field Details
-
markAsSuccess
public static boolean markAsSuccessUsed by selectedMavenReporter
s to notify the maven build agent that even though Maven is going to fail, we should report the build as success.This rather ugly hook is necessary to mark builds as unstable, since maven considers a test failure to be a build failure, which will otherwise mark the build as FAILED.
It's OK for this field to be static, because the JVM where this is actually used is in the Maven JVM, so only one build is going on for the whole JVM.
Even though this field is public, please consider this field reserved for
SurefireArchiver
. Subject to change without notice.
-
-
Constructor Details
-
MavenBuilder
protected MavenBuilder(BuildListener listener, Collection<MavenModule> modules, List<String> goals, Map<String, String> systemProps)
-
-
Method Details
-
call
This code is executed inside the maven jail process.- Specified by:
call
in interfacehudson.remoting.Callable<Result,
IOException> - Throws:
IOException
-
hasBuildFailures
public abstract boolean hasBuildFailures()Whether there where test failures detected during the build.- Since:
- 1.496
-