提交 616036a1 编写于 作者: K kohsuke

Plugin manager now honors the plugin URL from inside .hpi, not just from the update center.

    (<a href="http://www.nabble.com/Plugin-deployment-issues-td21982824.html">report</a>)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15281 71c3de6d-444a-0410-be80-ed276b4c234a
上级 e651ff60
......@@ -224,6 +224,24 @@ public final class PluginWrapper {
return plugin;
}
/**
* Gets the URL that shows more information about this plugin.
* @return
* null if this information is unavailable.
* @since 1.283
*/
public String getUrl() {
// first look for the manifest entry. This is new in maven-hpi-plugin 1.30
String url = manifest.getMainAttributes().getValue("Url");
if(url!=null) return url;
// fallback to update center metadata
UpdateCenter.Plugin ui = getInfo();
if(ui!=null) return ui.wiki;
return null;
}
@Override
public String toString() {
return "Plugin:" + getShortName();
......
......@@ -52,25 +52,9 @@ THE SOFTWARE.
</td>
<td class="pane">
<h4>
<j:choose>
<j:when test="${p.updateInfo!=null}">
<a href="${p.updateInfo.wiki}">
${p.updateInfo.title}
</a>
</j:when>
<j:otherwise>
<j:choose>
<j:when test="${p.info!=null}">
<div>
<a href="${p.info.wiki}"><st:out value="${p.longName}"/></a>
</div>
</j:when>
<j:otherwise>
${p.longName}
</j:otherwise>
</j:choose>
</j:otherwise>
</j:choose>
<a href="${p.url}">
${h.ifThenElse(p.updateInfo!=null, p.updateInfo.title, p.longName)}
</a>
</h4>
<div stlyle="padding-left: 1em">
<j:set var="indexPage" value="${p.indexPage.toString()}" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册