diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d8c2d0c..aab8edb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Added - SCMP echo responder [#78](https://github.com/scionproto-contrib/jpan/pull/78) +- Maven Java executor [#80](https://github.com/scionproto-contrib/jpan/pull/80) ### Changed - Some API changes: [#67](https://github.com/scionproto-contrib/jpan/pull/67) diff --git a/README.md b/README.md index a67537f9..5267e934 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,8 @@ Before running the demos, you may have to execute `mvn compile` once. - [SCMP traceroute](src/test/java/org/scion/jpan/demo/ScmpTracerouteDemo.java) - [show paths](src/test/java/org/scion/jpan/demo/ShowpathsDemo.java) +After compilation, demos can be executed from the IDE (recommended) or from command line. +For example: `mvn exec:java -Dexec.mainClass="org.scion.jpan.demo.ScmpEchoDemo"`. ### General documentation diff --git a/pom.xml b/pom.xml index fdafbb73..bb721c17 100644 --- a/pom.xml +++ b/pom.xml @@ -319,6 +319,16 @@ + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + test + false + + diff --git a/src/test/java/org/scion/jpan/demo/ScmpEchoDemo.java b/src/test/java/org/scion/jpan/demo/ScmpEchoDemo.java index 47feefc9..b85d2dce 100644 --- a/src/test/java/org/scion/jpan/demo/ScmpEchoDemo.java +++ b/src/test/java/org/scion/jpan/demo/ScmpEchoDemo.java @@ -100,6 +100,7 @@ public static void main(String[] args) throws IOException { break; } } + Scion.closeDefault(); } private void runDemo(long dstIA, InetSocketAddress dstAddress) throws IOException { diff --git a/src/test/java/org/scion/jpan/demo/ScmpTracerouteDemo.java b/src/test/java/org/scion/jpan/demo/ScmpTracerouteDemo.java index f04f03f7..db8d230d 100644 --- a/src/test/java/org/scion/jpan/demo/ScmpTracerouteDemo.java +++ b/src/test/java/org/scion/jpan/demo/ScmpTracerouteDemo.java @@ -83,6 +83,7 @@ public static void main(String[] args) throws IOException { break; } } + Scion.closeDefault(); } private void runDemo(long destinationIA) throws IOException { diff --git a/src/test/java/org/scion/jpan/demo/ShowpathsDemo.java b/src/test/java/org/scion/jpan/demo/ShowpathsDemo.java index 6aa458d8..9510b54c 100644 --- a/src/test/java/org/scion/jpan/demo/ShowpathsDemo.java +++ b/src/test/java/org/scion/jpan/demo/ShowpathsDemo.java @@ -83,6 +83,7 @@ public static void main(String[] args) throws IOException { break; } } + Scion.closeDefault(); } private void runDemo(long destinationIA) throws IOException {