| 1 |
Cave Converter |
| 2 |
-------------- |
| 3 |
Copyright (C) 2009-2017 Paul Fretwell - aka 'Footleg' ([email protected]) |
| 4 |
|
| 5 |
Cave Converter is free software: you can redistribute it and/or modify |
| 6 |
it under the terms of the GNU General Public License as published by |
| 7 |
the Free Software Foundation, either version 3 of the License, or |
| 8 |
(at your option) any later version. |
| 9 |
|
| 10 |
Cave Converter is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
GNU General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with Cave Converter. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
|
| 18 |
------------------------------------------------------------------------------- |
| 19 |
Building from Source |
| 20 |
-------------------- |
| 21 |
Cave Converter can be built from the Java source code using the provided ant |
| 22 |
build script. But first you will need to download some dependencies required |
| 23 |
to build the source, run the unit tests and generate code coverage reports for |
| •24 |
the tests. |
| 25 |
|
| •26 |
apt-get install cobertura junit |
| 27 |
|
| •28 |
build.xml expects to find these in the normal debian java library |
| 29 |
directory below /usr/share/java/ |
| 30 |
|
| 31 |
(you can install newer versions from upstream and edit the paths in |
| 32 |
the build.xml to point to the jar files if you want to use a different |
| 33 |
location or version). |
| 34 |
|
| 35 |
Once the dependencies are in place (and you have Java JDK 7 or later and Apache |
| 36 |
Ant 1.8 or later configured in your environment), you can run the following ant |
| 37 |
commands from a command prompt in the CaveConverter_src folder where you |
| 38 |
unzipped the source. |
| 39 |
NOTE: To enable the ant script to work on Linux (Debian) with Open-JDK it was |
| 40 |
necessary to define the env.JAVA_HOME property in the build.properties file. |
| 41 |
This was not necessary when building on a Windows machine where the system |
| 42 |
environment variable JAVA_HOME was already pointing to a JDK. |
| 43 |
To build on Debian I added this line to build.properties: |
| 44 |
env.JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/ |
| 45 |
|
| 46 |
To build and run all tests, just type: |
| 47 |
ant |
| 48 |
|
| 49 |
To just build the release distribution: |
| 50 |
ant zip |
| 51 |
|
| 52 |
This should generate the jar file in a build folder, and a complete |
| 53 |
distributable zip file in a dist folder. |
| 54 |
|
| 55 |
To run full unit and regression tests, and generate code coverage reports: |
| 56 |
ant coverage.regressions |
| 57 |
|
| 58 |
To generate the Javadoc: |
| 59 |
ant javadoc |
| 60 |
|
| 61 |
To do a full clean build and generate everything (this is the default target): |
| 62 |
ant all |
| 63 |
|
| 64 |
Other primary ant targets can be listed by running: |
| 65 |
ant -p |
| 66 |
|
| 67 |
Note that some internal targets will not work with the source distribution |
| 68 |
as they are related to code in development which is not yet functional :-) |
| 69 |
|
| 70 |
This source package has been put together with the full code needed to build |
| 71 |
the command line cave converter tool using OpenJDK7 |