Skip to content

Commit

Permalink
Merge pull request #372 from ncats/awmisc_adjust_jars_and_version_chg
Browse files Browse the repository at this point in the history
Make changes for version shift
  • Loading branch information
blueSwordfish authored Sep 24, 2024
2 parents d333521 + e62026b commit 0087d63
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
Binary file removed extraJars/applications-api-3.1-SNAPSHOT.jar
Binary file not shown.
Binary file added extraJars/applications-api-3.1.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified extraJars/products-api-3.1.1-SNAPSHOT.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public class SubstancesPomsVersionTest {

// Set to true when testing in IDE
boolean turnOffPomParameterCheck = false;

String shortVersion;
String longVersion;
String starterModuleVersion;
String substancesModuleVersion;
String otherModuleVersion;
String rootDir;
String propertiesFile;
String installExtraJarsScriptText;
Expand All @@ -40,11 +40,14 @@ public void setup() {

try {
Properties properties = PomUtilities.readPomVersionProperties(rootDir + "/" + propertiesFile);
shortVersion = properties.getProperty("project.shortVersion");
longVersion = properties.getProperty("project.longVersion");
assertNotNull(shortVersion);
System.out.println("shortVersion: " + shortVersion);
System.out.println("longVersion: " + longVersion);


starterModuleVersion = properties.getProperty("sm.pomversiontest.starterModuleVersion");
substancesModuleVersion = properties.getProperty("sm.pomversiontest.substancesModuleVersion");
assertNotNull(starterModuleVersion);
assertNotNull(substancesModuleVersion);
System.out.println("starterModuleVersion: " + starterModuleVersion);
System.out.println("substancesModuleVersion: " + substancesModuleVersion);
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand All @@ -66,16 +69,16 @@ public void testPomCheck() {
rootModel = PomUtilities.readPomToModel(rootDir + "/pom.xml");
Properties properties = rootModel.getProperties();
System.out.println("> checking root");
assertEquals( longVersion, rootModel.getVersion(), "version");
assertEquals(longVersion, properties.getProperty("gsrs.version"), "gsrs.version:");
assertEquals( substancesModuleVersion, rootModel.getVersion(), "version");
assertEquals(starterModuleVersion, properties.getProperty("gsrs.version"), "gsrs.version:");
List<String> modules = rootModel.getModules();
for (String module : modules) {
System.out.println("> checking "+ module);
Model moduleModel;
try {
moduleModel = PomUtilities.readPomToModel(rootDir + "/" + module + "/pom.xml");
String checkVersion = moduleModel.getParent().getVersion();
assertEquals (longVersion, checkVersion, "parent/version");
assertEquals (substancesModuleVersion, checkVersion, "parent/version");

if (module.equals("gsrs-fda-substance-extension")) {
List<Dependency> dependencies = moduleModel.getDependencies();
Expand Down
5 changes: 3 additions & 2 deletions pom-version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# For use in project pom version check test
project.shortVersion=3.1.1
project.longVersion=3.1.1-SNAPSHOT
sm.pomversiontest.starterModuleVersion=3.1.1
sm.pomversiontest.substancesModuleVersion=3.1.1.1
sm.pomversiontest.otherModuleVersion=3.1.1-SNAPSHOT

0 comments on commit 0087d63

Please sign in to comment.