diff --git a/README.md b/README.md old mode 100644 new mode 100755 index e0607c7..a318052 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # Apache Thrift Ant Task # -Thrift-task is an native(ish) cross-platform Ant task for the [Apache Thrift](http://incubator.apache.org/thrift/) project. It also includes a full Java implementation of `thrift` than can be used from the command line. +Thrift-task is an native(ish) cross-platform Ant task for the [Apache Thrift](https://thrift.apache.org/) +project. It also includes a full Java implementation of `thrift` than can be used from the command line. ## Usage ## -1. Put thrift\_task.jar into your project directory. +1. Put `thrift-task-0.0.2-SNAPSHOT.jar` into your project directory. 1. Define the task in your build file, setting classpath to the relative path to the jar: ``` - + ``` 1. Now add a task to your build file: ``` @@ -16,15 +17,19 @@ Thrift-task is an native(ish) cross-platform Ant task for the [Apache Thrift](ht To run `thrift` as a standalone process (not from Ant), do ``` -java -jar thrift_task.jar -help +java -jar thrift-task-0.0.2-SNAPSHOT.jar -help # or -java -cp thrift_task.jar com.nsegment.thrift.Thriftc -help +java -cp thrift-task-0.0.2-SNAPSHOT.jar com.nsegment.thrift.Thriftc -help ``` +Windows users using thrift-task *outside* of Ant should use absolute paths like `/c:/Path/to/file.thrift`. Directory +separators are forward slashes, a leading forward slash is added before the drive letter, and the drive letter is +lower-case. When using the Ant task, this conversion is handled for you. + ## Usage details ## Thrift-task is a [MatchingTask](http://www.jajakarta.org/ant/ant-1.6.1/docs/en/manual/api/org/apache/tools/ant/taskdefs/MatchingTask.html), so it supports filesets, includes, and excludes like ``. ---gen flags are passed as attributes to the task, and their options are comma-separated attribute values: +`--gen` flags are passed as attributes to the task, and their options are comma-separated attribute values: ``` @@ -67,11 +72,15 @@ The following languages and options are supported and behave the same as those i * xsd ## Implementation details ## -Rather than being a native Java implementation, thrift-task uses code translated from a MIPS build of `thrift` to Java byte code by the [NestedVM project](http://nestedvm.ibex.org/) and a modified Unix runtime. It's essentially emulated MIPS code, but in a compiled form. While it's noticeably slower than a native executable or native Java code, it's far easier to perfectly match existing behavior or change behavior to match a specific build. +Rather than being a native Java implementation, thrift-task uses code translated from a MIPS build of `thrift` to Java +byte code by the [NestedVM project](http://nestedvm.ibex.org/) and a modified Unix runtime. It's essentially emulated +MIPS code, but in a compiled form. While it's noticeably slower than a native executable or native Java code, it's far +easier to perfectly match existing behavior or change behavior to match a specific build. -The process for building the emulated class blob is documented in [toolchain](toolchain). Once built, jars just need to be copied to `repo`, and `pom.xml` modified to relfect the new versions. +The process for building the emulated class blob is documented in [toolchain](toolchain). Once built, jars just need +to be copied to `repo`, and `pom.xml` modified to relfect the new versions. ## Limitations ## * It's a little slow, but tolerable. This is because the code is emulated. -* It doesn't detect if source files need to be rebuilt, so it always rebuilds. Part of the reason is detecting modification times requires parsing the file to find its includes. -* 0.9.2 hasn't been tested on Windows, yet. +* It doesn't detect if source files need to be rebuilt, so it always rebuilds. Part of the reason is detecting +modification times requires parsing the file to find its includes.