다른 제 3 자에게 의존성이있는 Maven/Tycho로 Eclipse 플러그인을 빌드해야합니다. 종속성을 삽입하는 것은 아직 티코를 지원하지 않습니다, 나는 다음과 같은 두 가지로 프로젝트를 분할 :Tycho : '종속성을 만족시킬 수 없습니다 ...'다중 모듈 부모를 통해 빌드 할 때
A-thirdparty
: 받는다는 - 번들 플러그인, 'Embed-을 필요에 의해 만들어진 포장'번들 '와 프로젝트 종속성 ' 명령 및 플러그인 에 필요한 모든 패키지 수출'A : 이클립스 플러그인 ''A
포장을 가진 프로젝트 '를 티코 - 받는다는 - 플러그인을 사용하고 티코의 목표 플랫폼에pomDependencies
이consider
으로 설정된 구성 플러그 인.
개별적으로 (처음에는 thirdparty 애그리 게이터, 프로젝트 A 자체에서는) 모든 것을 잘 만들 수 있습니다. 나는 (멀티 모듈 POM을 사용하여) 모두 해당 프로젝트를 집계한다면, 나는 다음과 같은 메이븐 오류가 발생합니다 : 통합 된 방식으로 건축 계획이 오류가 발생 않으며, 해결 방법의 종류가 가능한 경우가 될 수 왜
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 (독립적으로 하나)에두면 오류가 없습니다.
작은 유사한 멀티 모듈 샘플을 재현 할 수 없습니다 EDIT. 즉, POM 계층 구조에 대해 뭔가있는 것이 있습니다.
EDIT2
의존성의 동일한 세트 (축 2 & AXIOM libs와의 커플)을 포함한 후에 작은 유사한 다중 모듈 샘플을 재현 할 수 있었다.EDIT3 : 문제는 내가 포함 타사 라이브러리를 필요로하는 모든 thirdparties 누락에 대해 경우 최소한의 예
지금 궁금하네요. 그렇다면 왜 두 모듈을 따로 실행할 때 성공적으로 빌드 할 수 있으며 부모, 다중 모듈 pom.xml을 통해 완료 될 때만 빌드가 실패합니다. 아래의 예는 first-thirdparty과 같은 첫 번째 아티팩트에 번들로 제공되는 하나의 단일 축 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. 그것은 단순히 축 2 - 커널 JAR을 내장합니다 (다른 라이브러리가 없습니다 ..).) 이클립스 플러그인 및 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
묻는 유지 Maven을 다시 호출합니다. – SpellingD
@ SpellingD 코드를 최소화하기 위해 코드 샘플을 넣을 것입니다. –
@ SpellingD 많은 코드가 없지만 일부 공유 저장 장치로 옮길 생각입니다. 제안 할 수 있다면 그렇게하십시오. 그 Axis2 의존성에 대한 문제가 포함되어 있지 않다면 지금 궁금합니다. 그리고 이것은 빌드 프로세스에 영향을 미칩니다. 그러나 이러한 모듈을 개별적으로 빌드 할 수 있으므로 여러 모듈 부모를 통해 모듈을 집계하는 것이 잘못된 이유가 궁금합니다. –