forked from Klortho/DtdAnalyzer
- Notifications
You must be signed in to change notification settings - Fork 12
Adding a new command
Klortho edited this page Jan 5, 2013 · 3 revisions
Here are the steps to go through to add a new command-line tool to the collection. For the purposes of these instructions, we'll assume the tool is named "dtdexample".
Create command line scripts
- Copy
dtdanalyzer
→dtdexample
anddtdanalyzer.bat
→dtdexample.bat
. - In each of the new scripts, change one and only one thing: the name of the class file invoked on the
java
command line:gov.ncbi.pmc.dtdanalyzer.DtdAnalyzer
→gov.ncbi.pmc.dtdanalyzer.DtdExample
. - Add
dtdexample
to the list of executable files, in theexecfiles
property, inbuild.xml
. This ensures that the Unix scripts have execute permissions inside the generated zip files, when releases are done.
Create the executable Java class
- In
src/gov/ncbi/pmc/dtdanalyzer
, copyDtdAppTemplate.java
→DtdExample.java
- Modify that class file according to the needs of your app. Use any of the others as examples.
Finish up
- Write tests and examples in the
test
directory. - Test on both Unix and Windows.
- Don't forget to add everything to the git repository.