Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-02-23 23:49:07 +0000
committerJoakim Erdfelt2015-02-23 23:49:07 +0000
commit2141cc2dc34160cc76d9919e6c41b26fca19078c (patch)
treed36637218388a436f86a7473b52e9d5b46f45715
parent3e7b5f0fa918633ec24bd1bc23d6ee76d32c7729 (diff)
downloadorg.eclipse.jetty.project-2141cc2dc34160cc76d9919e6c41b26fca19078c.tar.gz
org.eclipse.jetty.project-2141cc2dc34160cc76d9919e6c41b26fca19078c.tar.xz
org.eclipse.jetty.project-2141cc2dc34160cc76d9919e6c41b26fca19078c.zip
459273 - Redundant license notices
+ Only showing license acknowledgement request screen if [FILES] section contains content that does not (yet) exist
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java2
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Module.java17
2 files changed, 16 insertions, 3 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 14930272da..d2b183ceef 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
@@ -407,7 +407,7 @@ public class Main
if (!args.isApproveAllLicenses())
{
- if (!module.acknowledgeLicense())
+ if (!module.hasFiles(baseHome) && !module.acknowledgeLicense())
{
StartLog.warn(EXITING_LICENSE_NOT_ACKNOWLEDGED);
System.exit(1);
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 33d9a8c112..f1be5043aa 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
@@ -279,7 +279,7 @@ public class Module
{
return true;
}
-
+
System.err.printf("%nModule %s:%n",getName());
System.err.printf(" + contains software not provided by the Eclipse Foundation!%n");
System.err.printf(" + contains software not covered by the Eclipse Public License!%n");
@@ -361,6 +361,20 @@ public class Module
return enabled;
}
+ public boolean hasFiles(BaseHome baseHome)
+ {
+ for (String ref : getFiles())
+ {
+ FileArg farg = new FileArg(this,ref);
+ Path refPath = baseHome.getBasePath(farg.location);
+ if (!Files.exists(refPath))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
public void process(BaseHome basehome) throws FileNotFoundException, IOException
{
Pattern section = Pattern.compile("\\s*\\[([^]]*)\\]\\s*");
@@ -477,5 +491,4 @@ public class Module
str.append(']');
return str.toString();
}
-
}

Back to the top