提交 1ed7733f 编写于 作者: K Kohsuke Kawaguchi

Added API

上级 cee86fbb
......@@ -27,6 +27,7 @@ import hudson.FilePath;
import hudson.Util;
import hudson.maven.MavenBuild;
import hudson.maven.MavenBuildProxy;
import hudson.model.Api;
import hudson.model.BuildListener;
import hudson.model.FingerprintMap;
import hudson.model.Hudson;
......@@ -48,7 +49,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.Serializable;
import java.net.URL;
import java.util.Map;
import java.util.logging.Logger;
......@@ -281,6 +281,10 @@ public final class MavenArtifact implements Serializable {
map.getOrCreate(build,fileName,md5sum);
}
public Api getApi() {
return new Api(this);
}
private static final Logger LOGGER = Logger.getLogger(MavenArtifact.class.getName());
private static final long serialVersionUID = 1L;
......
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Simon Wiest
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.
-->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<h2>Artifact Download</h2>
<p>
<a href="../mainArtifact/file">primary artifact</a>,
<a href="../pomArtifact/file">primary artifact</a>,
<a href="../attachedArtifacts/0/file">attached artifact #1</a>,
<a href="../attachedArtifacts/1/file">attached artifact #2</a>, etc., all have
stable URLs that's not affected by their GAV IDs (if you want to access them through GAV IDs,
you can do so through the artifacts link.) Swap the last <tt>file</tt> with <tt>api</tt>
and you can retrieve their GAV IDs and other information, such as
<a href="../mainArtifact/api/">this</a>.
</p>
</j:jelly>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册