Deploy java application JAR to Raspberry Pi using Maven and Eclipse

Software

Project (in Eclipse)

Create new Maven project or open a Java project and add Maven Nature to it.

When you add new dependencies to the project (in pom.xml), Eclipse automatically downloads all required libraries (in JAR files) into Maven repository and sets appropriate links to the files in the project build path.

Eclipse Maven dependenciesSo the application can be started directly from Eclipse in standard way: Use “Run as Java application” menu item for your main class.

We will not use “Export to runnable JAR file” function of the Eclipse to create a JAR for our application. We will create this file using Maven ‘install’ goal instead. Continue reading