Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2014-10-30 22:04:02 +0000
committerJoakim Erdfelt2014-10-30 22:05:24 +0000
commit43b3cd9f46d7f3ee45a8936d8239adcc09e9114c (patch)
tree39167470ae560067cd07b8885c8643f209a10aac
parentd970e3d58b5f3bf57aaf3e7bc20fc1d7fead8b1d (diff)
downloadorg.eclipse.jetty.project-43b3cd9f46d7f3ee45a8936d8239adcc09e9114c.tar.gz
org.eclipse.jetty.project-43b3cd9f46d7f3ee45a8936d8239adcc09e9114c.tar.xz
org.eclipse.jetty.project-43b3cd9f46d7f3ee45a8936d8239adcc09e9114c.zip
449003 - WARNING: Cannot enable requested module [protonego-impl]: not a valid module name
+ Making protonego-impl/(npn|alpn).mod not contain default configuration
-rw-r--r--jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod4
-rw-r--r--jetty-distribution/src/main/resources/modules/protonego.mod9
-rw-r--r--jetty-npn/jetty-npn-server/src/main/config/modules/protonego-impl/npn.mod4
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java16
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Module.java4
5 files changed, 17 insertions, 20 deletions
diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod
index 5932cbfc22..128adda811 100644
--- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod
+++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn.mod
@@ -31,10 +31,6 @@ lib/jetty-alpn-server-${jetty.version}.jar
lib/
lib/alpn/
-[ini-template]
-# alpn.protocols=h2-14,http/1.1
-# alpn.defaultProtocol=http/1.1
-
[license]
ALPN is a hosted at github under the GPL v2 with ClassPath Exception.
ALPN replaces/modifies OpenJDK classes in the java.sun.security.ssl package.
diff --git a/jetty-distribution/src/main/resources/modules/protonego.mod b/jetty-distribution/src/main/resources/modules/protonego.mod
index d7bba9fbec..fbf4d080e0 100644
--- a/jetty-distribution/src/main/resources/modules/protonego.mod
+++ b/jetty-distribution/src/main/resources/modules/protonego.mod
@@ -13,3 +13,12 @@ protonego-impl/${protonego}
# and the future HTTP/2 spec
# Note: java 1.8+ are ALPN only.
protonego=alpn
+
+# Configuration for NPN
+# npn.protocols=spdy/3,http/1.1
+# npn.defaultProtocol=http/1.1
+
+# Configuration for ALPN
+# alpn.protocols=h2-14,http/1.1
+# alpn.defaultProtocol=http/1.1
+
diff --git a/jetty-npn/jetty-npn-server/src/main/config/modules/protonego-impl/npn.mod b/jetty-npn/jetty-npn-server/src/main/config/modules/protonego-impl/npn.mod
index 8a5787be89..45d99ab031 100644
--- a/jetty-npn/jetty-npn-server/src/main/config/modules/protonego-impl/npn.mod
+++ b/jetty-npn/jetty-npn-server/src/main/config/modules/protonego-impl/npn.mod
@@ -31,10 +31,6 @@ lib/jetty-npn-server-${jetty.version}.jar
lib/
lib/npn/
-[ini-template]
-# npn.protocols=spdy/3,http/1.1
-# npn.defaultProtocol=http/1.1
-
[license]
NPN is a hosted at github under the GPL v2 with ClassPath Exception.
NPN replaces/modifies OpenJDK classes in the java.sun.security.ssl package.
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 3d70195556..f7d8d855d6 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
@@ -377,6 +377,7 @@ public class Main
return;
}
+ boolean transitive = module.isEnabled() && (module.getSources().size() == 0);
// Find any named ini file and check it follows the convention
Path start_ini = baseHome.getBasePath("start.ini");
@@ -394,7 +395,6 @@ public class Main
}
}
- boolean transitive = module.isEnabled() && (module.getSources().size() == 0);
boolean buildIni=false;
if (module.isEnabled())
{
@@ -406,13 +406,9 @@ public class Main
// else is it transitive
else if (transitive)
{
- // do we need an ini anyway?
- if (module.hasDefaultConfig() || module.hasLicense())
+ if (module.hasDefaultConfig())
{
buildIni = true;
- }
- else
- {
StartLog.info("%-15s initialised transitively",name);
}
}
@@ -430,7 +426,6 @@ public class Main
buildIni=true;
}
-
// If we need an ini
if (buildIni)
{
@@ -466,7 +461,6 @@ public class Main
}
}
-
// File BufferedWriter
BufferedWriter writer = null;
String source = null;
@@ -495,12 +489,12 @@ public class Main
{
out.println();
}
- out.println("#");
- out.println("# Initialize module " + name);
- out.println("#");
+ out.println("# --------------------------------------- ");
+ out.println("# Module: " + name);
Pattern p = Pattern.compile("--module=([^,]+)(,([^,]+))*");
out.println("--module=" + name);
+
args.parse("--module=" + name,source);
modules.enable(name,Collections.singletonList(source));
for (String line : module.getDefaultConfig())
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 db9e40a5cd..dadaa02442 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
@@ -97,6 +97,7 @@ public class Module
private List<String> xmls;
/** List of ini template lines */
private List<String> defaultConfig;
+ private boolean hasDefaultConfig = false;
/** List of library options for this Module */
private List<String> libs;
/** List of files for this Module */
@@ -222,7 +223,7 @@ public class Module
public boolean hasDefaultConfig()
{
- return (defaultConfig != null) && (defaultConfig.size() > 0);
+ return hasDefaultConfig;
}
public List<String> getLibs()
@@ -365,6 +366,7 @@ public class Module
case "DEFAULTS":
case "INI-TEMPLATE":
defaultConfig.add(line);
+ hasDefaultConfig = true;
break;
case "LIB":
libs.add(line);

Back to the top