Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
spaceKeyGrouper
pageTitleNavigation

Overview

Grouper's internal build mechanism is handled via GradleA functional gradle build environment exists in the Github repository in branch "gradle". The build is orchestrated by a parent build.gradle file for the root grouper project and a number of individual build.gradle file for every module that Grouper presently houses. Each build.gradle file inherits from the parent build.gradle file and in turn is able to specify its own requirements for dependency management and source tree structure. The list of Grouper modules that are recognized by the Gradle build is specified via a settings.gradle in a specific order to account for the build dependencies of the modules. There is also one gradle.properties file which hosts specific build settings for the project, such as groupid, java version and dependency versions used throughout the project. 

Build

To run the full build, issue the following command at the root:

...

Code Block
languagebash
# Show all the project dependencies
./gradle dependencies 
 
# Show where a specific dependency for a gradle configuration comes from
./gradle dependencyInsight --dependency <name> --configuration <compile/runtime/testCompile/...>
 
# Prepare an Intellij IDEA workspace for Grouper
./gradle idea
 
# Prepare an Eclipse project workspace for Grouper
./gradle eclipse

Gradle Wrapper Updates

The Gradle wrapper need only exist at the root of the project. The wrapper can be updated to note a specific newer version of a Gradle via the following command:

Code Block
languagebash
./gradle wrapper

Javadocs

To produce the Javadoc for the entire project, run the following command at the root:

...

The above command aggregates the javadocs for all grouper modules inside the root build/javadoc directory. 

Travis CI Builds

Grouper is configured against Travis CI to execute the full build on every commit. Travis builds all grouper branches provided there is a .travis.yml inside the branch at the root of the repository. This is a YAML configuration file that tells Travis what version of Java should be available, which commands to use for the build lifecycle and which scripts to execute after a successful build. 

Info
titleBranch Info

The configuration file must be massaged for every branch to tell Travis to limit the build to that branch only, for faster builds.

Publishing Javadocs

As part of the Travis CI build, Javadocs are published to the gh-pages of the repository, available on the web here, once a successful builds. This is handled via the javadocs-ghpages.sh script that runs after the build. The script will attempt to collect all project javadocs and push them to the appropriate branch. In order for the push to succeed, an OAUTH token is made available to the script to do the job. The OAUTH token must be generated by a developer with push rights to the repo, and must be encrypted and placed inside the .travis.yml file under a "secure" heading. 

...

  • The TOKEN must be generated by you inside your Github profile settings. This is used to allow you to log into Travis.
  • The GH-TOKEN must be generated by you inside your Github profile settings. This is used to allow Travis to push to the gh-pages branch. 
  • When the values are encrypted, they are printed back on the screen. Copy/paste them to the .travis.yml file under env/secure entry. 

Publishing SNAPSHOTs

As part of the Travis CI build, SNAPSHOT artifacts for all grouper modules listed in the settings.gradle file are published to the Sonatype snapshot repositories for Grouper once a successful builds. This is handled via the deploy-to-sonatype.sh script that runs after the build. The script will attempt will collect all JAR artifacts produced by the build and will attempt to publish them. The command that used by the script is:

...

  • The TOKEN must be generated by you inside your Github profile settings
  • When the values are encrypted, they are printed back on the screen. Copy/paste them to the .travis.yml file under env/secure entry. 

Development environment

  • Open morphstring in eclipse
  • Delete .classpath and .project
  • Set java home and path

    Code Block
    C:\Users\mchyzer\Documents\GitHub\grouper\grouper>set JAVA_HOME=C:\dev_inst\java7
    C:\Users\mchyzer\Documents\GitHub\grouper\grouper>set PATH=%JAVA_HOME%\bin;%PATH%


  • sdf

...