0

I have some maven artifacts on bintray new for our current release that need adding to JCenter before they can be synced from BinTray to Maven Central. (We have other artifacts already in place)

However some of these artifacts are throwing errors when trying to add to JCenter that I don't agree with :-)

For example JAR file is corrupted. A binary file (jar, aar, wat, apk) should be part of the package. Could not validate jar file. Package should include sources as part of the package.

This particular jar looks ok for me. I download from BinTray (in case it was indeed corrupted on the upload) * It's entirely readable - not corrupted * It includes a regular jar, which has other jars and class files included * It also includes a 'sources' jar and 'javadoc' jar -- which we added a few releases ago when manually syncing to maven central.

The contents of the package on bintray are: ui-chassis-spring-1.3-javadoc.jar ui-chassis-spring-1.3-sources.jar ui-chassis-spring-1.3.jar

This appears to be suitable for maven central. It follows the pattern also documented at https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-sources-javadoc.html

I did see a prior question opened where the resolution was to include sources in the main jar, but I disagree with this approach. Normally sources are download (for example by an IDE such as IntelliJ) on demand

Is there any way to get more detailed information? Is the validation on JCenter incorrect?

[ Ref: Github issue - https://github.com/odpi/egeria/issues/2499 ]

  • Really does a jar contains other jars? – khmarbaise Jan 30 '20 at 11:21
  • Please check this similar scenario: https://stackoverflow.com/questions/57138623/jar-file-is-corrupted – anonymous Jan 30 '20 at 13:37
  • Yes - a jar does contain other jars. For example if you want something to be 'runnable' (with java -jar) you may include all the dependencies within the jar. In this particular case we're using spring boot --- which uses it's own class loading, so it can use all of these classes. – Nigel Jones Jan 30 '20 at 14:47
  • I did see that other jar link - thanks, but the response was to include sources within the main jar, which I believe is the wrong approach, and goes against maven guidelines. Usually an IDE will just pull sources or doc as needed. As an aside I've also tried contacting jfrog support and them on twitter to see if I can get clarification – Nigel Jones Jan 30 '20 at 14:48
  • 1
    FYI official support indicate it all looks ok and are investigating. I will update with an answer / update when I have more info for the benefit of others. – Nigel Jones Feb 03 '20 at 10:55

0 Answers0