Modifications for featureUtility commands

You can modify several behaviors of the featureUtility commands by declaring environment variables in the shell environment or by specifying properties in the featureUtility.properties file that’s located in the {wlp.install.dir}/etc/ directory.

Properties that are specified in the featureUtility.properties file take precedence over environment variables that are declared in the shell environment. For example, if you specify the featureLocalRepo property in the featureUtility.properties file, then any value set with the FEATURE_LOCAL_REPO environment variable is overridden. You can specify modifications to the featureUtility commands by using properties in the featureUtility.properties file rather than environment variables. You can also easily see Maven repository and proxy settings that are contained in the featureUtility.properties file by running the featureUtility viewSettings command. Settings that are configured with environment variables don’t show up with this information.

The following table lists the environment variables and their corresponding properties that you can specify to modify the featureUtility commands:

Environment variableCorresponding propertiesDescription

FEATURE_REPO_URL

mavenCentralMirror.url

Overrides Maven Central with an on-premises Maven repository.

FEATURE_REPO_USER

mavenCentralMirror.user

The username for FEATURE_REPO_URL user credentials.

FEATURE_REPO_PASSWORD

mavenCentralMirror.password

The password for FEATURE_REPO_URL user credentials.

FEATURE_LOCAL_REPO

featureLocalRepo

Overrides the local Maven repository.

http_proxy

proxyHost, proxyPort, proxyUser, and proxyPassword

Configures the outbound HTTP proxy.

https_proxy

proxyHost, proxyPort, proxyUser, and proxyPassword

Configures the outbound HTTPS proxy.


Install user features

You can specify the maven coordinates for the features BOM file to install user features by adding the customBomFileName.featuresbom property in the featureUtility.properties file, as shown in the following example:

customBomFileName.featuresbom=my.maven.coordinate:my-features-bom:version

Define custom repositories

You can also define remote repositories by adding the customRepoName.url property in the featureUtility.properties file. Each repository name must be unique, and defined repositories are accessed in the order that they’re specified. If a repository requires a username and password, also set the customRepoName.user and customRepoName.password properties. In the following example, two custom repositories, remoteRepo1 and remoteRepo2, are defined. The remoteRepo2 repository is secure so it also requires a username and password:

remoteRepo1.url=http://my-remote-server1/maven2
remoteRepo2.url=https://my-remote-server2/secure/maven2
remoteRepo2.user=operator
remoteRepo2.password={aes}KM8dhwcv892Ss1sawu9R+