I am trying to make one executable * .jar file through the proguard plugin for sbt 10. *.
Everything seems to be all right, except that sbt-proguard does not include java banks (in my case mysql-connector-java-5.1.10.jar), because I'm trying to start the output jar with
java -jar proguard-output.min.jar
I get
Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
(while sbt `run` works fine, so the mysql connector is definitely in the project).
I tried to use this problem by adding jar explicitly to build.sbt:
proguardInJars += Path.userHome / ".m2" / "repository" / "mysql" / "mysql-connector-java" / "5.1.10" / "mysql-connector-java-5.1.10.jar"
Also in the proguard magazine:
...
Preparing output jar
...
Copying resources from program jar [/home/kostya/.m2/repository/mysql/mysql-connector-java/5.1.10/mysql-connector-java-5.1.10.jar] (filtered)
...
But I still get the same exception. What am I doing wrong?
source
share