简体   繁体   中英

Integrate Amazon S3 into OSGi (Apache Felix)

I try to add "Upload to amazon S3" functionality to my bundle. I added dependency on aws-java-sdk to bundle's pom:

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.11.93</version>
</dependency>

After that, I edited configuration of maven-bundle-plugin:

<Embed-Dependency>
 im4java;scope=compile,aws-java-sdk;scope=compile|runtime;optional=false;inline=true
</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>

But when I try to install bundle I get error message

missing requirement [447.74] osgi.wiring.package; (osgi.wiring.package=com.amazonaws.auth

Could anyone help me?

You have to add this package to

<Export-Package>

or to

<Private-Package> 

In later case be sure to add all other packages, cause adding of

<Private-Package>

will override default behavior. In simplest case it should looks like

<Private-Package>com.amazonaws.*, *</Private-Package>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM