X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=BRMSGateway%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fbrms%2Fapi%2FBrmsPush.java;h=ee94c6f96f3c546fdb225a47f02af3c9947f3dce;hb=068d0f8fe17d13e4f3000b1c9033675068e5532e;hp=45f65851ebd5d01d6173ac8b9bfa739692a30427;hpb=ce75201a88f6787c7f5aed265c32134e1a116761;p=policy%2Fengine.git diff --git a/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java b/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java index 45f65851e..ee94c6f96 100644 --- a/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java +++ b/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java @@ -117,7 +117,7 @@ public class BrmsPush { private static final Logger LOGGER = FlexLogger.getLogger(BrmsPush.class.getName()); private static final String PROJECTSLOCATION = "RuleProjects"; private static final String[] GOALS = {"clean", "deploy"}; - private static final String DEFAULT_VERSION = "1.6.0-SNAPSHOT"; + private static final String DEFAULT_VERSION = "1.6.1-SNAPSHOT"; private static final String DEPENDENCY_FILE = "dependency.json"; private static final String PROP_AES_KEY = "org.onap.policy.encryption.aes.key"; public static final String BRMSPERSISTENCE = "brmsEclipselink.persistencexml"; @@ -256,8 +256,8 @@ public class BrmsPush { repUrlList = new ArrayList<>(); repUrlList.add(repUrl); } - repUserName = config.getProperty("repositoryUsername"); - repPassword = PeCryptoUtils.decrypt(config.getProperty("repositoryPassword")); + repUserName = getValue(config.getProperty("repositoryUsername")); + repPassword = PeCryptoUtils.decrypt(getValue(config.getProperty("repositoryPassword"))); if (repUserName == null || repPassword == null) { LOGGER.error(XACMLErrorConstants.ERROR_DATA_ISSUE + "repostoryUserName and respositoryPassword properties are required."); @@ -367,6 +367,13 @@ public class BrmsPush { } + private String getValue(final String value) { + if (value != null && value.matches("[$][{].*[}]$")) { + return System.getenv(value.substring(2, value.length() - 1)); + } + return value; + } + private static void setBackupMonitor(final BackUpMonitor instance) { bm = instance; }