他のサードパーティに依存するMaven/TychoでEclipseプラグインをビルドする必要があります。Tycho:マルチモジュールの親を介してビルドするときに '依存関係を満たすことができません...'
A-thirdparty
を:のmaven-バンドル・プラグインによって構築されたパッケージを使用したプロジェクト「バンドル」は、「Embed-を持つ依存関係を埋め込みはまだティコでサポートされていないとして、私は次のように2つにプロジェクトを分割しました依存関係」命令、およびプラグインによって必要とされているすべてのパッケージのエクスポート 『』A
:パッケージとプロジェクトのEclipseプラグイン - '、ティコ - のmaven-プラグインを使用して、ティコのターゲットプラットフォームをpomDependencies
がconsider
に設定されている構成プラグイン。
私はそれらを別々に(第三者のアグリゲータ、プロジェクトA自体で)ビルドすると、すべて正常に動作します。私は(マルチモジュールPOMを使用して)両方のこれらのプロジェクトを集約する場合は、私は次のMavenのエラーを取得:集約された形での建築プロジェクトは、このエラーが発生しない、と回避策の種類があれば可能かもしれないのはなぜ
Caused by: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from A 1.0.0.qualifier to package org.apache.axis2.transaction 0.0.0.", "Unable to satisfy dependency from A 1.0.0.qualifier to package org.apache.axis2.addressing.i18n 0.0.0.", ...
それはタイコのバグですか?
集約POM(独立して1つ)にモジュールを1つだけ残してもエラーはありません。
EDIT
は、小型、同様のマルチモジュールサンプルで再現することはできません。つまり、私のPOM階層には何かがあります。
EDIT2
依存関係の同じセット(Axis2の&公理LIBSのカップル)を含めた後に、小さな、同様のマルチモジュールサンプルとを再現することができました。
EDIT3:ミニマル例
問題は、私は含まサードパーティのライブラリに必要なすべてのthirdparties を逃すについてであれば今私は思ったんだけど。もしそうなら、両方のモジュールを別々に実行するとうまく構築できないのですが、親モジュールのマルチモジュールpom.xmlでビルドが失敗しただけです。以下の例は、first-thirdpartyという名前のポンファーストアーチファクトにバンドルされている1つの単一軸2カーネルJARのみを含んでいます。
A
の代わりに、first
のキーボードがあります。フォルダ構造は以下の通りです:
./pom.xml
./first-thirdparty
pom.xml
./first
src/main/java/org/mydemo/Test.java // has just one method that simply returns AxisFault.class.getSimpleName(); to test import resolution
META-INF/MANIFEST.MF
build.properties
pom.xml
ルートポンポン:first-thirdparty
の
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mydemo</groupId>
<artifactId>first-aggregator</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
<modules>
<module>first-thirdparty</module>
<module>first</module>
</modules>
</project>
POM。これは、単にaxis2-kernel JARを埋め込みます(他のライブラリはありません)。):のEclipseプラグインであり、そしてfirst-thirdparty
に依存first
の
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mydemo</groupId>
<artifactId>first-aggregator</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
<manifest-location>META-INF</manifest-location>
</properties>
<packaging>bundle</packaging>
<groupId>org.mydemo</groupId>
<artifactId>first-thirdparty</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.5.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Embed-Dependency>
axis2-kernel
</Embed-Dependency>
<_exportcontents>
org.apache.axis2.*;version="1.5.1"
</_exportcontents>
<Bundle-ClassPath>{maven-dependencies}</Bundle-ClassPath>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Directory>jars</Embed-Directory>
<_failok>true</_failok>
<_nouses>true</_nouses>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
POM:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mydemo</groupId>
<artifactId>first-aggregator</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.mydemo</groupId>
<artifactId>org.mydemo.first-bundle</artifactId>
<packaging>eclipse-plugin</packaging>
<version>1.0.0-SNAPSHOT</version>
<properties>
<tycho.ver>0.14.1</tycho.ver>
</properties>
<repositories>
<repository>
<id>helios</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/indigo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.mydemo</groupId>
<artifactId>first-thirdparty</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.ver}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.ver}</version>
<configuration>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
モジュールfirst
のMANIFEST.MF。
Manifest-Version: 1.0
Bundle-Version: 1.0.0.qualifier
Tool: Bnd-0.0.357
Bundle-Name: first-bundle
Bnd-LastModified: 1334819004300
Created-By: 1.6.0_25 (Sun Microsystems Inc.)
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.mydemo.first-bundle
Export-Package: org.mydemo
Import-Package: org.apache.axis2.clustering.context,
org.apache.axis2.modules,
org.apache.axis2.deployment.util,
org.apache.axis2.dataretrieval.client,
org.apache.axis2.clustering,
org.apache.axis2.wsdl.util,
org.apache.axis2.clustering.configuration,
org.apache.axis2.java.security,
org.apache.axis2.deployment.resolver,
org.apache.axis2.util,
org.apache.axis2.wsdl,
org.apache.axis2.addressing.metadata,
org.apache.axis2.i18n,
org.apache.axis2.deployment.scheduler,
org.apache.axis2.dataretrieval,
org.apache.axis2.dispatchers,
org.apache.axis2.transport,org.apache.axis2.service,
org.apache.axis2.deployment.repository.util,
org.apache.axis2.client,
org.apache.axis2.context,
org.apache.axis2.classloader,
org.apache.axis2.receivers,
org.apache.axis2.engine,
org.apache.axis2.addressing,
org.apache.axis2.deployment,
org.apache.axis2.transport.http,
org.apache.axis2.phaseresolver,
org.apache.axis2.context.externalize,
org.apache.axis2.transaction,
org.apache.axis2.description,
org.apache.axis2.addressing.wsdl,
org.apache.axis2.transport.http.util,
org.apache.axis2.util.threadpool,
org.apache.axis2,
org.apache.axis2.handlers,
org.apache.axis2.addressing.i18n,
org.apache.axis2.builder,
org.apache.axis2.description.java2wsdl,
org.apache.axis2.builder.unknowncontent,
org.apache.axis2.namespace,
org.apache.axis2.description.java2wsdl.bytecode,
org.apache.axis2.client.async,
org.osgi.framework;version="1.3.0"
Bundle-Localization: plugin
を求め続ける、鉱山の答えをsatify Mavenを呼び出します。 – SpellingD
@ SpellingDコードを最小限に抑えることができたので、コードサンプルを入れておきます。 –
@SpellingDあまりコードはありませんが、共有ストレージに移動することを検討しています。あなたがそれを提案することができれば、それをしてください。 Axis2の依存関係に関する問題が含まれていない場合、これはビルドプロセスに影響すると思います。しかし、私はこれらのモジュールを別々に構築することができるので、マルチモジュールの親を介してそれらを集約することが間違っていると思います。 –