I have a java applet (I know ancient technology, but I can't change this at the moment!) that uses gradle to pull in all dependencies. One of the dependents is jaxws-rt-2.2.8.jar. This jar file has the following manifest:
Manifest-Version: 1.0
Implementation-Title: JAX-WS Implementation
Major-Version: 2.2.8
Implementation-Version: 2.2.8
Built-By: mghudson
Class-Path: javax.annotation-api.jar jsr181-api.jar jaxb-api.jar jaxws
-api.jar javax.xml.soap-api.jar FastInfoset.jar gmbal-api-only.jar ha
-api.jar jaxb-core.jar jaxb-impl.jar management-api.jar mimepull.jar
policy.jar resolver.jar saaj-impl.jar stax-ex.jar stax2-api.jar strea
mbuffer.jar woodstox-core-asl.jar
Created-By: Apache Maven
probe-provider-class-names: com.sun.xml.ws.transport.http.servlet.JAXW
SRIDeploymentProbeProvider
Implementation-Vendor: Sun Microsystems Inc
SVN-Revision: 13980
Implementation-Vendor-Id: com.sun
Build-Jdk: 1.6.0_35
Build-Version: JAX-WS RI 2.2.8
SVN-URL: scm:svn:https://svn.java.net/svn/jax-ws~sources/branches/jaxw
s22/jaxws-ri/bundles/jaxws-rt
Specification-Title: The Java API for XML Web Services
Specification-Version: 2.2
Extension-Name: com.sun.xml.ws
Build-Id: 2.2.8
Archiver-Version: Plexus Archiver
Notice that it lists javax.annotation-api.jar (and other jars) with no version info as part of the Class-Path attribute. This seems to be a problem. When I load my java program (as an applet) , I receive a java.FileNotFoundException indicating that javax.annotation.api.jar is not found. And that is correct, it is not in the class path. However, the jar file javax.annotation.api-1.2.jar is in the class path. It is pulled in as a gradle dependency. This does not cause my program to behave poorly, but I would like to eliminate the error message. How can I do this?
Note, one way is to manually edit the manifest of jaxws-rt-2.2.8.jar and remove the reference, but this doesn't seem right. Are there any other ways I can eliminate this message that are less hacky?