Environment details
Specify the API at the beginning of the title. For example, "BigQuery: ...").
General, Core, and Other are also allowed as types
OS type and version: Windows 10
Java version: 14.0.1
google-http-client version(s): 1.40.0
Steps to reproduce
Download google-http-client version 1.39.2-sp.1 and 1.40.0 (note that 1.40.0 is not present in the directory list of maven central for whatever reason)
Compare the META-INF/MANIFEST.MF files of those JARs.
The Import-Package declaration in the MANIFEST.MF of version 1.39.2-sp.1 declared the packages used with javax.annotation as a mandatory package (Mandatory dependence to javax.annotation in osgi environment #1323 ). while the MANIFEST.MF of version 1.40.0 only includes javax.annotation as an optional package but the other packages are missing.
Code example
1.39.2-sp1:
Import-Package: com.google.common.base;version="[30.1,31)",com.google.
common.collect;version="[30.1,31)",com.google.common.io;version="[30.
1,31)",com.google.common.util.concurrent;version="[30.1,31)",io.openc
ensus.common,io.opencensus.contrib.http.util,io.opencensus.trace,io.o
pencensus.trace.export,io.opencensus.trace.propagation,javax.annotati
on;version="[3.0,4)",javax.net.ssl,org.apache.http,org.apache.http.cl
ient,org.apache.http.client.methods,org.apache.http.conn,org.apache.h
ttp.conn.params,org.apache.http.conn.routing,org.apache.http.conn.sch
eme,org.apache.http.conn.ssl,org.apache.http.entity,org.apache.http.i
mpl.client,org.apache.http.impl.conn,org.apache.http.impl.conn.tsccm,
org.apache.http.message,org.apache.http.params,org.apache.http.protoc
ol
1.40.0:
Import-Package: javax.annotation;resolution:=optional;version="[3.0,4)
"
Any additional information below
This is because I made a mistake in #1405 that fixed #1323 by explicitely adding the Import-Package declaration of javax.annotation without the other dependencies .
The other packages can be added by adding ,* to the Import-Package declaration in the pom.xml as follows:
<Import-Package >javax.annotation;resolution:=optional,*</Import-Package >
This adds the other packages just like before while still declaring javax.annotation as being optional.
The resulting Import-Package declaration looks like this (from target/classes/META-INF/MANIFEST.MF after fixing it and running mvn bundle:manifest):
Import-Package: javax.annotation;resolution:=optional;version="[3.0,4)",
com.google.common.base;version="[30.1,31)",com.google.common.collect;ve
rsion="[30.1,31)",com.google.common.io;version="[30.1,31)",com.google.c
ommon.util.concurrent;version="[30.1,31)",io.opencensus.common,io.openc
ensus.contrib.http.util,io.opencensus.trace,io.opencensus.trace.export,
io.opencensus.trace.propagation,javax.net.ssl,org.apache.http,org.apach
e.http.client,org.apache.http.client.methods,org.apache.http.conn,org.a
pache.http.conn.params,org.apache.http.conn.routing,org.apache.http.con
n.scheme,org.apache.http.conn.ssl,org.apache.http.entity,org.apache.htt
p.impl.client,org.apache.http.impl.conn,org.apache.http.impl.conn.tsccm
,org.apache.http.message,org.apache.http.params,org.apache.http.protoco
l
Environment details
General, Core, and Other are also allowed as types
Steps to reproduce
google-http-clientversion1.39.2-sp.1and1.40.0(note that1.40.0is not present in the directory list of maven central for whatever reason)META-INF/MANIFEST.MFfiles of those JARs.Import-Packagedeclaration in theMANIFEST.MFof version1.39.2-sp.1declared the packages used withjavax.annotationas a mandatory package (Mandatory dependence to javax.annotation in osgi environment #1323). while theMANIFEST.MFof version1.40.0only includesjavax.annotationas an optional package but the other packages are missing.Code example
1.39.2-sp1:
1.40.0:
Any additional information below
This is because I made a mistake in #1405 that fixed #1323 by explicitely adding the
Import-Packagedeclaration ofjavax.annotationwithout the other dependencies.The other packages can be added by adding
,*to theImport-Packagedeclaration in thepom.xmlas follows:This adds the other packages just like before while still declaring
javax.annotationas being optional.The resulting
Import-Packagedeclaration looks like this (fromtarget/classes/META-INF/MANIFEST.MFafter fixing it and runningmvn bundle:manifest):