How you can use third-party libraries to develop a plugin. My task is to use the minio library. The plugin assembles normally, but does not install. Error:
aused by: org.osgi.framework.BundleException: Unable to resolve ru.matveev.alexey.task1 [299](R 299.0): missing requirement [ru.matveev.alexey.task1 [299](R 299.0)] osgi.wiring.package; (osgi.wiring.package=android.net.http) Unresolved requirements: [[ru.matveev.alexey.task1 [299](R 299.0)]
I tried adding this plugin to dependency, then it asks for another one, and so on ad infinitum. It's as if it doesn't download the java sdk minio dependencies.
Without external dependency - plugin work good.
lib in Pom :
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>8.5.11</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</exclusion>
</exclusions>
</dependency>
try this way, dont help:
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependency</id>
<phase>process-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/META-INF/lib</outputDirectory>
<includeArtifactIds>minio</includeArtifactIds>
<stripVersion>false</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.