Search code examples
javaeclipsemavenjarmodbus

Modbus4J 2.0.2 and Maven, How it works?


I am using the last version of Modbus4J 2.0.2, converted to use Maven for dependency management. In my first Modbus4J project (1 year ago), I only add the different *.jar to my project and it works fine. (modbus4J.jar, seroUtils.jar, RXTXcomm.jar) But now I can not do it, if I add the new jar on my project I can see a lot of build errors, regarding for apache libs... I am using Eclipse and I installed the maven plugin but I do not know how I can insert the libraries in my project.

Do you know How Can I build and test the files of com.serotonin.modbus4j.test of Modbus4J 2.0.2? (MasterTest.java, ListenerTest.java...) And How Can I integrate the new Modbus4J libraries on my project?

The library is here: https://github.com/infiniteautomation/modbus4j

Thanks in advance,

Best regards.


Solution

  • Look at the pom.xml file in the modbus4j project. You'll see that it declares a local file based repository (modbus4j-local). That is where the serotonin-timer & serotonin-utils dependencies are stored.

    If that doesn't help you, then it's not clear what you are trying to do. Consider posting your project's pom.xml file contents and/or the important build error messages you are seeing.