ここに私の親pomの一部があります:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.ops4j</groupId>
<artifactId>maven-pax-plugin</artifactId>
<version>1.4</version>
</plugin>
.
.
.
<modules>
<module>cross-annotations</module>
<module>cross-main</module>
<module>cross-event</module>
<module>cross-exception</module>
<module>cross-ui</module>
<module>cross-tools</module>
<module>cross-main-api</module>
<module>cross-math</module>
</modules>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>0.10.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<version>RELEASE71</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.6.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.core</artifactId>
<version>1.0.0</version>
<!-- this is provisional, eventually, osgi.core should be provided by the runtime container -->
<scope>provided</scope>
</dependency>
</dependencies>
mvn pax:provision で実行すると、次のようなエラーが発生します
org.osgi.framework.BundleException: Unresolved constraint in bundle cross-annotations [4]: Unable to resolve 4.0: missing requirement [4.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0))) [caused by: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j.impl)(version>=1.6.0))]g!
また
Unresolved constraint in bundle cross-ui [21]: Unable to resolve 21.0: missing requirement [21.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.commons.configuration)(version>=1.6.0)(!(version>=2.0.0))) [caused by: Unable to resolve 9.0: missing requirement [9.0] osgi.wiring.package; (osgi.wiring.package=javax.mail.internet)]
もちろん、OSGiコンテナに必要な要件がインストールされていないため、例外がスローされますが、それがpax:provisionの目的だと思いました。
まさに私の質問です: OSGi 依存関係を pax ツールまたは他の mvn プラグインのいずれかで自動的に解決することは可能ですか?