() {
diff --git a/core/src/main/resources/hudson/AboutJenkins/index.jelly b/core/src/main/resources/hudson/AboutJenkins/index.jelly
new file mode 100644
index 0000000000..2e3fb75453
--- /dev/null
+++ b/core/src/main/resources/hudson/AboutJenkins/index.jelly
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+ ${%about(app.VERSION)}
+
+ ${%blurb}
+
+
+
+ ${%dependencies}
+
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/AboutJenkins/index.properties b/core/src/main/resources/hudson/AboutJenkins/index.properties
new file mode 100644
index 0000000000..4f677ba18d
--- /dev/null
+++ b/core/src/main/resources/hudson/AboutJenkins/index.properties
@@ -0,0 +1,4 @@
+about=About Jenkins {0}
+blurb=Jenkins is a community-developed open-source continuous integration server.
+
+dependencies=Jenkins depends on the following 3rd party libraries.
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/Messages.properties b/core/src/main/resources/hudson/Messages.properties
index c0d3d797b5..c4edc3a6d9 100644
--- a/core/src/main/resources/hudson/Messages.properties
+++ b/core/src/main/resources/hudson/Messages.properties
@@ -50,3 +50,5 @@ Util.pastTime={0}
FilePath.TildaDoesntWork=''~'' is only supported in a Unix shell and nowhere else.
PluginManager.DisplayName=Plugin Manager
+AboutJenkins.DisplayName=About Jenkins
+AboutJenkins.Description=See the version and license information
diff --git a/core/src/main/resources/hudson/PluginManager/installed.jelly b/core/src/main/resources/hudson/PluginManager/installed.jelly
index 17b5453dd0..1bc311a098 100644
--- a/core/src/main/resources/hudson/PluginManager/installed.jelly
+++ b/core/src/main/resources/hudson/PluginManager/installed.jelly
@@ -67,7 +67,9 @@ THE SOFTWARE.
- ${p.version}
+
+ ${p.version}
+
|
diff --git a/core/src/main/resources/hudson/PluginWrapper/3rdPartyLicenses.jelly b/core/src/main/resources/hudson/PluginWrapper/3rdPartyLicenses.jelly
new file mode 100644
index 0000000000..1c6e4fa397
--- /dev/null
+++ b/core/src/main/resources/hudson/PluginWrapper/3rdPartyLicenses.jelly
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ ${%about(it.longName+' '+it.version)}
+
+ ${%3rd Party Dependencies}
+
+
+
+
+
+
+ ${%No information recorded}
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/PluginWrapper/3rdPartyLicenses.properties b/core/src/main/resources/hudson/PluginWrapper/3rdPartyLicenses.properties
new file mode 100644
index 0000000000..d01c4dc500
--- /dev/null
+++ b/core/src/main/resources/hudson/PluginWrapper/3rdPartyLicenses.properties
@@ -0,0 +1 @@
+about=About {0}
\ No newline at end of file
diff --git a/core/src/main/resources/lib/hudson/3rdPartyLicenses.jelly b/core/src/main/resources/lib/hudson/3rdPartyLicenses.jelly
new file mode 100644
index 0000000000..4279924160
--- /dev/null
+++ b/core/src/main/resources/lib/hudson/3rdPartyLicenses.jelly
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+ |
+ ${attrs.name}
+ |
+
+ ${attrs.groupId}:${attrs.artifactId}:${attrs.version}
+ |
+
+
+ |
+
+
+
+
+ ${attrs.name}
+
+
+
+
diff --git a/licenseCompleter.groovy b/licenseCompleter.groovy
new file mode 100644
index 0000000000..1d2b550e23
--- /dev/null
+++ b/licenseCompleter.groovy
@@ -0,0 +1,103 @@
+/*
+ This script auguments the missing license information in our dependencies.
+*/
+complete {
+ // license constants
+ def apacheLicense = license("The Apache Software License, Version 2.0","http://www.apache.org/licenses/LICENSE-2.0.txt")
+ def cddl = license("CDDL","http://www.sun.com/cddl/")
+ def lgpl = license("LGPL 2.1","http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html")
+ def mitLicense = license("MIT License","http://www.opensource.org/licenses/mit-license.php")
+ def jenkinsLicense = license("MIT License","http://jenkins-ci.org/mit-license")
+
+
+ match("asm:*") {
+ rewriteLicense([], license("BSD License","http://asm.ow2.org/license.html"))
+ }
+
+ // Apache components
+ // logkit is a part of Avalon
+ match(["org.apache.ant:*","commons-jelly:*","log4j:*","avalon-framework:*","logkit:logkit","oro:oro","org.jvnet.hudson:commons-jelly","org.jvnet.hudson:commons-jelly-tags-define","slide:slide-webdavlib"]) {
+ rewriteLicense([], apacheLicense)
+ }
+
+ // GlassFish components are dual-licensed between CDDL and GPL+Classpath Exception
+ // we elect to take them under CDDL.
+ match(["javax.mail:*","org.jvnet.hudson:activation","org.jvnet:tiger-types","javax.servlet:jstl"]) {
+ rewriteLicense([], cddl)
+ }
+
+ match("antlr:*") {
+ rewriteLicense([], license("BSD License","http://www.antlr.org/license.html"))
+ }
+
+ match("jaxen:jaxen") {
+ rewriteLicense([], license("BSD License","http://jaxen.codehaus.org/license.html"))
+ }
+
+ match("args4j:args4j") {
+ rewriteLicense([], mitLicense)
+ }
+
+ match("*:dom4j") {
+ rewriteLicense([],license("BSD License","http://dom4j.sourceforge.net/dom4j-1.6.1/license.html"))
+ }
+
+ match(["org.codehaus.groovy:*"]) {
+ // see http://groovy.codehaus.org/License+Information
+ // see http://jmdns.sourceforge.net/license.html
+ rewriteLicense([],apacheLicense)
+ }
+
+ match("*:stapler-adjunct-timeline") {
+ rewriteLicense([],license("BSD License","http://simile.mit.edu/license.html"))
+ }
+
+ match("*:txw2") {
+ // see http://java.net/projects/jaxb/sources/version2/content/trunk/txw2/license.txt?rev=3611
+ rewriteLicense([],cddl)
+ }
+
+ match(["org.kohsuke.jinterop:j-interop","org.kohsuke.jinterop:j-interopdeps"]) {
+ rewriteLicense([],license("LGPL v3","http://www.j-interop.org/license.html"))
+ }
+
+ // these are our own modules that have license in the trunk but not in these released versions
+ // as we upgrade them, we should just pick up the license info from POM
+ match(["org.jenkins-ci.modules:instance-identity","org.jvnet.hudson:task-reactor","org.jvnet.hudson:annotation-indexer","*:jinterop-wmi","*:maven2.1-interceptor","*:hudson-maven-embedder"]) {
+ rewriteLicense([],jenkinsLicense)
+ }
+
+ match("*:jna") {
+ rewriteLicense([],lgpl)
+ }
+
+ match(["org.jvnet.localizer:localizer","*:trilead-putty-extension"]) {
+ // see http://java.net/projects/localizer
+ // see http://java.net/projects/trilead-putty-extension/
+ rewriteLicense([],mitLicense);
+ }
+
+ match("org.codehaus.plexus:plexus-interactivity-api") {
+ rewriteLicense([],mitLicense)
+ }
+
+ match("de.zeigermann.xml:xml-im-exporter:1.1") {
+ rewriteLicense([],license("BSD License","http://xml-im-exporter.cvs.sourceforge.net/viewvc/xml-im-exporter/xml-im-exporter/Copying.txt?revision=1.3&view=markup"))
+ }
+
+ match("*:sezpoz") {
+ // GPL-phobia people react to "GPL" strongly, so accept sezpoz under CDDL
+ rewriteLicense([license("CDDL or GPL 2 with Classpath Exception",null)],cddl);
+ }
+
+
+
+
+ //
+ // Choose from multi-licensed modules
+ //==========================================================================
+
+ match("*:jna-posix") {
+ accept("GNU Lesser General Public License Version 2.1")
+ }
+}
diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml
index 95c8ad6f44..ad92a68812 100644
--- a/maven-plugin/pom.xml
+++ b/maven-plugin/pom.xml
@@ -241,7 +241,7 @@ THE SOFTWARE.
org.jenkins-ci.lib
lib-jenkins-maven-artifact-manager
- 1.1
+ 1.2
commons-io
@@ -343,13 +343,20 @@ THE SOFTWARE.
generate
-
+
Messages.properties
target/generated-sources/localizer
+
+ com.cloudbees
+ maven-license-plugin
+
+ target/${project.artifactId}/WEB-INF/licenses.xml
+
+
org.jvnet.maven-antrun-extended-plugin
maven-antrun-extended-plugin
diff --git a/plugins/pom.xml b/plugins/pom.xml
index c91fa29e72..a79b6d66e0 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -192,6 +192,50 @@
+
+ com.cloudbees
+ maven-license-plugin
+ 1.1
+
+
+
+ process
+
+ compile
+
+
+ target/${project.artifactId}/WEB-INF/licenses.xml
+
+ if (e.value.packaging=="hpi")
+ plugins.add(e.key.id)
+ }
+
+ // filter out dependencies that don't belong to this plugin
+ models.entrySet().removeAll(models.entrySet().findAll { e ->
+ def a = e.key;
+
+ if (a.dependencyTrail.size()>0 && plugins.contains(a.dependencyTrail[1]))
+ return true; // ignore transitive dependencies through other plugins
+
+ // if the dependency goes through jenkins core, we don't need to bundle it in the war
+ // because jenkins-core comes in the scope, I think this is a bug in Maven that it puts such
+ // dependencies into the artifact list.
+ if (a.dependencyTrail.find { trail -> trail.contains(":hudson-core:") || trail.contains(":jenkins-core:") })
+ return true;
+
+ return false;
+ })
+ }
+ ]]>
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 6d13ac74fb..c001d496dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,6 +162,23 @@ THE SOFTWARE.
access-modifier-checker
1.0
+
+ com.cloudbees
+ maven-license-plugin
+ 1.1
+
+
+
+ process
+
+ compile
+
+ true
+
+
+
+
+
diff --git a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
index cdada4869e..7690c7a08b 100644
--- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
+++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
@@ -130,14 +130,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.UUID;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.*;
import java.util.jar.Manifest;
import java.util.logging.Filter;
import java.util.logging.Level;
@@ -451,7 +444,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
SocketConnector connector = new SocketConnector();
connector.setHeaderBufferSize(12*1024); // use a bigger buffer as Stapler traces can get pretty large on deeply nested URL
- server.setThreadPool(new ThreadPoolImpl(new ThreadPoolExecutor(1, 10, 10L, TimeUnit.SECONDS, new SynchronousQueue(),new ThreadFactory() {
+ server.setThreadPool(new ThreadPoolImpl(new ThreadPoolExecutor(10, 10, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue(),new ThreadFactory() {
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName("Jetty Thread Pool");
@@ -695,11 +688,14 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
*/
public DumbSlave createSlave(String labels, EnvVars env) throws Exception {
synchronized (hudson) {
- // this synchronization block is so that we don't end up adding the same slave name more than once.
-
int sz = hudson.getNodes().size();
+ return createSlave("slave" + sz,labels,env);
+ }
+ }
- DumbSlave slave = new DumbSlave("slave" + sz, "dummy",
+ public DumbSlave createSlave(String nodeName, String labels, EnvVars env) throws Exception {
+ synchronized (hudson) {
+ DumbSlave slave = new DumbSlave(nodeName, "dummy",
createTmpDir().getPath(), "1", Mode.NORMAL, labels==null?"":labels, createComputerLauncher(env), RetentionStrategy.NOOP, Collections.EMPTY_LIST);
hudson.addNode(slave);
return slave;
|