449003 - WARNING: Cannot enable requested module [protonego-impl]: not a valid module name

+ Making protonego-impl/(npn|alpn).mod not contain default configuration
This commit is contained in:
Joakim Erdfelt 2014-10-30 15:04:02 -07:00
parent d970e3d58b
commit 43b3cd9f46
5 changed files with 17 additions and 20 deletions

View File

@ -31,10 +31,6 @@ lib/jetty-alpn-server-${jetty.version}.jar
lib/ lib/
lib/alpn/ lib/alpn/
[ini-template]
# alpn.protocols=h2-14,http/1.1
# alpn.defaultProtocol=http/1.1
[license] [license]
ALPN is a hosted at github under the GPL v2 with ClassPath Exception. 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. ALPN replaces/modifies OpenJDK classes in the java.sun.security.ssl package.

View File

@ -13,3 +13,12 @@ protonego-impl/${protonego}
# and the future HTTP/2 spec # and the future HTTP/2 spec
# Note: java 1.8+ are ALPN only. # Note: java 1.8+ are ALPN only.
protonego=alpn 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

View File

@ -31,10 +31,6 @@ lib/jetty-npn-server-${jetty.version}.jar
lib/ lib/
lib/npn/ lib/npn/
[ini-template]
# npn.protocols=spdy/3,http/1.1
# npn.defaultProtocol=http/1.1
[license] [license]
NPN is a hosted at github under the GPL v2 with ClassPath Exception. 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. NPN replaces/modifies OpenJDK classes in the java.sun.security.ssl package.

View File

@ -377,6 +377,7 @@ public class Main
return; return;
} }
boolean transitive = module.isEnabled() && (module.getSources().size() == 0);
// Find any named ini file and check it follows the convention // Find any named ini file and check it follows the convention
Path start_ini = baseHome.getBasePath("start.ini"); 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; boolean buildIni=false;
if (module.isEnabled()) if (module.isEnabled())
{ {
@ -406,13 +406,9 @@ public class Main
// else is it transitive // else is it transitive
else if (transitive) else if (transitive)
{ {
// do we need an ini anyway? if (module.hasDefaultConfig())
if (module.hasDefaultConfig() || module.hasLicense())
{ {
buildIni = true; buildIni = true;
}
else
{
StartLog.info("%-15s initialised transitively",name); StartLog.info("%-15s initialised transitively",name);
} }
} }
@ -430,7 +426,6 @@ public class Main
buildIni=true; buildIni=true;
} }
// If we need an ini // If we need an ini
if (buildIni) if (buildIni)
{ {
@ -466,7 +461,6 @@ public class Main
} }
} }
// File BufferedWriter // File BufferedWriter
BufferedWriter writer = null; BufferedWriter writer = null;
String source = null; String source = null;
@ -495,12 +489,12 @@ public class Main
{ {
out.println(); out.println();
} }
out.println("#"); out.println("# --------------------------------------- ");
out.println("# Initialize module " + name); out.println("# Module: " + name);
out.println("#");
Pattern p = Pattern.compile("--module=([^,]+)(,([^,]+))*"); Pattern p = Pattern.compile("--module=([^,]+)(,([^,]+))*");
out.println("--module=" + name); out.println("--module=" + name);
args.parse("--module=" + name,source); args.parse("--module=" + name,source);
modules.enable(name,Collections.singletonList(source)); modules.enable(name,Collections.singletonList(source));
for (String line : module.getDefaultConfig()) for (String line : module.getDefaultConfig())

View File

@ -97,6 +97,7 @@ public class Module
private List<String> xmls; private List<String> xmls;
/** List of ini template lines */ /** List of ini template lines */
private List<String> defaultConfig; private List<String> defaultConfig;
private boolean hasDefaultConfig = false;
/** List of library options for this Module */ /** List of library options for this Module */
private List<String> libs; private List<String> libs;
/** List of files for this Module */ /** List of files for this Module */
@ -222,7 +223,7 @@ public class Module
public boolean hasDefaultConfig() public boolean hasDefaultConfig()
{ {
return (defaultConfig != null) && (defaultConfig.size() > 0); return hasDefaultConfig;
} }
public List<String> getLibs() public List<String> getLibs()
@ -365,6 +366,7 @@ public class Module
case "DEFAULTS": case "DEFAULTS":
case "INI-TEMPLATE": case "INI-TEMPLATE":
defaultConfig.add(line); defaultConfig.add(line);
hasDefaultConfig = true;
break; break;
case "LIB": case "LIB":
libs.add(line); libs.add(line);