******************************************************************************************************
*
*     This documentation describes some of the properties that you will want to set in your
*     gradle.properties file.  A simple example gradle.properties file, that includes defining
*     the path to the trustStore (needed for Gradle 6.3), is shown at the end.  To run with
*     JDK 14, Gradle 6.3+ is required.
*
******************************************************************************************************

Determines the usage of Nexus and Maven Central

In general, most larger organizations will follow a formal Configuration Management process and
maintain an in-house Nexus instance that provided proxy and caching support for the pulling of
any third-party (3P) libraries (often it will proxy to Maven Cental, but may have some steps
such as virus scanning). The same Nexus will be used to share internal, second-party (2P),
libraries within the organization. Smaller organizations and home are gnerally less formal and 
go direct to maven central.

Although it is possible to directly interact with both Nexus and Maven Central, it's less common
and requires explicityly setting useMavenCentral=true. It is also possible to completely disable
all use of Nexus and Maven Central (by omitting all of the Nexus settings and setting
useMavenCentral=false), but this is very rare and requires the user to have local access to any
libraries they require.

+===================+===================+=================+==================+========================+
| Pull 3P Libraries | Pull 2P libraries | Upload Release  | Upload Snapshot  |         Notes          |
+===================+===================+================+===================+========================+
|                                       | nexusReleaseUrl | nexusSnapshotUrl | This is the default if |
|              nexusPublicUrl           +=================+==================+ either nexusUrl or     |
|                                       |          nexusUploadUrl            | nexusPublicUrl are     |
|                                       |            (optional)              | set                    |
|---------------------------------------+------------------------------------+                        |
|                                   nexusUrl                                 |                        |
+===================+===================+====================================+========================|
|                   |                   | nexusReleaseUrl | nexusSnapshotUrl | This requires setting  |
|                   |   nexusPublicUrl  +=================+==================+ userMavenCentral=true  |
|    Maven Central  |                   |          nexusUploadUrl            |                        |
|                   |                   |            (optional)              |                        |
|                   +-------------------+------------------------------------+                        |
|                   |               nexusUrl                                 |                        |
+===================+===================+====================================+========================|
|   Maven Central   |      localDeps    |          Maven Local               | This is the default if |
|                   |                   |       (this is suboptimal)         | Nexus is not used      |
|---------------------------------------+------------------------------------+                        |
|               local deps              |          Maven Local               | This requires setting  |
|                   +                   |       (this is suboptimal)         | useMavenCentral=false  |
|              Maven Local              |                                    |                        |
+=======================================+====================================+========================+

Nexus Settings:
   nexusUser           - The Nexus user name, defaults to the local user name.
   nexusPassword       - The Nexus password, defaults to an empty string since the password is
                         typically irrelevant when using nexusPublicUrl
   nexusToken          - An alias for nexusPassword, typically used with automated builds
   nexusPublicUrl      - The "public" URL used for pulling libraries
   nexusReleaseUrl     - the URL used for uploading formal releases in situations where formal
                         releases are kept separate from snapshot releases
   nexusSnapshotUrl    - The URL used for uploading snapshot releases in situations where formal
                         releases are kept separate from snapshot releases
   nexusUploadUrl      - The URL used for uploading formal+snapshot releases in situations where
                         formal and snapshot releases are comingled. This takes priority over
                         nexusReleasUrl and nexusSnapshotUrl
   nexusUrl            - A single URL used for interacting with Nexus. This overrides all of
                         the other Nexus URLs

   All of the above allow use of either "URL" as an alternavie for "Url" (e.g. "nexusURL")
   since there are established conventions for using both forms

Maven Central Settings:
   useMavenCentral      - Explicitly indicates if Maven Central should be used for pulling
                          third-party libraries. Normally this is automatically determined
                          based on the presence/absence of the Nexus settings

Local Dependencies SEttings:
    localDeps           - The local dependencies. This can be any of the following:
                            - A FileTree or any object that supports getAsfileTree()
                            - A comma-separated list of any combination of the following:
                               - A single zip file ending in '.zip'
                                   '/my/path/myzip.zip'
                               - A single tar file inding in '.tar', '.tar.gz', or '.tgz'
                                   '/my/path/mytar.tar'
                                   '/my/path/mytar.tar.gz'
                                   '/my/path/mytar.tgz'
                               - One or more jar files using a simple glob pattern:
                                   '/my/path/myjar.jar'
                                   '/my/path/*.jar'
                                   '/my/path/**/*.jar'
                                -A directory containing JAR files (must end in '/'):
                                   '/my/path/'
                               - A FilePath specifier using the 'dir:[include]:[exclude]' or 'dir:[include]'
                                 syntax. For example:
                                   '/my/path:*.jar:*-SNAPSHOT.jar'
                                   '/my/path:*.jar'
These settings generally go in the user's .gradle/gradle.properties file or in environment
variables (in which case the names are all upper-case). Any setting that starts with '${'
and ends with '}' it will be evaluated as Groovy code within the context of the build. This
allows for chaining and calling of Java functions as applicatble. An (obviously bad) example is
setting nexusPassword to '${nexusUser+"123"}'.

******************************************************************************************************
*
*     Simple example gradle.properties file that should be stored in ~/.gradle
*
******************************************************************************************************

# -----------------------------------------------------------------------
# S2P Nexus
# -----------------------------------------------------------------------

nexusPublicUrl=https://nexus.<path.to.repo>/repository/Central/
#nexusPublicUser=
#nexusPublicToken=

# --------------------------------------------------
# Add my certificate for Nexus client authentication
# --------------------------------------------------
systemProp.javax.net.ssl.keyStore=/home/user/<user>/certs/<user_signing>.p12
systemProp.javax.net.ssl.keyStorePassword=<user_private_key_password>
systemProp.javax.net.ssl.trustStore=/home/user/<user>/cacerts
systemProp.javax.net.ssl.trustStorePassword=changeit
