@@ -570,7 +570,8 @@ private static String convertEhcacheNameToPropertiesKey(String ehcacheName, Set<
570570 * @param args
571571 */
572572 public static void main(String[] args) {
573-
573+
574+
574575 GrouperInstaller grouperInstaller = new GrouperInstaller();
575576
576577 grouperInstaller.mainLogic();
@@ -9410,19 +9411,6 @@ private void mainBuildContainerLogic() {
94109411 //Find out the working directory. This ends in a file separator
94119412 this.grouperTarballDirectoryString = grouperUpgradeTempDirectory();
94129413
9413- //####################################
9414- //get default ip address
9415- System.out.print("Enter the default IP address for checking ports (just hit enter to accept the default unless on a machine with no network, might want to change to 127.0.0.1): [0.0.0.0]: ");
9416- this.defaultIpAddress = readFromStdIn("grouperInstaller.autorun.defaultIpAddressForPorts");
9417-
9418- if (GrouperInstallerUtils.isBlank(this.defaultIpAddress)) {
9419- this.defaultIpAddress = "0.0.0.0";
9420- }
9421-
9422- if (!GrouperInstallerUtils.equals("0.0.0.0", this.defaultIpAddress)) {
9423- System.out.println("Note, you will probably need to change the hsql IP address, and tomcat server.xml IP addresses...");
9424- }
9425-
94269414 this.version = getClass().getPackage().getImplementationVersion();
94279415 if (this.version == null) {
94289416 // when you are running directly from eclipse without the jar file
@@ -9452,18 +9440,23 @@ private void mainBuildContainerLogic() {
94529440
94539441 grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper"));
94549442 grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper-ws"+File.separator+"grouper-ws"));
9455- grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper-ws/ grouper-ws-scim"));
9443+ grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper-ws" + File.separator + " grouper-ws-scim"));
94569444 grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper-ui"));
9445+ grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper-misc" + File.separator + "grouper-messaging-activemq"));
9446+ grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper-misc" + File.separator + "grouper-messaging-aws"));
9447+ grouperProjects.add(new File(grouperUntarredReleaseDir + File.separator + "grouper-misc" + File.separator + "grouper-messaging-rabbitmq"));
94579448
94589449 List<String> commands = new ArrayList<String>();
9459-
94609450 addMavenCommands(commands);
94619451
9452+ commands.add("-DincludeScope=runtime");
9453+ commands.add("-DexcludeArtifactIds=grouper,grouperClient");
9454+
94629455 commands.add("dependency:copy-dependencies");
94639456
94649457 for (File file: grouperProjects) {
94659458 System.out.println("\n##################################");
9466- System.out.println("Building "+ file.getName()+" with command:\n"
9459+ System.out.println("Downloading third party jars for "+ file.getName()+" with command:\n"
94679460 + convertCommandsIntoCommand(commands) + "\n");
94689461
94699462 CommandResult commandResult = GrouperInstallerUtils.execCommand(GrouperInstallerUtils.toArray(commands, String.class),
@@ -9510,10 +9503,18 @@ private void mainBuildContainerLogic() {
95109503 GrouperInstallerUtils.copyDirectory(jarsDirectory, libDir, null, true);
95119504 }
95129505 } catch (Exception e) {
9513- //TODO handle it appropriately
95149506 throw new RuntimeException("Could not copy jars from dependency directories ", e);
95159507 }
95169508
9509+ // delete all grouper snapshots jars from WEB-INF/lib
9510+ List<File> allLibraryJars = findAllLibraryFiles(libDir.getAbsolutePath());
9511+
9512+ for (File file: allLibraryJars) {
9513+ if (file.getName().contains("grouper") && file.getName().contains("SNAPSHOT")) {
9514+ GrouperInstallerUtils.fileDelete(file);
9515+ }
9516+ }
9517+
95179518 // now copy grouper/conf, grouper-ws/conf, grouper-ui/conf and grouperClient/conf to classesDir
95189519 try {
95199520 for (File file: grouperProjects) {
@@ -9523,7 +9524,6 @@ private void mainBuildContainerLogic() {
95239524 }
95249525 }
95259526 } catch (Exception e) {
9526- //TODO handle it appropriately
95279527 throw new RuntimeException("Could not copy files from conf directory to classes directory", e);
95289528 }
95299529
@@ -9566,7 +9566,6 @@ private void mainBuildContainerLogic() {
95669566 try {
95679567 GrouperInstallerUtils.copyDirectory(tomeeUntarredDir, containerTomeeDir, null, true);
95689568 } catch (Exception e) {
9569- // TODO: handle it appropriately
95709569 throw new RuntimeException("Could not copy untarred tomee into container/tomee", e);
95719570 }
95729571
@@ -11974,9 +11973,14 @@ private void downloadGrouperJarsIntoLibDirectory(File destinationPath) {
1197411973 String basePath = "https://oss.sonatype.org/service/local/repositories/releases/content/edu/internet2/middleware/grouper/";
1197511974
1197611975 List<String> urlsToDownload = new ArrayList<String>();
11976+ urlsToDownload.add(basePath+"grouper/"+this.version+"/grouper-"+this.version+".jar");
11977+ urlsToDownload.add(basePath+"grouperClient/"+this.version+"/grouperClient-"+this.version+".jar");
1197711978 urlsToDownload.add(basePath+"grouper-ws/"+this.version+"/grouper-ws-"+this.version+".jar");
1197811979 urlsToDownload.add(basePath+"grouper-ui/"+this.version+"/grouper-ui-"+this.version+".jar");
1197911980 urlsToDownload.add(basePath+"grouper-ws-scim/"+this.version+"/grouper-ws-scim-"+this.version+".jar");
11981+ urlsToDownload.add(basePath+"grouper-messaging-aws/"+this.version+"/grouper-messaging-aws-"+this.version+".jar");
11982+ urlsToDownload.add(basePath+"grouper-messaging-rabbitmq/"+this.version+"/grouper-messaging-rabbitmq-"+this.version+".jar");
11983+ urlsToDownload.add(basePath+"grouper-activemq/"+this.version+"/grouper-activemq-"+this.version+".jar");
1198011984
1198111985 for (String urlToDownload: urlsToDownload) {
1198211986 String fileName = urlToDownload.substring(urlToDownload.lastIndexOf(File.separator)+1, urlToDownload.length());
0 commit comments