-
Notifications
You must be signed in to change notification settings - Fork 10
Build Process
The OCD Service is built via Apache Ant. Actually, there are two build files, build.xml, and ocd_build.xml. Please do only use the ocd_build.xml. Note that Eclipse might illustrate errors for the build file because apparently it is not able to resolve the external target dependencies to the second build file correctly. This should not cause an issue. It is highly recommended that you build the project with Eclipse (To use Java 8 for the older version you may have to go with the Eclipse IDE for Java EE Developers variant) as this is the environment used during development and therefore the best tested one.
When you are going to run the build process the very first time, please make sure to run the target get_deps in order to obtain all dependencies.
Due to the yFiles library being commercial, there are three dependencies which will be missing and must be added manually to the lib folder:
- y.jar forms part of the commercial yFiles library by yWorks which is not publicly available. Therefore you will have to add it manually to the project. The Chair i5 of RWTH Aachen University has a license for the library, so please contact somebody to obtain access. This will obviously only be possible if you are somehow affiliated with the Chair.
- yguard.jar is a free obfuscation tool by yWorks which is only required for public deployment of the service. Anybody can download it from this link. Refer to Deploying the OCD Service for more information. You can probably do without it.
- ysvg.jar is an SVG writer for yFiles Graph2D objects that makes it possible to add useful features to generated SVG diagrams. The library is used for the visualization of graphs and covers.
Please make sure that the program ocd/lfr/LfrBenchmarkLinux is executable (via chmod +x <filename>).
There are numerous targets which can be run. This summarizes the most important ones:
- jar: Generates the service jar in the service and a copy in the export/jars directory. This archive is required for running the service.
- generate_configs: Generates the user and service agents as specified in etc/ant_configuration. The users will be loaded when the service (or more precisely the underlying LAS2peer node) is launched.
- junit: Runs all jUnit tests (except src/test/i5/las2peer/services/ocd/DatabaseInitializer.java, take look at the target setup_database for more information). The test reports are stored in export/test_reports.
- startscripts: Generates startscripts into the bin folder that are used to start the service.
- obfuscate: Generates an obfuscated service jar in the export/obfuscated directory. This is required for public service deployment. Please refer to Deploying the OCD Service for more information. A log file of the obfuscation process is stored under ocd/yGuard/log.xml.
- setup_database: This is intended for automatically populating the database for presentation or debugging purposes. It is not required in any way to actually make the database work. The database is set up by running src/test/i5/las2peer/services/ocd/DatabaseInitializer.java as a jUnit test. You can adapt the code in any way that suits your needs.
- all: Runs all of the above except setup_database.
After the build, you can then either start the start_network.bat or start_network.sh files in the bin folder to get the service running, see Running the OCD Service for more information.
Currently, the build might fail if a version of Java newer than 8 is used and running the service with a version other than 8 is also likely to cause errors
The system was mainly tested on Windows so far. For Linux, there is still a small issue with the Ant Build. In case you receive an exception that the database (db) could not be created, please do manually remove the directory db from the ocd/derby directory before the build.