/dirxml-simulator/pom.properties in " + jar
+ + ". Expected a dirxml-simulator " + version + " jar (bin/install-deps installs it).";
notes.add(detail);
fields.put("detail", detail);
return new Check("simulator", false, "simulator: FAIL " + version + " has no simulator version", notes, fields);
@@ -642,7 +643,11 @@ static String redact(String message, String secret) {
private static String embeddedVersion(Path jar) throws IOException {
try (JarFile jf = new JarFile(jar.toFile())) {
- JarEntry entry = jf.getJarEntry("META-INF/maven/com.pointblue.dirxml/dirxml-simulator/pom.properties");
+ // com.pointbluetech.dirxml from simulator 1.9.0 (Maven Central); com.pointblue.dirxml before.
+ JarEntry entry = jf.getJarEntry("META-INF/maven/com.pointbluetech.dirxml/dirxml-simulator/pom.properties");
+ if (entry == null) {
+ entry = jf.getJarEntry("META-INF/maven/com.pointblue.dirxml/dirxml-simulator/pom.properties");
+ }
if (entry == null) {
return null;
}
diff --git a/src/main/java/com/pointblue/dirxml/dev/source/ApplicationType.java b/src/main/java/com/pointblue/dirxml/dev/source/ApplicationType.java
index 52d68569..30bfe725 100644
--- a/src/main/java/com/pointblue/dirxml/dev/source/ApplicationType.java
+++ b/src/main/java/com/pointblue/dirxml/dev/source/ApplicationType.java
@@ -35,7 +35,7 @@
* wrote): the User Application driver is {@code NProv} and the Role and Resource driver
* {@code NrfApp} — neither has a driver definition of its own, and Designer's defs map
* {@code ComposerDriverShim} to {@code PIVWorkflow}, which is not what it uses. And a SCIM
- * driver keeps {@code GenericApp}: {@code test11pf}'s {@code MITLL-Druva} is a
+ * driver keeps {@code GenericApp}: {@code test11pf}'s Druva driver is a
* {@code SCIM-Driver} whose application Designer typed {@code GenericApp}, even though a
* {@code SCIM} application type exists.
*/
diff --git a/src/test/java/com/pointblue/dirxml/dev/DoctorTest.java b/src/test/java/com/pointblue/dirxml/dev/DoctorTest.java
index da3bdf9f..68f43307 100644
--- a/src/test/java/com/pointblue/dirxml/dev/DoctorTest.java
+++ b/src/test/java/com/pointblue/dirxml/dev/DoctorTest.java
@@ -269,6 +269,25 @@ public void endpointDropsUserinfo() {
assertEquals("(no url)", Doctor.endpoint(" "));
}
+ @Test
+ public void simulatorJarIsReadUnderTheOldAndTheNewGroupId() throws Exception {
+ for (String groupId : new String[] {"com.pointblue.dirxml", "com.pointbluetech.dirxml"}) {
+ Doctor.Request req = base();
+ writeJars(req.home);
+ req.simJar = simJar(Doctor.PROJECT_SIM_VERSION, groupId);
+ String text = Doctor.check(req).text();
+ assertTrue(groupId + ": " + text, text.contains("simulator: OK " + Doctor.PROJECT_SIM_VERSION));
+ }
+ }
+
+ @Test
+ public void theLauncherDefaultIsTheNewGroupIdPath() {
+ Doctor.Request req = base();
+ String path = req.simJar().toString().replace('\\', '/');
+ assertTrue(path, path.endsWith("/.m2/repository/com/pointbluetech/dirxml/dirxml-simulator/"
+ + Doctor.PROJECT_SIM_VERSION + "/dirxml-simulator-" + Doctor.PROJECT_SIM_VERSION + ".jar"));
+ }
+
private Doctor.Request ready() throws Exception {
Doctor.Request req = base();
writeJars(req.home);
@@ -296,10 +315,15 @@ private void writeJars(Path home) throws IOException {
}
private Path simJar(String version) throws IOException {
- Path jar = tmp.getRoot().toPath().resolve("dirxml-simulator-" + version + ".jar");
- String body = "version=" + version + "\ngroupId=com.pointblue.dirxml\nartifactId=dirxml-simulator\n";
+ return simJar(version, "com.pointblue.dirxml");
+ }
+
+ /** A jar that carries only the pom.properties a simulator jar carries, under that groupId. */
+ private Path simJar(String version, String groupId) throws IOException {
+ Path jar = tmp.getRoot().toPath().resolve("dirxml-simulator-" + version + "-" + groupId + ".jar");
+ String body = "version=" + version + "\ngroupId=" + groupId + "\nartifactId=dirxml-simulator\n";
try (JarOutputStream jos = new JarOutputStream(Files.newOutputStream(jar), manifest())) {
- JarEntry entry = new JarEntry("META-INF/maven/com.pointblue.dirxml/dirxml-simulator/pom.properties");
+ JarEntry entry = new JarEntry("META-INF/maven/" + groupId + "/dirxml-simulator/pom.properties");
jos.putNextEntry(entry);
jos.write(body.getBytes(StandardCharsets.UTF_8));
jos.closeEntry();
diff --git a/src/test/java/com/pointblue/dirxml/dev/SyntheticDriverSet.java b/src/test/java/com/pointblue/dirxml/dev/SyntheticDriverSet.java
index 1ce11675..8be7724f 100644
--- a/src/test/java/com/pointblue/dirxml/dev/SyntheticDriverSet.java
+++ b/src/test/java/com/pointblue/dirxml/dev/SyntheticDriverSet.java
@@ -36,7 +36,7 @@
* the generator, which is the reminder to regenerate after a writer change:
*
* mvn -q -o test-compile
- * java -cp "target/test-classes:target/classes:lib/*:$HOME/.m2/repository/com/pointblue/dirxml/dirxml-simulator/<ver>/dirxml-simulator-<ver>.jar:<junit-4 jar>:<hamcrest-core jar>" com.pointblue.dirxml.dev.SyntheticDriverSet
+ * java -cp "target/test-classes:target/classes:lib/*:$HOME/.m2/repository/com/pointbluetech/dirxml/dirxml-simulator/<ver>/dirxml-simulator-<ver>.jar:<junit-4 jar>:<hamcrest-core jar>" com.pointblue.dirxml.dev.SyntheticDriverSet
*
*/
public final class SyntheticDriverSet {