I have a dependency on guava and I am using Embed dependencies. The maven plugin bundle adds javax.annotation and sun.misc to the import packages of the manifest. I'm not sure why or if it is what I want to happen. It causes an error when an OSGI bundle consumes my project because it tries to find sun.misc and can't:
[INFO] Cannot complete the request. Generating details. [INFO] {org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1, osgi.ws=win32, osgi.arch=x86_64, osgi.os=win32, org.eclipse.update.install.features=true, org.osgi.framework.system.packages=} [INFO] [Software being installed: example.p2.repo raw:0.1.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.1.0-SNAPSHOT, Missing requirement: com.jha.yhs.pomfirst-bundle 0.1.0.SNAPSHOT requires 'package sun.misc 0.0.0' but it could not be found, Cannot satisfy dependency: example.p2.repo raw:0.1.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.1.0-SNAPSHOT depends on: feature.feature.group [0.1.0,0.1.1), Cannot satisfy dependency: feature.feature.group 0.1.0.qualifier depends on: com.jha.yhs.pomfirst-bundle [0.1.0.SNAPSHOT]] Below are the pom and the generated manifest. Thanks, Clay <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.jha.yhs</groupId> <artifactId>pomfirst-bundle</artifactId> <version>0.1.0-SNAPSHOT</version> <packaging>bundle</packaging> <repositories> <repository> <id>nexus</id> <name>Yellow Hammer Nexus</name> <url>http://haldevyh:8083/nexus/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> </repository> </repositories> <distributionManagement> <repository> <id>releases</id> <name>Internal Releases</name> <url>http://haldevyh:8083/nexus/content/repositories/releases</url> </repository> <snapshotRepository> <id>snapshots</id> <name>Internal Snapshots</name> <url>http://haldevyh:8083/nexus/content/repositories/snapshots</url> <uniqueVersion>false</uniqueVersion> </snapshotRepository> </distributionManagement> <dependencies> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>r07</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.1.0</version> <extensions>true</extensions> <configuration> <manifestLocation>META-INF</manifestLocation> <instructions> <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency> <Embed-Transitive>true</Embed-Transitive> </instructions> </configuration> </plugin> </plugins> </build> </project> Manifest-Version: 1.0 Export-Package: com.jha.yhs.pomfirst Bundle-ClassPath: .,guava-r07.jar Built-By: crowmobe Tool: Bnd-0.0.357 Bundle-Name: Unnamed - com.jha.yhs:pomfirst-bundle:bundle:0.1.0-SNAPSH OT Created-By: Apache Maven Bundle Plugin Build-Jdk: 1.6.0_22 Bundle-Version: 0.1.0.SNAPSHOT Bnd-LastModified: 1294785977314 Embed-Transitive: true Bundle-ManifestVersion: 2 Embed-Dependency: *;scope=compile|runtime Import-Package: com.jha.yhs.pomfirst,javax.annotation,sun.misc Bundle-SymbolicName: com.jha.yhs.pomfirst-bundle