Having trouble importing packages. Can I use Maven?
- Posts: 2
- Joined: Sat Apr 08, 2017 1:17 am
I develop my java programs in eclipse on a laptop, and export to a runnable jar to the pi if needed. Eclipse has the option to include required jars into the export-jar. But usually I use an ant build script to build deployment packages.
If you have the libs available as a jar, then these do not need to be compiled on the pi (compile once, run everywhere...).
But I admit that I do not use maven. Especially because when my programs work with specific version of libs, then I do not want to change these; and 'cause of license issues I need to know in detail which libs and hence which licenses are imported.
- Posts: 1141
- Joined: Wed Jun 12, 2013 12:41 pm
- Location: Stuttgart Germany
Can you use Maven on your Pi? Absolutely. Maven is pure Java, needs just a JDK, a network connection, and diskspace.
Diskspace on the Pi of course (for the Maven repository) can become a problem.
Or you can use Maven to build the entire deployment package (including all related jars you need) on the PC or Mac and copy everything to the Pi.
Either case, you're going to need a script to set your classpath for the application (you need that on any hardware).
- Posts: 11
- Joined: Thu Oct 29, 2015 10:38 am