-
Notifications
You must be signed in to change notification settings - Fork 179
Gradle build properties
The gradle.properties
file is a way to specify options to a Gradle build. It's documented here. The following are the contents of Christian's ~/.gradle/gradle.properties
file as of 2016-12-02, along with an explanation of what the properties do.
# For tests annotated with NeedsCdmUnitTest
systemProp.unidata.testdata.path=/Users/cwardgar/dev/data
# For tests annotated with NeedsContentRoot
systemProp.tds.content.root.path=/Users/cwardgar/dev/projects/thredds2/tds/src/test/content
# For Dennis's thredds.server.reify.TestDownload
systemProp.tds.download.dir=/tmp/download
# Location of NetCDF-4 C library
systemProp.jna.library.path=/opt/netcdf-4.4.1/lib
# For signing Web Start jars and syncing them to our web server.
# "/web" is on www.unidata.ucar.edu
keystore=PRIVATE
keystoreAlias=PRIVATE
keystorePassword=PRIVATE
webdir=/Volumes/web/content/software/thredds/v4.6/netcdf-java
# Publishing
nexus.username=PRIVATE
nexus.password=PRIVATE
# For https://coveralls.io/github/Unidata/thredds
coveralls.repo.token=PRIVATE
# For https://sonarqube.com/dashboard/index/thredds
sonarqube.user.token=PRIVATE
All PRIVATE
values can be found on the UCAR wiki.
-
systemProp.unidata.testdata.path
: sets theunidata.testdata.path
system property, for use by tests annotated withNeedsCdmUnitTest
. You should comment this one out unless you have a local copy of our test data like I do. -
systemProp.tds.content.root.path
: sets thetds.content.root.path
system property, for use by tests annotated withNeedsContentRoot
. All of the catalogs that we need for our tests already exist in the repo attds/src/test/content
. However, I believe the path needs to be absolute (e.g./Users/cwardgar/dev/projects/thredds2/tds/src/test/content
), so modify as needed. -
systemProp.tds.download.dir
: sets thetds.download.dir
system property, which is used by Dennis'sthredds.server.reify.TestDownload
-
systemProp.jna.library.path
: sets thejna.library.path
system property, which points to the directory in which libnetcdf is installed.
Java Web Start requires that jars be signed, so that clients can verify that those artifacts came from the expected source and have not been tampered with. We use the following properties in :ui:releaseWebstart
for signing:
-
keystore
: location of the Unidata keystore database, which contains the key pair and certificate that we use to sign jars. -
keystoreAlias
: identifies the key pair and certificate within the keystore that we're signing with. -
keystorePassword
: the password that protects the keystore.
webdir
is the network directory to which Web Start artifacts are deployed (in :ui:releaseWebstart
) and to which Javadoc artifacts are deployed (in :cdm:releaseDocs
and :ui:releaseDocs
). The complete path is www.unidata.ucar.edu:/web/content/software/thredds/v${release.major}/netcdf-java/
, where ${release.major}
refers to the truncated, 2-part version string (e.g. 4.6
). You'll need to mount www.unidata.ucar.edu:/web/
to some directory on your file system. For example, on OSX I've mounted it to /Volumes/web/
, which results in webdir=/Volumes/web/content/software/thredds/v4.6/netcdf-java
.
nexus.username
and nexus.password
are the login credentials to the Unidata Nexus server. The :publish
task needs those values in order to deploy Maven artifacts to the Releases and Snapshots repositories.
coveralls.repo.token
is the access token associated with our Coveralls code coverage report. It is used by the :coveralls
task to upload new metrics after unit tests are run.
sonarqube.user.token
is the access token associated with our SonarQube static analysis report. It is used by the :sonarqube
task to upload new metrics.
All of the above properties can be set on the command-line, instead of in gradle.properties
. In fact, that is what we do on Jenkins. You can see it in the "Build->Switches" section of the thredds5.0 configuration page.