pulsar
pulsar copied to clipboard
Missing shade io.swagger classes in org.apache.pulsar:pulsar-client jar
Search before asking
- [X] I searched in the issues and found nothing similar.
Motivation
pulsar version: 3.1.2
when I work with pulsar client and build by gradle, We don't allow any compile warning message but we get many warning
/Users/yinchin.chen/.gradle/caches/modules-2/files-2.1/org.apache.pulsar/pulsar-client/3.1.2/1f5e746cd01aae20b2e8fd4bf61c09c41c8f9137/pulsar-client-3.1.2.jar(/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.class): warning: Cannot find annotation method 'name()' in type 'ApiModelProperty'
/Users/yinchin.chen/.gradle/caches/modules-2/files-2.1/org.apache.pulsar/pulsar-client/3.1.2/1f5e746cd01aae20b2e8fd4bf61c09c41c8f9137/pulsar-client-3.1.2.jar(/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.class): warning: Cannot find annotation method 'value()' in type 'ApiModelProperty'
error: warnings found and -Werror specified
it's because shaded swagger package is missing in pulsar-client-3.1.2.jar eg: org.apache.pulsar.shade.io.swagger.annotations.ApiModelProperty;
jar tfv pulsar-client-3.1.2.jar |grep sawgger
Solution
pulsar-client/pom.xml maybe
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<scope>provided</scope> <==== remove this
</dependency>
or don't shaded swagger
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!