GettingStarted - TeamDewberry/jmxdatamart GitHub Wiki
Welcome to the JMX Data Mart. This page helps you get started with the source code and provides introductory information about Git, Maven, and Cloudbees.
Getting started with Git
Git is a distributed version control system that allows multiple people to contribute to a project without worrying about stepping on each others' toes. The source code for the JMX Data Mart is hosted here on github.
Before you can contribute to this project, you'll need to create an account with github: https://github.com/signup/free. Contact Dave and ask him to give you permission to commit to the repository
Once you are logged in, it is recommended that you make your own fork of the main repository. This will allow you to work in your own sandbox before committing changes back to the main project. https://help.github.com/articles/fork-a-repo
You'll also need to download a git client for your workstation (http://git-scm.com/downloads). Or maybe you can work from your IDE.
Getting started with Maven
Any non-trivial software project should have any automated build system so that contributors can be confident that their changes have the intended effects on the project. That is, you want to make sure that you change don't break anything. There ae a number of build system for Java-bad projects. The JMX data mart uses Apache Maven, a popular and well-supported (albeit XML-based) build system. http://maven.apache.org
After you have installed Maven, you can build the JMX data mart project by executing the following command from the root directory of your git checkout.
$ mvn clean install
The clean
phase will remove any previously built artifacts (class files, jar files, etc.) and the install
phase will compile source and test code, run unit tests, assemble any artifacts (jar files, war files, etc.) execute automated integration tests, and publish/copy artifacts to your local Maven repository. Before committing changes to git, you should always do a clean install
.
Getting started with Jenkins
We want to make sure that the JMX data mart continues to function as expected as contributors make changes to the source code. The automated build process make it easy for us to verify this (if we have good coverage through our automated tests), but in order to give us confidence, we need visibility into the current state of the source code axe.
A continuous integration (CI) server provides this visibility by frequently looking for change to the source code, getting a copy of the source code, building it from scratch (compiling code and running automated tests), and publishing reports and results to a well-known location. The Jenkins continuous integration server (http://jenkins-ci.org/) is a popular, open-source CI tool that supports Java- and Maven-based projects very well.
Even though Jenkins is very esy to install and configure, managing a pubicly available Jenkins server can be a bit of a pain. Luckily, Cloudbees hosts the "build hive" which offers free Jenkins build hosted in the cloud that are available to open source projects. https://buildhive.cloudbees.com. It is freakishly easy to set up a Jenkins build on the build hive and it integrates really well with github.
The continuous integration build for the JMX Data Mart project is hosted at https://buildhive.cloudbees.com/job/TeamDewberry/job/jmxdatamart
You maybe also want to create a Jenkins job for your own fork of the sources like David did: https://buildhive.cloudbees.com/job/DavidWhitlock/job/jmxdatamart
Getting started with FitNesse
FitNesse (http://fitnesse.org/) is a behavior-driven testing framework in which tests are authored as tables. The JMX Data Mart uses fitnesse to verify that !MBeans can be created, extracted, and loaded into the Data Mart. FitNesse tests can be authored in a wiki for easy editing. The JMX Data Mart Maven project has a submodule named fitnesse
for the FitNesse tests. The FitNesse tests are run as part of the integration-test
phase of the Maven build.
$ mvn integration-test
If you want to run just the FitNesse tests, you can run
$ mvn fitnesse:run
In order to get started with FitNesse, I recommend that you start the wiki
$ mvn -Dwiki integration-test
And then browse to http://localhost:8787/DataMartTests to access the wiki. When you create new FitNesse wiki pages, there are files created on disk that you can commit to git.