@@ -13098,7 +13098,6 @@ private File downloadGrouperSourceTagFromGithub() {
1309813098 }
1309913099
1310013100 private void downloadGrouperJarsIntoLibDirectory(File webInfDir) {
13101-
1310213101 String basePath = "https://oss.sonatype.org/service/local/repositories/releases/content/edu/internet2/middleware/grouper/";
1310313102
1310413103 {
@@ -13107,13 +13106,10 @@ private void downloadGrouperJarsIntoLibDirectory(File webInfDir) {
1310713106 List<String> urlsToDownload = new ArrayList<String>();
1310813107 urlsToDownload.add(basePath+"grouper/"+this.version+"/grouper-"+this.version+".jar");
1310913108 urlsToDownload.add(basePath+"grouperClient/"+this.version+"/grouperClient-"+this.version+".jar");
13110- urlsToDownload.add(basePath+"grouper-messaging-aws/"+this.version+"/grouper-messaging-aws-"+this.version+".jar");
13111- urlsToDownload.add(basePath+"grouper-messaging-rabbitmq/"+this.version+"/grouper-messaging-rabbitmq-"+this.version+".jar");
13112- urlsToDownload.add(basePath+"grouper-activemq/"+this.version+"/grouper-activemq-"+this.version+".jar");
1311313109
1311413110 for (String urlToDownload: urlsToDownload) {
1311513111 String fileName = urlToDownload.substring(urlToDownload.lastIndexOf(File.separator)+1, urlToDownload.length());
13116- downloadFile(urlToDownload, libDir.getAbsolutePath() + File.separator+ fileName, "");
13112+ downloadFile(urlToDownload, libDir.getAbsolutePath() + File.separator+ fileName, "grouperInstaller.autorun.buildContainerUseExistingJarIfExists ");
1311713113 }
1311813114 }
1311913115
@@ -13125,29 +13121,29 @@ private void downloadGrouperJarsIntoLibDirectory(File webInfDir) {
1312513121 urlsToDownload.add(basePath+"grouper-activemq/"+this.version+"/grouper-activemq-"+this.version+".jar");
1312613122 for (String urlToDownload: urlsToDownload) {
1312713123 String fileName = urlToDownload.substring(urlToDownload.lastIndexOf(File.separator)+1, urlToDownload.length());
13128- downloadFile(urlToDownload, libUiAndDaemonDir.getAbsolutePath() + File.separator+ fileName, "");
13124+ downloadFile(urlToDownload, libUiAndDaemonDir.getAbsolutePath() + File.separator+ fileName, "grouperInstaller.autorun.buildContainerUseExistingJarIfExists ");
1312913125 }
1313013126 }
1313113127
1313213128 {
1313313129 File libWsDir = new File(webInfDir+File.separator+"libWs");
1313413130 String wsUrlToDownload = basePath+"grouper-ws/"+this.version+"/grouper-ws-"+this.version+".jar";
1313513131 String wsJarfileName = wsUrlToDownload.substring(wsUrlToDownload.lastIndexOf(File.separator)+1, wsUrlToDownload.length());
13136- downloadFile(wsUrlToDownload, libWsDir.getAbsolutePath() + File.separator+ wsJarfileName, "");
13132+ downloadFile(wsUrlToDownload, libWsDir.getAbsolutePath() + File.separator+ wsJarfileName, "grouperInstaller.autorun.buildContainerUseExistingJarIfExists ");
1313713133 }
1313813134
1313913135 {
1314013136 File libUiAndDaemonDir = new File(webInfDir+File.separator+"libUiAndDaemon");
1314113137 String uiUrlToDownload = basePath+"grouper-ui/"+this.version+"/grouper-ui-"+this.version+".jar";
1314213138 String uiJarfileName = uiUrlToDownload.substring(uiUrlToDownload.lastIndexOf(File.separator)+1, uiUrlToDownload.length());
13143- downloadFile(uiUrlToDownload, libUiAndDaemonDir.getAbsolutePath() + File.separator+ uiJarfileName, "");
13139+ downloadFile(uiUrlToDownload, libUiAndDaemonDir.getAbsolutePath() + File.separator+ uiJarfileName, "grouperInstaller.autorun.buildContainerUseExistingJarIfExists ");
1314413140 }
1314513141
1314613142 {
1314713143 File libScimDir = new File(webInfDir+File.separator+"libScim");
1314813144 String scimUrlToDownload = basePath+"grouper-ws-scim/"+this.version+"/grouper-ws-scim-"+this.version+".jar";
1314913145 String scimJarfileName = scimUrlToDownload.substring(scimUrlToDownload.lastIndexOf(File.separator)+1, scimUrlToDownload.length());
13150- downloadFile(scimUrlToDownload, libScimDir.getAbsolutePath() + File.separator+ scimJarfileName, "");
13146+ downloadFile(scimUrlToDownload, libScimDir.getAbsolutePath() + File.separator+ scimJarfileName, "grouperInstaller.autorun.buildContainerUseExistingJarIfExists ");
1315113147 }
1315213148
1315313149 }
@@ -13665,6 +13661,23 @@ private void configureTomeeGrouperUberWebapp(File tommeDir, File webAppDir) {
1366513661 shFiles.add(new File(shFileName));
1366613662 }
1366713663
13664+ // create grouper.xml in conf/Catalina/localhost/grouper.xml
13665+ File tomeeGrouperFile = new File(tommeDir.getAbsolutePath() + File.separator + "conf" + File.separator +
13666+ "Catalina" + File.separator + "localhost" + File.separator + "grouper.xml");
13667+
13668+ GrouperInstallerUtils.createParentDirectories(tomeeGrouperFile);
13669+ GrouperInstallerUtils.fileCreate(tomeeGrouperFile);
13670+
13671+ String contentToWrite = "<Context docBase=\"/opt/grouper/grouperWebapp/\" path=\"/grouperWebapp\" reloadable=\"false\">\n" +
13672+ "<Resources allowLinking=\"true\" />\n" +
13673+ "</Context>";
13674+
13675+ try {
13676+ Files.write(Paths.get(tomeeGrouperFile.getAbsolutePath()), contentToWrite.toString().getBytes(), StandardOpenOption.APPEND);
13677+ } catch (Exception e) {
13678+ System.out.println("Could not write to grouper.xml file.");
13679+ }
13680+
1366813681 }
1366913682
1367013683
@@ -14342,7 +14355,7 @@ private GrouperInstallerMainFunction grouperInstallerMainFunction() {
1434214355
1434314356 GrouperInstallerMainFunction grouperInstallerMainFunctionLocal =
1434414357 (GrouperInstallerMainFunction)promptForEnum(
14345- "Do you want to ' install' a new installation of grouper , 'upgrade' an existing installation,\n"
14358+ "Do you want to install ('installContainer') a new grouper container , 'upgrade' an existing installation,\n"
1434614359 + " 'patch' an existing installation, 'admin' utilities, 'buildContainer', 'installContainer', or 'createPatch' for Grouper developers\n"
1434714360 + " (enter: 'installContainer', 'upgrade', 'patch', 'admin', 'createPatch', 'buildContainer', or blank for the default) ",
1434814361 "grouperInstaller.autorun.actionEgInstallUpgradePatch", GrouperInstallerMainFunction.class,
0 commit comments