Skip to content

Commit

Permalink
Build plain uber JAR file instead of executable binary
Browse files Browse the repository at this point in the history
No need to bring extra confusion by suggesting two different ways to
start the program.
  • Loading branch information
junegunn committed Sep 20, 2017
1 parent d29a9d4 commit ed4e46a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,18 @@ you can analyze the results using SQL.

### Examples

`hbase-packet-inspector` is an executable JAR file, but you can directly run
it once you set the executable flag.
Each version of HPI is distributed as an executable JAR file.

```sh
# Setting the executable flag
chmod +x hbase-packet-inspector
./hbase-packet-inspector --help
# With JVM options
java -Xmx2g -jar hbase-packet-inspector-0.2.0.jar --help

# Reading from tcpdump output
sudo tcpdump -s 0 -c 100000 -nn -w dump.pcap port 16020 or port 60020
./hbase-packet-inspector dump.pcap
java -jar hbase-packet-inspector-0.2.0.jar dump.pcap

# Capturing live stream of packets; continues until you press enter
sudo ./hbase-packet-inspector
```

Alternatively, you can start it with java command to pass extra JVM options.

```sh
java -Xmx2g -jar hbase-packet-inspector --help
sudo java -jar hbase-packet-inspector-0.2.0.jar
```

### Kafka
Expand Down Expand Up @@ -176,8 +168,9 @@ sent to Kafka as JSON record.
## Build

```sh
# Requires leiningen
lein bin
# Build executable uber JAR file using Leiningen
# -> target/hbase-packet-inspector-<VERSION>.jar
lein uberjar
```

## Development
Expand Down
5 changes: 2 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
[cheshire "5.8.0"]
[com.cemerick/url "0.1.1"]
[junegunn/grouper "0.1.1"]]
:plugins [[lein-bin "0.3.5"]
[lein-cloverage "1.0.9"]]
:bin {:bin-path "target"}
:plugins [[lein-cloverage "1.0.9"]]
:main hbase-packet-inspector.core
:target-path "target/%s"
:uberjar-name "../hbase-packet-inspector-%s.jar"
:profiles {:uberjar {:aot :all}})

0 comments on commit ed4e46a

Please sign in to comment.