Skip to content

Commit 1f1a8df

Browse files
committed
SystemInformation: list libraries separately
This makes things a little easier to read.
1 parent 79fe37e commit 1f1a8df

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

src/main/java/org/scijava/plugins/commands/debug/SystemInformation.java

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
package org.scijava.plugins.commands.debug;
3333

3434
import java.io.File;
35+
import java.io.IOException;
36+
import java.net.JarURLConnection;
37+
import java.net.URL;
3538
import java.util.ArrayList;
3639
import java.util.Collections;
3740
import java.util.Comparator;
@@ -47,6 +50,7 @@
4750
import org.scijava.app.AppService;
4851
import org.scijava.app.StatusService;
4952
import org.scijava.command.Command;
53+
import org.scijava.log.LogService;
5054
import org.scijava.plugin.Parameter;
5155
import org.scijava.plugin.Plugin;
5256
import org.scijava.plugin.PluginInfo;
@@ -80,6 +84,9 @@ public class SystemInformation implements Command {
8084
@Parameter
8185
private StatusService statusService;
8286

87+
@Parameter
88+
private LogService log;
89+
8390
@Parameter(label = "System Information", type = ItemIO.OUTPUT)
8491
private String info;
8592

@@ -121,9 +128,6 @@ public void run() {
121128

122129
final List<POM> poms = POM.getAllPOMs();
123130

124-
sb.append(NL);
125-
sb.append("-- Libraries --" + NL);
126-
127131
// check for library version clashes
128132
final HashMap<String, POM> pomsByGA = new HashMap<String, POM>();
129133
for (final POM pom : poms) {
@@ -155,15 +159,16 @@ public void run() {
155159
final String orgURL = pom.getOrganizationURL();
156160
final String title = name == null ? groupId + ":" + artifactId : name;
157161

158-
sb.append(title + ":" + NL);
159-
if (pomPath != null) sb.append("\tpath = " + pomPath + NL);
160-
if (groupId != null) sb.append("\tgroupId = " + groupId + NL);
161-
if (artifactId != null) sb.append("\tartifactId = " + artifactId + NL);
162-
if (version != null) sb.append("\tversion = " + version + NL);
163-
if (url != null) sb.append("\tproject URL = " + url + NL);
164-
if (year != null) sb.append("\tinception year = " + year + NL);
165-
if (orgName != null) sb.append("\torganization name = " + orgName + NL);
166-
if (orgURL != null) sb.append("\torganization URL = " + orgURL + NL);
162+
sb.append(NL);
163+
sb.append("-- Library: " + title + " --" + NL);
164+
if (pomPath != null) sb.append("path = " + pomPath + NL);
165+
if (groupId != null) sb.append("groupId = " + groupId + NL);
166+
if (artifactId != null) sb.append("artifactId = " + artifactId + NL);
167+
if (version != null) sb.append("version = " + version + NL);
168+
if (url != null) sb.append("project URL = " + url + NL);
169+
if (year != null) sb.append("inception year = " + year + NL);
170+
if (orgName != null) sb.append("organization name = " + orgName + NL);
171+
if (orgURL != null) sb.append("organization URL = " + orgURL + NL);
167172
}
168173

169174
statusService.showProgress(++progress, max);

0 commit comments

Comments
 (0)