Skip to content

Commit

Permalink
Fixed logging properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve O'Hara committed Mar 28, 2020
1 parent 1eaf1ce commit 5484578
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,6 @@ _(**NOT BACKWARDS COMPATIBLE**)_
* Upgraded log4j to prevent security issue
* added ModPoll class to mirror ModPoll exe capabilities
* Created fat executable jar for testing ModPoll features

## Version 2.6.3
* Fix missing logging properties in assembly
13 changes: 11 additions & 2 deletions assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@
<unpack>true</unpack>
<scope>test</scope>
<excludes>
<exclude>org.apache.commons:commons-exec</exclude>
<exclude>junit:junit</exclude>
<exclude>org.apache.commons:commons-exec</exclude>
<exclude>junit:junit</exclude>
</excludes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>src/test/resources</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>log4j.properties</include>
</includes>
</fileSet>
</fileSets>
</assembly>
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<artifactId>j2mod</artifactId>
<name>j2mod</name>
<url>https://github.com/steveohara/j2mod</url>
<version>2.6.2-SNAPSHOT</version>
<version>2.6.3-SNAPSHOT</version>
<description>A Modbus TCP/UDP/Serial Master and Slave implementation</description>

<packaging>bundle</packaging>
Expand Down Expand Up @@ -260,7 +260,6 @@
</plugins>

<!-- Tell Maven to exclude our properties files from the resources directory. -->

<resources>
<resource>
<directory>src/main/resources</directory>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/ghgande/j2mod/modbus/util/ModPoll.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ else if (CommandLineParams.MODE_UDP.equalsIgnoreCase(params.mode)) {
*
* @param params Arguments
*/
private static void mainSerial(CommandLineParams params) throws ModbusException {
private static void mainSerial(CommandLineParams params) {

ModbusSerialMaster master;
SerialParameters parameters = new SerialParameters();
Expand All @@ -83,7 +83,7 @@ private static void mainSerial(CommandLineParams params) throws ModbusException
*
* @param params Arguments
*/
private static void mainTCP(CommandLineParams params) throws ModbusException {
private static void mainTCP(CommandLineParams params) {

ModbusTCPMaster master = new ModbusTCPMaster(params.portname, params.port, CommandLineParams.MODE_ENC.equalsIgnoreCase(params.mode));
execute(params, master);
Expand Down Expand Up @@ -166,7 +166,7 @@ private static void showHelp() {
System.out.println(" COM1, COM2 ... on Windows");
System.out.println(" /dev/ttyS0, /dev/ttyS1 ... on Linux");
System.out.println("HOST Host name or dotted IP address when using MODBUS/TCP protocol");
System.out.println("");
System.out.println();
System.out.println("General options:");
System.out.println("-m ascii Modbus ASCII protocol");
System.out.println("-m rtu Modbus RTU protocol (default if SERIALPORT contains /, \\ or COM)");
Expand All @@ -192,10 +192,10 @@ private static void showHelp() {
System.out.println("-1 Poll only once only, otherwise every poll rate interval");
System.out.println("-l Poll rate in ms, (1000 is default)");
System.out.println("-o # Time-out in seconds (0.01 - 10.0, 1.0 s is default)");
System.out.println("");
System.out.println();
System.out.println("Options for MODBUS/TCP, UDP and RTU over TCP:");
System.out.println("-p # IP protocol port number (502 is default)");
System.out.println("");
System.out.println();
System.out.println("Options for Modbus ASCII and Modbus RTU:");
System.out.println("-b # Baudrate (e.g. 9600, 19200, ...) (19200 is default)");
System.out.println("-d # Databits (7 or 8 for ASCII protocol, 8 for RTU)");
Expand Down

0 comments on commit 5484578

Please sign in to comment.