我遇到了
的问题Exception in thread "main" java.lang.RuntimeException: Service or property not registered: com.microsoft.azure.keyvault.KeyVaultClient class org.apache.http.impl.client.HttpClientBuilder
我看着
https://github.com/Azure/azure-sdk-for-java/issues/465
并且看到了servicebus的相同问题。但是,我试着对我的罐子进行着色,但仍然无法解决问题。
是否有针对此的已知修复程序?
我的构建如下:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<source>1.7</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.App</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
另外我收到错误:
exception in thread "main" java.lang.RuntimeException: Service or property not registered: com.microsoft.azure.keyvault.KeyVaultClient class org.apache.http.impl.client.HttpClientBuilder
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:198)
at com.microsoft.windowsazure.core.DefaultBuilder$1.create(DefaultBuilder.java:138)
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:200)
at com.microsoft.windowsazure.Configuration.create(Configuration.java:113)
at com.microsoft.azure.keyvault.KeyVaultClientService.create(KeyVaultClientService.java:48)
at com.microsoft.ac.configuration.KeyVaultHelper.initialize(KeyVaultHelper.java:27)
at com.microsoft.ac.App.main(App.java:21)