jar

JAR Manifest file - Difference between Specification and Implementation

六眼飞鱼酱① 提交于 2020-08-22 08:09:11
问题 I want to add versioning information (and possibly some other metadata about the jar) to a jar of a library I created. However, I am not sure what attribute to use. I found that the specification as well the documentation explain that there can be a Specification-Version and an Implementation-Version (and a title and vendor for both). But neither properly explains what the difference between Specification and Implementation is. I also looked at different examples. The one from the

cannot find symbol PreparedStatement after JAR upgrade

∥☆過路亽.° 提交于 2020-08-10 13:15:09
问题 I just upgraded mysql jdbc connection JAR (from mysql-connector-java-5.0.5.jar to mysql-connector-java-8.0.19.jar) and the project started showing error for import statements: import com.mysql.jdbc.PreparedStatement; java: cannot find symbol symbol: class PreparedStatement location: class package.ClassName Where to find the location or package for PreparedStatement in new jar file or is it replaced with any other class in new JAR? 回答1: Try to replace it with: import java.sql.PreparedStatement

Adding file to jar during maven build

谁说胖子不能爱 提交于 2020-08-07 05:00:27
问题 I am trying to add a license file to all of my jars when executing a maven build. I have the license on each class file, but I am looking to add License.txt to each META-INF folder within each jar My project has a master pom, which has half dozen modules, those modules then have modules of their own, and eventually get to a project that generates a /target/<.jar-file>. The build and the class level licenses are working, I am just looking to add a physical License.txt into the META-INF folder.

Why sonar-maven-plugin-3.0.1.jar cannot be found when executing sonar:sonar?

放肆的年华 提交于 2020-08-03 05:42:52
问题 We are currently including (reactivating) sonar in our continuous build process and we are experiencing some issues. In order to focus only on sonar I tried to make it work on an "HelloWorld" project but still without any success. One jar (sonar-maven-plugin-3.0.1.jar) seems to be missing from repo1 and repo2. I've browse those locations and only pom can be found here. Neither it can be found on the following url: [http://www.java2s.com/Code/Jar/s/sonar.htm][1] [http://mvnrepository.com

Why sonar-maven-plugin-3.0.1.jar cannot be found when executing sonar:sonar?

☆樱花仙子☆ 提交于 2020-08-03 05:42:36
问题 We are currently including (reactivating) sonar in our continuous build process and we are experiencing some issues. In order to focus only on sonar I tried to make it work on an "HelloWorld" project but still without any success. One jar (sonar-maven-plugin-3.0.1.jar) seems to be missing from repo1 and repo2. I've browse those locations and only pom can be found here. Neither it can be found on the following url: [http://www.java2s.com/Code/Jar/s/sonar.htm][1] [http://mvnrepository.com

NoClassDefFoundError: groovy/lang/binding

折月煮酒 提交于 2020-07-18 22:52:10
问题 I'm trying to evaluate Groovy script inside a Java app by using GroovyShell. Problem: My program compiles ok, but gives me a NoClassDefFoundError at run-time. TestClass.java: import groovy.lang.Binding; import groovy.lang.GroovyShell; class TestClass { static Binding binding; static GroovyShell shell; public static void main(String[] args) { System.out.println("Hello, world."); binding = new Binding(); shell = new GroovyShell(binding); Object value = shell.evaluate("5 ** 5"); } } Then I