provide executable jar
metrics-db currently has (at least) six classes providing a main
method, which are invoked using six corresponding ant tasks.
One solution for providing an executable jar:
Add a new class org.torproject.ernie.db.Main
as the jar's main class adding the following functionality:
- calling
java -jar metrics-db.jar
will show a usage message and exit. - calling
java -jar metrics-db.jar <taskname>
will run the main method of the class called in the current ant task of the same name, i.e., taskname is one of- bridgedescs
- bridgepools
- exitlists
- relaydescs
- torperf
- updateindex
Finally, remove the then obsolete ant tasks from build.xml.
What is missing? Should a task be added or removed? Other thoughts?