Skip to content

Commit 2812b37

Browse files
committed
Package into a Maven "Project Object Model" (POM).
1 parent a992774 commit 2812b37

34 files changed

+63
-40
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
target/
2+
nb-configuration.xml
13
*.class
24

35
# Package Files #

README.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ javapgm
44
Java implementation of the PGM protocol.
55

66

7+
Building
8+
========
9+
10+
Use Maven to build from source. The following works:
11+
```
12+
mvn compile
13+
```
14+
715
Example usage
816
=============
917

@@ -14,31 +22,29 @@ class set.
1422
```
1523

1624
Start a PGM publisher on the same or other host, aware of platform specific
17-
multicast loop rules. For example using the OpenPGM C package:
25+
multicast loop rules. For example using the OpenPGM C package with default
26+
wireless adapter:
1827
```
19-
./daytime -p 7500 -l
28+
./daytime -lp 3056 -n "wlan0;239.192.0.1"
2029
```
2130

2231
Monitor the slightly verbose output.
2332
```
2433
...
25-
add ( "skb": { "timestamp": 1366746451692, "tsi": "169.232.35.188.84.158.39986", "sequence": null } )
34+
onData
35+
add ( "skb": { "timestamp": 1367954156656, "tsi": "126.111.159.175.2.164.33465", "sequence": null, "len": 34, "header": { "pgm_sport": 33465, "pgm_dport": 7500, "pgm_type": "PGM_ODATA", "pgm_options": "", "pgm_checksum": 0, "pgm_gsi": "126.111.159.175.2.164", "pgm_tsdu_length": 34 }, "odata": { "sourcePort": 33465, "destinationPort": 7500, "type": "PGM_ODATA", "options": 0, "checksum": 0x0, "gsi": "126.111.159.175.2.164", "tsduLength": 34, "dataSqn": 25, "dataTrail": 0, "dataData": "火, 07 5月 2013 15:15:56 -0400" }, "opt_fragment": null, "buf": { "head": 0, "data": 24, "tail": 58, "end": 58, "length": 58 } } )
2636
defining window
27-
sequence: 87726, lead: 87725
37+
SKB:25 trail:25 commit:25 lead:24 (RXW_TRAIL:25)
2838
append
2939
ReceiveWindow.add returned RXW_APPENDED
3040
New pending data.
3141
flushPeersPending
3242
read
43+
read #25
3344
incomingRead
3445
incomingReadApdu
3546
Received 1 SKBs
36-
#1 from 169.232.35.188.84.158.39986: "Tue, 23 Apr 2013 15:47:31 -0400"
37-
timer pending ...
38-
timer pending ...
39-
timer pending ...
40-
timer pending ...
41-
timer pending ...
47+
#1 from 126.111.159.175.2.164.33465: "火, 07 5月 2013 15:15:56 -0400"
4248
4349
```
4450

buildall.sh

+1-29
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
11
#!/bin/sh
22

3-
javac \
4-
-Xlint:unchecked \
5-
-cp jsr305-2.0.1.jar \
6-
src/testr*.java \
7-
src/udp*.java \
8-
src/ControlBuffer.java \
9-
src/GlobalSourceId.java \
10-
src/Header.java \
11-
src/Ints.java \
12-
src/NakConfirmPacket.java \
13-
src/Nak.java \
14-
src/NullNakPacket.java \
15-
src/OptionFragment.java \
16-
src/OptionHeader.java \
17-
src/OptionLength.java \
18-
src/OptionNakList.java \
19-
src/OriginalData.java \
20-
src/Packet.java \
21-
src/Peer.java \
22-
src/PollPacket.java \
23-
src/PollResponsePacket.java \
24-
src/Preconditions.java \
25-
src/ReceiveWindow.java \
26-
src/SequenceNumber.java \
27-
src/SocketBuffer.java \
28-
src/SourcePathMessage.java \
29-
src/SourcePathMessageRequest.java \
30-
src/TransportSessionId.java \
31-
src/UnsignedInts.java
3+
mvn compile

pom.xml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>com.miru</groupId>
6+
<artifactId>pgm</artifactId>
7+
<version>1.0-SNAPSHOT</version>
8+
<packaging>jar</packaging>
9+
10+
<name>pgm</name>
11+
<url>http://maven.apache.org</url>
12+
<build>
13+
<plugins>
14+
<plugin>
15+
<groupId>org.apache.maven.plugins</groupId>
16+
<artifactId>maven-compiler-plugin</artifactId>
17+
<version>2.3.2</version>
18+
<configuration>
19+
<source>1.7</source>
20+
<target>1.7</target>
21+
<showDeprecation>true</showDeprecation>
22+
</configuration>
23+
</plugin>
24+
</plugins>
25+
</build>
26+
<properties>
27+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
28+
</properties>
29+
30+
<dependencies>
31+
<dependency>
32+
<groupId>junit</groupId>
33+
<artifactId>junit</artifactId>
34+
<version>3.8.1</version>
35+
<scope>test</scope>
36+
</dependency>
37+
<dependency>
38+
<groupId>com.google.code.findbugs</groupId>
39+
<artifactId>jsr305</artifactId>
40+
<version>2.0.1</version>
41+
</dependency>
42+
</dependencies>
43+
</project>

run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

33
java \
4-
-cp src \
4+
-cp target/classes \
55
testreceive $*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)