-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DHFPROD-1693 Use CMA with ml-gradle 3.11 (#1764)
* DHFPROD-1693 Use CMA with ml-gradle 3.11 * DHFPROD-1693 Leave amps when SNAPSHOT and set CMA as part of pre-install
- Loading branch information
Showing
77 changed files
with
150 additions
and
856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/util/CMASettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.marklogic.hub.deploy.util; | ||
|
||
import com.marklogic.appdeployer.AppConfig; | ||
import com.marklogic.hub.impl.Versions; | ||
|
||
public class CMASettings { | ||
private String mlVersion = null; | ||
private static CMASettings cmaSettings = null; | ||
|
||
public static synchronized CMASettings getInstance() { | ||
if (cmaSettings == null) { | ||
cmaSettings = new CMASettings(); | ||
} | ||
return cmaSettings; | ||
} | ||
|
||
public void setCmaSettings(AppConfig appConfig) { | ||
if (mlVersion == null) { | ||
this.mlVersion = new Versions(appConfig).getMarkLogicVersion(); | ||
} | ||
if (mlVersion.matches("^[9]\\.0-([56789]|[0-9]{2,})(\\.\\d+)?")) { | ||
appConfig.setDeployForestsWithCma(true); | ||
appConfig.setDeployPrivilegesWithCma(true); | ||
if (mlVersion.matches("^[9]\\.0-([6789]|[0-9]{2,})(\\.\\d+)?")) { | ||
appConfig.setDeployAmpsWithCma(true); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.