Skip to content

Development environment

Chris Maloney edited this page Jul 14, 2015 · 9 revisions

To build the code and do development, you'll need:

  • Java JDK v5 or later, for compiling Java sources. Run java -version and javac on the command line to see if it's there.
  • Apache Ant, for building. Run ant on the command line to see if it's there.

Getting the source

Get the code by forking the GitHub repository and cloning your fork, or directly clone the main repository. For example,

git clone https://github.com/ncbi/DtdAnalyzer.git

Building with ant

DtdAnalyzer uses Apache Ant as its build system. You can run ant -p from the project's main directory to get an overview of available targets:

To run the DtdAnalyzer tools, you need to do at least ant jar.

ant all Generate distribution files in zip and tar.gz formats
ant clean Deletes all generated artefacts
ant compile Compile project classes
ant compile.tests Compile test classes
ant jar Generate project jar file
ant javadoc Generate Javadoc API documentation
ant tar Generate distribution file in tar.gz format
ant zip Generate distribution file in zip format

Testing

There are a few tests scattered about, here and there.

dtd2xml2json

See test/xml2json

dtdflatten

See test/dtdflatten/test.pl. This is pretty rudimentary. It flattens the NISO JATS 1.0 archiving DTD, and validates a simple test file against it.

Clone this wiki locally