Skip to content

Commit

Permalink
Release 2.0.0 (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinherron authored Nov 13, 2024
1 parent 4a476fe commit 714d5bf
Show file tree
Hide file tree
Showing 24 changed files with 146 additions and 87 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

Expand All @@ -29,14 +33,3 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Publish to GitHub Packages
run: mvn -B deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 16 additions & 10 deletions modbus-serial/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
<parent>
<groupId>com.digitalpetri.modbus</groupId>
<artifactId>modbus-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<artifactId>modbus-serial</artifactId>

<properties>
<javaModuleName>com.digitalpetri.modbus.serial</javaModuleName>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -47,13 +48,18 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.digitalpetri.modbus;
package com.digitalpetri.modbus.serial;

import com.digitalpetri.modbus.client.SerialPortClientTransport;
import com.digitalpetri.modbus.Modbus;
import com.digitalpetri.modbus.serial.client.SerialPortClientTransport;
import com.fazecast.jSerialComm.SerialPort;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.digitalpetri.modbus.client;
package com.digitalpetri.modbus.serial.client;

import com.digitalpetri.modbus.ModbusRtuFrame;
import com.digitalpetri.modbus.ModbusRtuResponseFrameParser;
import com.digitalpetri.modbus.ModbusRtuResponseFrameParser.Accumulated;
import com.digitalpetri.modbus.ModbusRtuResponseFrameParser.ParserState;
import com.digitalpetri.modbus.SerialPortTransportConfig;
import com.digitalpetri.modbus.client.ModbusRtuClientTransport;
import com.digitalpetri.modbus.internal.util.ExecutionQueue;
import com.digitalpetri.modbus.serial.SerialPortTransportConfig;
import com.fazecast.jSerialComm.SerialPort;
import com.fazecast.jSerialComm.SerialPortDataListener;
import com.fazecast.jSerialComm.SerialPortEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.digitalpetri.modbus.server;
package com.digitalpetri.modbus.serial.server;

import com.digitalpetri.modbus.ModbusRtuFrame;
import com.digitalpetri.modbus.ModbusRtuRequestFrameParser;
import com.digitalpetri.modbus.ModbusRtuRequestFrameParser.Accumulated;
import com.digitalpetri.modbus.ModbusRtuRequestFrameParser.ParserState;
import com.digitalpetri.modbus.SerialPortTransportConfig;
import com.digitalpetri.modbus.SerialPortTransportConfig.Builder;
import com.digitalpetri.modbus.exceptions.UnknownUnitIdException;
import com.digitalpetri.modbus.internal.util.ExecutionQueue;
import com.digitalpetri.modbus.serial.SerialPortTransportConfig;
import com.digitalpetri.modbus.serial.SerialPortTransportConfig.Builder;
import com.digitalpetri.modbus.server.ModbusRtuServerTransport;
import com.fazecast.jSerialComm.SerialPort;
import com.fazecast.jSerialComm.SerialPortDataListener;
import com.fazecast.jSerialComm.SerialPortEvent;
Expand Down
24 changes: 15 additions & 9 deletions modbus-tcp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
<parent>
<groupId>com.digitalpetri.modbus</groupId>
<artifactId>modbus-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<artifactId>modbus-tcp</artifactId>

<properties>
<javaModuleName>com.digitalpetri.modbus.tcp</javaModuleName>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -67,13 +68,18 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.digitalpetri.modbus;
package com.digitalpetri.modbus.tcp;

import com.digitalpetri.modbus.MbapHeader;
import com.digitalpetri.modbus.ModbusTcpFrame;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageCodec;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.digitalpetri.modbus;
package com.digitalpetri.modbus.tcp;

import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.util.HashedWheelTimer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.digitalpetri.modbus.client;
package com.digitalpetri.modbus.tcp.client;

import com.digitalpetri.modbus.Modbus;
import com.digitalpetri.modbus.Netty;
import com.digitalpetri.modbus.tcp.Netty;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.digitalpetri.modbus.client;
package com.digitalpetri.modbus.tcp.client;

import com.digitalpetri.fsm.FsmContext;
import com.digitalpetri.modbus.ModbusRtuFrame;
import com.digitalpetri.modbus.ModbusRtuResponseFrameParser;
import com.digitalpetri.modbus.ModbusRtuResponseFrameParser.Accumulated;
import com.digitalpetri.modbus.ModbusRtuResponseFrameParser.ParseError;
import com.digitalpetri.modbus.ModbusRtuResponseFrameParser.ParserState;
import com.digitalpetri.modbus.client.ModbusRtuClientTransport;
import com.digitalpetri.modbus.internal.util.ExecutionQueue;
import com.digitalpetri.netty.fsm.ChannelActions;
import com.digitalpetri.netty.fsm.ChannelFsm;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.digitalpetri.modbus.client;
package com.digitalpetri.modbus.tcp.client;

import com.digitalpetri.fsm.FsmContext;
import com.digitalpetri.modbus.ModbusTcpCodec;
import com.digitalpetri.modbus.ModbusTcpFrame;
import com.digitalpetri.modbus.client.ModbusTcpClientTransport;
import com.digitalpetri.modbus.internal.util.ExecutionQueue;
import com.digitalpetri.modbus.tcp.ModbusTcpCodec;
import com.digitalpetri.netty.fsm.ChannelActions;
import com.digitalpetri.netty.fsm.ChannelFsm;
import com.digitalpetri.netty.fsm.ChannelFsmConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.digitalpetri.modbus.client;
package com.digitalpetri.modbus.tcp.client;

import com.digitalpetri.modbus.TimeoutScheduler;
import io.netty.util.HashedWheelTimer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.digitalpetri.modbus.server;
package com.digitalpetri.modbus.tcp.server;

import com.digitalpetri.modbus.ModbusRtuFrame;
import com.digitalpetri.modbus.ModbusRtuRequestFrameParser;
Expand All @@ -7,6 +7,7 @@
import com.digitalpetri.modbus.ModbusRtuRequestFrameParser.ParserState;
import com.digitalpetri.modbus.exceptions.UnknownUnitIdException;
import com.digitalpetri.modbus.internal.util.ExecutionQueue;
import com.digitalpetri.modbus.server.ModbusRtuServerTransport;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.digitalpetri.modbus.server;
package com.digitalpetri.modbus.tcp.server;

import com.digitalpetri.modbus.Modbus;
import com.digitalpetri.modbus.Netty;
import com.digitalpetri.modbus.tcp.Netty;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.digitalpetri.modbus.server;
package com.digitalpetri.modbus.tcp.server;

import com.digitalpetri.modbus.ModbusTcpCodec;
import com.digitalpetri.modbus.ModbusTcpFrame;
import com.digitalpetri.modbus.exceptions.UnknownUnitIdException;
import com.digitalpetri.modbus.internal.util.ExecutionQueue;
import com.digitalpetri.modbus.server.ModbusTcpServerTransport;
import com.digitalpetri.modbus.tcp.ModbusTcpCodec;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.digitalpetri.modbus;
package com.digitalpetri.modbus.tcp;

import static org.junit.jupiter.api.Assertions.assertEquals;

import com.digitalpetri.modbus.MbapHeader;
import com.digitalpetri.modbus.ModbusTcpFrame;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.embedded.EmbeddedChannel;
Expand Down
3 changes: 2 additions & 1 deletion modbus-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
<parent>
<groupId>com.digitalpetri.modbus</groupId>
<artifactId>modbus-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<artifactId>modbus-tests</artifactId>

<properties>
<javaModuleName>com.digitalpetri.modbus.test</javaModuleName>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package modbus;
package com.digitalpetri.modbus.test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package modbus;
package com.digitalpetri.modbus.test;

import com.digitalpetri.modbus.client.ModbusClient;
import com.digitalpetri.modbus.client.ModbusRtuClient;
import com.digitalpetri.modbus.client.SerialPortClientTransport;
import com.digitalpetri.modbus.serial.client.SerialPortClientTransport;
import com.digitalpetri.modbus.serial.server.SerialPortServerTransport;
import com.digitalpetri.modbus.server.ModbusRtuServer;
import com.digitalpetri.modbus.server.ModbusServer;
import com.digitalpetri.modbus.server.ProcessImage;
import com.digitalpetri.modbus.server.ReadWriteModbusServices;
import com.digitalpetri.modbus.server.SerialPortServerTransport;
import com.fazecast.jSerialComm.SerialPort;
import java.util.Optional;
import org.junit.jupiter.api.AfterEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package modbus;
package com.digitalpetri.modbus.test;

import com.digitalpetri.modbus.client.ModbusClient;
import com.digitalpetri.modbus.client.ModbusRtuClient;
import com.digitalpetri.modbus.client.NettyRtuClientTransport;
import com.digitalpetri.modbus.server.ModbusRtuServer;
import com.digitalpetri.modbus.server.ModbusServer;
import com.digitalpetri.modbus.server.NettyRtuServerTransport;
import com.digitalpetri.modbus.server.ProcessImage;
import com.digitalpetri.modbus.server.ReadWriteModbusServices;
import com.digitalpetri.modbus.tcp.client.NettyRtuClientTransport;
import com.digitalpetri.modbus.tcp.server.NettyRtuServerTransport;
import java.util.Optional;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package modbus;
package com.digitalpetri.modbus.test;

import com.digitalpetri.modbus.ModbusPduSerializer.DefaultRequestSerializer;
import com.digitalpetri.modbus.Netty;
import com.digitalpetri.modbus.client.ModbusClient;
import com.digitalpetri.modbus.client.ModbusTcpClient;
import com.digitalpetri.modbus.client.NettyTcpClientTransport;
import com.digitalpetri.modbus.client.NettyTimeoutScheduler;
import com.digitalpetri.modbus.internal.util.Hex;
import com.digitalpetri.modbus.pdu.ReadHoldingRegistersRequest;
import com.digitalpetri.modbus.server.ModbusServer;
import com.digitalpetri.modbus.server.ModbusTcpServer;
import com.digitalpetri.modbus.server.NettyTcpServerTransport;
import com.digitalpetri.modbus.server.ProcessImage;
import com.digitalpetri.modbus.server.ReadWriteModbusServices;
import com.digitalpetri.modbus.tcp.Netty;
import com.digitalpetri.modbus.tcp.client.NettyTcpClientTransport;
import com.digitalpetri.modbus.tcp.client.NettyTimeoutScheduler;
import com.digitalpetri.modbus.tcp.server.NettyTcpServerTransport;
import java.nio.ByteBuffer;
import java.util.Optional;
import org.junit.jupiter.api.AfterEach;
Expand Down
24 changes: 15 additions & 9 deletions modbus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
<parent>
<groupId>com.digitalpetri.modbus</groupId>
<artifactId>modbus-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<artifactId>modbus</artifactId>

<properties>
<javaModuleName>com.digitalpetri.modbus</javaModuleName>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -42,13 +43,18 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
*
* <p>These classes are not part of the public API and should not be used by clients.
*/
package com.digitalpetri.modbus.internal;
package com.digitalpetri.modbus.internal.util;
Loading

0 comments on commit 714d5bf

Please sign in to comment.