diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-01-04 14:43:44 -0600 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-01-04 14:43:44 -0600 |
commit | 777131d706b8379c5fb30f8161902d0388eb96bf (patch) | |
tree | cca309d2b46d4772682afdb9fc0c4f0798a86869 /packages/base/src/files | |
parent | d803757e8696a4383b57e0ee619687b820225550 (diff) |
Add tooling for drools policy developers
This commit adds tooling to better support development activities
for drools developers.
1. deploy artifacts to nexus or to local file repository on demand.
It also allows to test on a single drools instance without the
dependency on a nexus repo.
2. make installation configuration files conform to same
convention (all upper case).
Change-Id: Ia0a2fc25db2ef21b774a9eee4ed51d4b876a1993
Issue-ID: POLICY-1367
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'packages/base/src/files')
-rw-r--r-- | packages/base/src/files/etc/profile.d/env.sh | 20 | ||||
-rwxr-xr-x | packages/base/src/files/m2/settings.xml | 43 | ||||
-rwxr-xr-x | packages/base/src/files/m2/standalone-settings.xml | 7 |
3 files changed, 47 insertions, 23 deletions
diff --git a/packages/base/src/files/etc/profile.d/env.sh b/packages/base/src/files/etc/profile.d/env.sh index 97076606..833064fe 100644 --- a/packages/base/src/files/etc/profile.d/env.sh +++ b/packages/base/src/files/etc/profile.d/env.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ### # ============LICENSE_START======================================================= # Base Package @@ -18,15 +19,16 @@ # ============LICENSE_END========================================================= ### -export POLICY_HOME=${{POLICY_HOME}} -export POLICY_LOGS=${{POLICY_LOGS}} -export JAVA_HOME=${{JAVA_HOME}} -export ENGINE_MANAGEMENT_USER=${{ENGINE_MANAGEMENT_USER}} -export ENGINE_MANAGEMENT_PASSWORD=${{ENGINE_MANAGEMENT_PASSWORD}} -export ENGINE_MANAGEMENT_PORT=${{ENGINE_MANAGEMENT_PORT}} -export ENGINE_MANAGEMENT_HOST=${{ENGINE_MANAGEMENT_HOST}} +set -a -for x in $POLICY_HOME/bin $JAVA_HOME/bin $HOME/bin ; do +POLICY_HOME=${{POLICY_HOME}} + +source ${POLICY_HOME}/etc/build.info +for c in ${POLICY_HOME}/etc/profile.d/*.conf ; do + source ${c} +done + +for x in ${POLICY_HOME}/bin ${JAVA_HOME}/bin ${HOME}/bin ; do if [ -d $x ] ; then case ":$PATH:" in *":$x:"*) :;; # already there @@ -34,3 +36,5 @@ for x in $POLICY_HOME/bin $JAVA_HOME/bin $HOME/bin ; do esac fi done + +set +a diff --git a/packages/base/src/files/m2/settings.xml b/packages/base/src/files/m2/settings.xml index 4ec22c1e..63ab214d 100755 --- a/packages/base/src/files/m2/settings.xml +++ b/packages/base/src/files/m2/settings.xml @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= Base Package ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,13 +26,33 @@ <profiles> + <profile> + <id>policy-local</id> + + <repositories> + <repository> + <id>file-repository</id> + <url>file:${user.home}/.m2/file-repository</url> + <releases> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </releases> + <snapshots> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </snapshots> + </repository> + </repositories> + + </profile> + <profile> <id>policy-releases</id> <repositories> <repository> - <id>${{releaseRepositoryID}}</id> - <url>${{releaseRepositoryUrl}}</url> + <id>${env.RELEASE_REPOSITORY_ID}</id> + <url>${env.RELEASE_REPOSITORY_URL}</url> <releases> <enabled>true</enabled> </releases> @@ -49,8 +69,8 @@ <repositories> <repository> - <id>${{snapshotRepositoryID}}</id> - <url>${{snapshotRepositoryUrl}}</url> + <id>${env.SNAPSHOT_REPOSITORY_ID}</id> + <url>${env.SNAPSHOT_REPOSITORY_URL}</url> <releases> <enabled>false</enabled> </releases> @@ -126,6 +146,7 @@ </profiles> <activeProfiles> + <activeProfile>policy-local</activeProfile> <activeProfile>policy-releases</activeProfile> <activeProfile>policy-snapshots</activeProfile> <activeProfile>onap-releases</activeProfile> @@ -135,14 +156,14 @@ <servers> <server> - <id>${{snapshotRepositoryID}}</id> - <username>${{repositoryUsername}}</username> - <password>${{repositoryPassword}}</password> + <id>${env.SNAPSHOT_REPOSITORY_ID}</id> + <username>${env.REPOSITORY_USERNAME}</username> + <password>${env.REPOSITORY_PASSWORD}</password> </server> <server> - <id>${{releaseRepositoryID}}</id> - <username>${{repositoryUsername}}</username> - <password>${{repositoryPassword}}</password> + <id>${env.RELEASE_REPOSITORY_ID}</id> + <username>${env.REPOSITORY_USERNAME}</username> + <password>${env.REPOSITORY_PASSWORD}</password> </server> </servers> diff --git a/packages/base/src/files/m2/standalone-settings.xml b/packages/base/src/files/m2/standalone-settings.xml index 15e37ca1..63f2f92d 100755 --- a/packages/base/src/files/m2/standalone-settings.xml +++ b/packages/base/src/files/m2/standalone-settings.xml @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= Base Package ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -31,8 +31,8 @@ <repositories> <repository> - <id>${{fileRepoID}}</id> - <url>${{fileRepoUrl}}</url> + <id>file-repository</id> + <url>file:${user.home}/.m2/file-repository</url> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> @@ -86,7 +86,6 @@ </profile> <profile> - <id>onap-snapshots</id> <repositories> |