提交 f43cde68 编写于 作者: P Pedro Rodriguez

Added help-allowEmptyArchive.html. Did some cleanup in ArtifactArchiver and config.jelly

上级 470d9ce8
......@@ -41,6 +41,7 @@ import java.io.File;
import java.io.IOException;
import net.sf.json.JSONObject;
import javax.annotation.Nonnull;
/**
* Copies the artifacts into an archive directory.
......@@ -67,14 +68,9 @@ public class ArtifactArchiver extends Recorder {
/**
* Fail (or not) the build if archiving returns nothing.
*/
@Nonnull
private Boolean allowEmptyArchive;
/**
* Compatibility for systems using the older setting.
*/
private static final Boolean allowEmptyArchiveSystemProp =
Boolean.getBoolean(ArtifactArchiver.class.getName()+".warnOnEmpty");
@DataBoundConstructor
public ArtifactArchiver(String artifacts, String excludes, boolean latestOnly, boolean allowEmptyArchive) {
this.artifacts = artifacts.trim();
......@@ -86,7 +82,7 @@ public class ArtifactArchiver extends Recorder {
// Backwards compatibility for older builds
public Object readResolve() {
if (allowEmptyArchive == null) {
this.allowEmptyArchive = allowEmptyArchiveSystemProp;
this.allowEmptyArchive = Boolean.getBoolean(ArtifactArchiver.class.getName()+".warnOnEmpty");
}
return this;
}
......
......@@ -31,10 +31,10 @@ THE SOFTWARE.
<f:entry title="${%Excludes}" field="excludes">
<f:textbox />
</f:entry>
<f:entry title="" field="latestOnly" >
<f:entry field="latestOnly" >
<f:checkbox title="${%lastBuildOnly}"/>
</f:entry>
<f:entry title="" field="allowEmptyArchive" >
<f:entry field="allowEmptyArchive" >
<f:checkbox title="${%allowEmptyArchive}"/>
</f:entry>
</f:advanced>
......
<div>
Normally, a build fails if archiving returns zero artifacts.
This option allows the archiving process to return nothing without failing the build.
Instead, the build will simply throw a warning.
</div>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册