I am having an issue running a JAR that I have packaged using Maven. It is a very simple class that just takes a file from a directory on the local machine and posts it to an SFTP.
I am using the "mvn package" command and am seeing the JAR show up in my target folder, but when I attempt to run the JAR I am getting the following error:
"Exception in thread "main" java.lang.NoClassDefFoundError: com/jcraft/jsch/Jsch at. java.lang.Class.getDeclaredMethods0 etc.
Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.Jsch"
Now the program runs just fine when I run it in eclipse just running the main method, so I assume that it is something with the maven package command not bringing all the correct classes into my JAR? In my "Maven Dependencies" all I have is the "jsch-0.1.49.jar" and "junit-3.8.1.jar" Any help would be greatly appreciated. I am sure there is a step I missed somewhere in this process.