Skip to content

Commit

Permalink
Maven demo execution (#80)
Browse files Browse the repository at this point in the history
* mvn exec

---------

Co-authored-by: Tilmann Zäschke <tilmann.zaeschke@inf.ethz.ch>
  • Loading branch information
tzaeschke and Tilmann Zäschke authored May 29, 2024
1 parent 0a0def2 commit 289ee6f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,16 @@
</execution>
</executions>
</plugin>
<plugin>
<!-- Enable command line execution of demos. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<classpathScope>test</classpathScope>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/scion/jpan/demo/ScmpEchoDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public static void main(String[] args) throws IOException {
break;
}
}
Scion.closeDefault();
}

private void runDemo(long dstIA, InetSocketAddress dstAddress) throws IOException {
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/scion/jpan/demo/ScmpTracerouteDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public static void main(String[] args) throws IOException {
break;
}
}
Scion.closeDefault();
}

private void runDemo(long destinationIA) throws IOException {
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/scion/jpan/demo/ShowpathsDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public static void main(String[] args) throws IOException {
break;
}
}
Scion.closeDefault();
}

private void runDemo(long destinationIA) throws IOException {
Expand Down

0 comments on commit 289ee6f

Please sign in to comment.