Started migration of the plugin to Jira 8.5 and new AMPS pointed to the banned dependencies
Rule 0: org.apache.maven.plugins.enforcer.BannedDependencies failed with message:
make sure platform artifacts are not bundled into plugin
...
Use 'mvn dependency:tree' to locate the source of the banned dependencies.
As it was suggested here More Info on AMPS Banned Plugin Dependency - #2 by aswan and here Maven bans dependencies with no configuration added dependencies as “provided”.
<!-- required by com.konghq:unirest-java -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.5</version>
<scope>provided</scope>
</dependency>
<!-- required by com.konghq:unirest-java -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.5</version>
<scope>provided</scope>
</dependency>
<!-- required by com.konghq:unirest-java -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<version>3.11.09</version>
<scope>compile</scope>
</dependency>
The problem is that in runtime class loader got confused and crashes with this error:
loader constraint violation: when resolving method "org.apache.http.impl.auth.HttpAuthenticator.<init>(Lorg/apache/commons/logging/Log;)V" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) of the current class, org/apache/http/impl/nio/client/MainClientExec, and the class loader (instance of org/apache/catalina/loader/ParallelWebappClassLoader) for the method's defining class, org/apache/http/impl/auth/HttpAuthenticator, have different Class objects for the type org/apache/commons/logging/Log used in the signature
java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.impl.auth.HttpAuthenticator.<init>(Lorg/apache/commons/logging/Log;)V" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) of the current class, org/apache/http/impl/nio/client/MainClientExec, and the class loader (instance of org/apache/catalina/loader/ParallelWebappClassLoader) for the method's defining class, org/apache/http/impl/auth/HttpAuthenticator, have different Class objects for the type org/apache/commons/logging/Log used in the signature
at org.apache.http.impl.nio.client.MainClientExec.<init>(MainClientExec.java:111)
at org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(HttpAsyncClientBuilder.java:851)
at kong.unirest.apache.ApacheAsyncConfig.<init>(ApacheAsyncConfig.java:72)
at kong.unirest.apache.ApacheAsyncClient.<init>(ApacheAsyncClient.java:47)
at kong.unirest.Config.buildAsyncClient(Config.java:787)
at kong.unirest.Config.getAsyncClient(Config.java:767)
at kong.unirest.BaseRequest.asJsonAsync(BaseRequest.java:252)
Have tried different versions of com.konghq:unirest-java
, tried to exclude those packages Found Banned Dependency: com.atlassian.browsers:atlassian-browsers-windows:jar:2.7.0-m1 - #3 by barbosa.s.alexandre (could not make it work).
<properties>
<jira.version>8.5.13</jira.version>
<jira.servicedesk>4.13.5</jira.servicedesk>
<amps.version>8.2.1</amps.version>
<plugin.testrunner.version>2.0.2</plugin.testrunner.version>
<atlassian.spring.scanner.version>2.1.15</atlassian.spring.scanner.version>
<testkit.version>8.0.2</testkit.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<com.atlassian.upm.licensing-api.version>2.21.4</com.atlassian.upm.licensing-api.version>
<com.atlassian.upm.upm-api.version>2.21</com.atlassian.upm.upm-api.version>
<javax.servlet.javax.servlet-api.version>2.3</javax.servlet.javax.servlet-api.version>
<ao.version>3.0.1</ao.version>
<google-collections.version>1.0</google-collections.version>
<assertj.core>3.15.0</assertj.core>
</properties>
PLEASE HELP