提交 0bf43484 编写于 作者: J Jesse Glick

[FIXED JENKINS-17724] /about was not showing licenses.

A recent Stapler update caused the Jelly facet to ignore *.xml.
So need to use raw j:include (as plugins were doing), not st:include (as core did).
上级 13461b93
......@@ -57,6 +57,9 @@ Upcoming changes</a>
<ul class=image>
<li class=rfe>
Can use <code>-Dhudson.udp=-1</code> to disable UDP broadcast without showing an ugly exception.
<li class=bug>
Third-party license display for core was broken since 1.506.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17724">issue 17724</a>)
<li class=rfe>
<code>/about</code> now links to license information for plugins as well.
<li class=rfe>
......
package hudson;
import hudson.model.ManagementLink;
import java.net.URL;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
/**
* Show "About Jenkins" link.
......@@ -27,4 +30,10 @@ public class AboutJenkins extends ManagementLink {
public String getDescription() {
return Messages.AboutJenkins_Description();
}
@Restricted(NoExternalUse.class)
public URL getLicensesURL() {
return AboutJenkins.class.getResource("/META-INF/licenses.xml");
}
}
......@@ -35,9 +35,17 @@ THE SOFTWARE.
<p>
${%dependencies}
</p>
<t:thirdPartyLicenses>
<st:include page="/META-INF/licenses.xml" optional="true" />
</t:thirdPartyLicenses>
<j:set var="uri" value="${it.licensesURL}"/>
<j:choose>
<j:when test="${uri != null}">
<t:thirdPartyLicenses>
<j:include uri="${uri}"/>
</t:thirdPartyLicenses>
</j:when>
<j:otherwise>
<p>${%No information recorded}</p>
</j:otherwise>
</j:choose>
<p>${%plugin.dependencies}</p>
<ul>
<j:forEach var="p" items="${app.pluginManager.plugins}"> <!-- XXX sort -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册