hi,

i am using maven-bundle-plugin to build a osgi bundle (which is a great bridge between maven-dependency management and osgi).

for importing i am using <Private-Package>, which includes all maven dependencies. the first level dependency artifacts (see commons-httpclient) get included but the transitive dependencies (as commons-httpclient --->commons-coded) not. is that a bug or do i need to enable this option somewhere?

you can reproduce described behaviour by using following pom (though do not forget to provide an implementation of Activator). just do a 'mvn package'. have a look at the generated target/xxx.jar and you will see that org.apache.commons.codec does not get included.

<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>osgi.try</groupId>
  <artifactId>a</artifactId>
  <packaging>bundle</packaging>
  <version>1.0</version>
  <build>
      <plugins>
          <plugin>
              <groupId>org.apache.felix</groupId>
              <artifactId>maven-bundle-plugin</artifactId>
              <version>1.0.0</version>
              <extensions>true</extensions>
              <configuration>
                  <instructions>
<Private-Package>*,!org.eclipse.equinox</Private-Package>
                      <Bundle-Activator>Activator</Bundle-Activator>
                  </instructions>
              </configuration>
          </plugin>
      </plugins>
  </build>
  <dependencies>
      <dependency>
          <groupId>org.eclipse.equinox</groupId>
          <artifactId>osgi</artifactId>
          <version>3.1.1</version>
      </dependency>
      <dependency>
          <groupId>commons-httpclient</groupId>
          <artifactId>commons-httpclient</artifactId>
          <version>3.0.1</version>
          <optional>true</optional>
      </dependency>
  </dependencies>
</project>

thanks for your answer in advance.

--
manuel aldana
[EMAIL PROTECTED]
www.aldana-online.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to