Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2014-08-22 01:48:55 +0000
committerGreg Wilkins2014-08-22 01:48:55 +0000
commit589d05afe01f05a3943c5880653fcb2fb8a814d1 (patch)
tree4978a8396a560d8d5361979d9dc1dd58630bff54 /jetty-start
parent8619a12ca06022897c12ca71a04fe76634ba5215 (diff)
downloadorg.eclipse.jetty.project-589d05afe01f05a3943c5880653fcb2fb8a814d1.tar.gz
org.eclipse.jetty.project-589d05afe01f05a3943c5880653fcb2fb8a814d1.tar.xz
org.eclipse.jetty.project-589d05afe01f05a3943c5880653fcb2fb8a814d1.zip
Added 3rd party module licenses
Diffstat (limited to 'jetty-start')
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java22
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Module.java17
2 files changed, 38 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 d19b85ca1f..ce4cf601c9 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
@@ -82,6 +82,7 @@ import org.eclipse.jetty.start.config.CommandLineConfigSource;
public class Main
{
private static final int EXIT_USAGE = 1;
+ private static BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
public static String join(Collection<?> objs, String delim)
{
@@ -372,6 +373,7 @@ public class Main
StartLog.warn("ERROR: No known module for %s",name);
return;
}
+
// Find any named ini file and check it follows the convention
Path start_ini = baseHome.getBasePath("start.ini");
@@ -393,8 +395,26 @@ public class Main
boolean hasDefinedDefaults = module.getDefaultConfig().size() > 0;
// If it is not enabled or is transitive with ini template lines or toplevel and doesn't exist
- if (!module.isEnabled() || (transitive && hasDefinedDefaults) || (topLevel && !FS.exists(startd_ini) && !appendStartIni))
+ if (!module.isEnabled() || (transitive && (hasDefinedDefaults || module.hasLicense()) ) || (topLevel && !FS.exists(startd_ini) && !appendStartIni))
{
+ if (module.hasLicense())
+ {
+ System.err.printf("%nModule %s LICENSE%n",module.getName());
+ System.err.printf("This module is not provided by the Eclipse Foundation!%n");
+ System.err.printf("It contains software not covered by the Eclipse Public License%n");
+ System.err.printf("The software has not been audited for compliance with its license%n");
+ System.err.printf("%n");
+ for (String l : module.getLicense())
+ System.err.printf(" %s%n",l);
+
+ System.err.printf("%nProceed (y/N)? ");
+ String line = input.readLine();
+
+ if (line==null || line.length()==0 || !line.toLowerCase().startsWith("y"))
+ System.exit(1);
+ }
+
+
// File BufferedWriter
BufferedWriter writer = null;
String source = null;
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java
index dc0de1ced5..db9e40a5cd 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java
@@ -103,6 +103,8 @@ public class Module
private List<String> files;
/** List of jvm Args */
private List<String> jvmArgs;
+ /** License lines */
+ private List<String> license;
/** Is this Module enabled via start.jar command line, start.ini, or start.d/*.ini ? */
private boolean enabled = false;
@@ -263,6 +265,16 @@ public class Module
return jvmArgs;
}
+ public boolean hasLicense()
+ {
+ return license!=null && license.size()>0;
+ }
+
+ public List<String> getLicense()
+ {
+ return license;
+ }
+
@Override
public int hashCode()
{
@@ -283,6 +295,7 @@ public class Module
libs = new ArrayList<>();
files = new ArrayList<>();
jvmArgs = new ArrayList<>();
+ license = new ArrayList<>();
String name = basehome.toShortForm(file);
@@ -356,6 +369,10 @@ public class Module
case "LIB":
libs.add(line);
break;
+ case "LICENSE":
+ case "LICENCE":
+ license.add(line);
+ break;
case "NAME":
logicalName = line;
break;

Back to the top