|
32 | 32 | package org.scijava.plugins.commands.debug; |
33 | 33 |
|
34 | 34 | import java.io.File; |
| 35 | +import java.io.IOException; |
| 36 | +import java.net.JarURLConnection; |
| 37 | +import java.net.URL; |
35 | 38 | import java.util.ArrayList; |
36 | 39 | import java.util.Collections; |
37 | 40 | import java.util.Comparator; |
|
47 | 50 | import org.scijava.app.AppService; |
48 | 51 | import org.scijava.app.StatusService; |
49 | 52 | import org.scijava.command.Command; |
| 53 | +import org.scijava.log.LogService; |
50 | 54 | import org.scijava.plugin.Parameter; |
51 | 55 | import org.scijava.plugin.Plugin; |
52 | 56 | import org.scijava.plugin.PluginInfo; |
@@ -80,6 +84,9 @@ public class SystemInformation implements Command { |
80 | 84 | @Parameter |
81 | 85 | private StatusService statusService; |
82 | 86 |
|
| 87 | + @Parameter |
| 88 | + private LogService log; |
| 89 | + |
83 | 90 | @Parameter(label = "System Information", type = ItemIO.OUTPUT) |
84 | 91 | private String info; |
85 | 92 |
|
@@ -121,9 +128,6 @@ public void run() { |
121 | 128 |
|
122 | 129 | final List<POM> poms = POM.getAllPOMs(); |
123 | 130 |
|
124 | | - sb.append(NL); |
125 | | - sb.append("-- Libraries --" + NL); |
126 | | - |
127 | 131 | // check for library version clashes |
128 | 132 | final HashMap<String, POM> pomsByGA = new HashMap<String, POM>(); |
129 | 133 | for (final POM pom : poms) { |
@@ -155,15 +159,16 @@ public void run() { |
155 | 159 | final String orgURL = pom.getOrganizationURL(); |
156 | 160 | final String title = name == null ? groupId + ":" + artifactId : name; |
157 | 161 |
|
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); |
167 | 172 | } |
168 | 173 |
|
169 | 174 | statusService.showProgress(++progress, max); |
|
0 commit comments