Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-03-13 20:35:04 +0000
committerJoakim Erdfelt2015-03-13 20:35:04 +0000
commit4a4131750195cc27c23ac417df4bde55a2a79c13 (patch)
tree25f38f9659bb1c1207827072206a8c0ff688e00d /jetty-start
parentafa926d45defb451aeb368eb9546cd4d5604867e (diff)
downloadorg.eclipse.jetty.project-4a4131750195cc27c23ac417df4bde55a2a79c13.tar.gz
org.eclipse.jetty.project-4a4131750195cc27c23ac417df4bde55a2a79c13.tar.xz
org.eclipse.jetty.project-4a4131750195cc27c23ac417df4bde55a2a79c13.zip
459273 - Redundant license notices
+ Adding missing .hasFiles() check in download path.
Diffstat (limited to 'jetty-start')
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java2
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/LicenseTest.java27
2 files changed, 28 insertions, 1 deletions
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
index d2b183ceef..9f2de829a0 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
@@ -721,7 +721,7 @@ public class Main
{
for (Module module : args.getAllModules().resolveEnabled())
{
- if (!module.acknowledgeLicense())
+ if (!module.hasFiles(baseHome) && !module.acknowledgeLicense())
{
StartLog.warn(EXITING_LICENSE_NOT_ACKNOWLEDGED);
System.exit(1);
diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/LicenseTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/LicenseTest.java
index d7fc0580aa..5422aa169c 100644
--- a/jetty-start/src/test/java/org/eclipse/jetty/start/LicenseTest.java
+++ b/jetty-start/src/test/java/org/eclipse/jetty/start/LicenseTest.java
@@ -58,6 +58,7 @@ public class LicenseTest
int len = cmds.size();
String args[] = cmds.toArray(new String[len]);
+ System.err.printf("%n## Exec: %s%n", Main.join(cmds,", "));
Main main = new Main();
StartArgs startArgs = main.processCommandLine(args);
main.start(startArgs);
@@ -116,6 +117,32 @@ public class LicenseTest
}
@Test
+ public void testAdd_HttpSpdy_Then_Deploy() throws Exception
+ {
+ File basePath = testdir.getEmptyDir();
+
+ List<String> cmds = getBaseCommandLine(basePath);
+
+ cmds.add("-Dorg.eclipse.jetty.start.ack.license.protonego-impl=true");
+ cmds.add("--add-to-start=http,spdy");
+
+ execMain(cmds);
+
+ String contents = assertFileExists(basePath, "start.ini");
+ assertThat("Contents",contents,containsString("--module=http"+System.lineSeparator()));
+ assertThat("Contents",contents,containsString("--module=spdy"+System.lineSeparator()));
+
+ // now request deploy (no license check should occur)
+ List<String> cmds2 = getBaseCommandLine(basePath);
+ cmds2.add("--add-to-start=deploy");
+ execMain(cmds2);
+
+ contents = assertFileExists(basePath, "start.ini");
+ assertThat("Contents",contents,containsString("--module=deploy"+System.lineSeparator()));
+ assertThat("Contents",contents,containsString("--module=spdy"+System.lineSeparator()));
+ }
+
+ @Test
public void testCreate_SPDY_Licensed() throws Exception
{
File basePath = testdir.getEmptyDir();

Back to the top