424598 - Module [npn] downloads wrong npn jar

+ Cleanup of --list-config output
This commit is contained in:
Joakim Erdfelt 2014-01-06 10:16:43 -07:00
parent 7af87b4a04
commit 907eb6b03b
2 changed files with 41 additions and 7 deletions

View File

@ -84,9 +84,9 @@ public class Module
private String logicalName; private String logicalName;
/** The depth of the module in the tree */ /** The depth of the module in the tree */
private int depth = 0; private int depth = 0;
/** List of Modules, by name, that this Module depends on */ /** Set of Modules, by name, that this Module depends on */
private Set<String> parentNames; private Set<String> parentNames;
/** List of Modules, by name, that this Module optionally depend on */ /** Set of Modules, by name, that this Module optionally depend on */
private Set<String> optionalParentNames; private Set<String> optionalParentNames;
/** The Edges to parent modules */ /** The Edges to parent modules */
private Set<Module> parentEdges; private Set<Module> parentEdges;
@ -239,7 +239,7 @@ public class Module
{ {
return parentNames; return parentNames;
} }
public Set<String> getSources() public Set<String> getSources()
{ {
return Collections.unmodifiableSet(sources); return Collections.unmodifiableSet(sources);

View File

@ -164,9 +164,33 @@ public class Modules implements Iterable<Module>
ordered.addAll(modules.values()); ordered.addAll(modules.values());
Collections.sort(ordered,new Module.NameComparator()); Collections.sort(ordered,new Module.NameComparator());
List<Module> active = resolveEnabled();
for (Module module : ordered) for (Module module : ordered)
{ {
System.out.printf("%nModule: %s%n",module.getName()); boolean activated = active.contains(module);
boolean enabled = module.isEnabled();
boolean transitive = activated && !enabled;
char status = '-';
if (enabled)
{
status = '*';
}
else if (transitive)
{
status = '+';
}
System.out.printf("%n %s Module: %s%n",status,module.getName());
if (!module.getName().equals(module.getFilesystemRef()))
{
System.out.printf(" Ref: %s%n",module.getFilesystemRef());
}
for (String parent : module.getParentNames())
{
System.out.printf(" Parent: %s%n",parent);
}
for (String lib : module.getLibs()) for (String lib : module.getLibs())
{ {
System.out.printf(" LIB: %s%n",lib); System.out.printf(" LIB: %s%n",lib);
@ -175,14 +199,24 @@ public class Modules implements Iterable<Module>
{ {
System.out.printf(" XML: %s%n",xml); System.out.printf(" XML: %s%n",xml);
} }
System.out.printf(" depends: [%s]%n",Main.join(module.getParentNames(),", "));
if (StartLog.isDebugEnabled()) if (StartLog.isDebugEnabled())
{ {
System.out.printf(" depth: %d%n",module.getDepth()); System.out.printf(" depth: %d%n",module.getDepth());
} }
for (String source : module.getSources()) if (activated)
{ {
System.out.printf(" enabled: %s%n",source); for (String source : module.getSources())
{
System.out.printf(" Enabled: <via> %s%n",source);
}
if (transitive)
{
System.out.printf(" Enabled: <via transitive reference>%n");
}
}
else
{
System.out.printf(" Enabled: <not enabled in this configuration>%n");
} }
} }
} }