Tycho 플러그인을 사용하여 Maven으로 빌드하는 Eclipse RCP 애플리케이션이 있습니다. 모듈로 모든 플러그인과 기능을 포함하는 마스터 POM이 있습니다.Tycho : 플러그인을 별도로 빌드 할 때 프로젝트의 다른 플러그인에 대한 종속성을 확인할 수 없습니다.
내가 인 경우 마스터 POM을 Maven과 함께 설치하면 결과 원자로 구조가 올바르게 작동합니다. 모든 모듈은 빌드이며 설치는에서 성공합니다. 그러나
, 내가 응용 프로그램 의 다른 플러그인을 별도로 이클립스 플러그인 중 하나의 종속을 구축하는 경우는를 확인할 수 없습니다.
타사 라이브러리에 대한 종속성 (예 : Eclipse 플랫폼)은 으로 잘 작동합니다 (). 해당 유형의 종속성 만있는 응용 프로그램의 Eclipse 플러그인이 성공적으로 빌드됩니다.
콘솔 출력은 다음과 같다 : 인해 성공적인 반응 빌드로
[INFO] Resolving dependencies of MavenProject: com.mycompany.myproduct:com.mycompany.myproduct.gui.editors:1.8.15-SNAPSHOT @ /<path>/com.mycompany.myproduct.gui.editors/pom.xml
[INFO] Cannot complete the request. Generating details.
[INFO] Cannot complete the request. Generating details.
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: com.mycompany.myproduct.gui.editors 1.8.15.qualifier
[ERROR] Missing requirement: com.mycompany.myproduct.gui.editors 1.8.15.qualifier requires 'bundle com.mycompany.myproduct.preferences 1.8.15' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from com.mycompany.myproduct.gui.editors 1.8.15.qualifier to bundle com.mycompany.myproduct.preferences 1.8.15.", "Unable to satisfy dependency from com.mycompany.myproduct.gui.editors 1.8.15.qualifier to bundle com.mycompany.myproduct.gui.utils 1.8.15.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from com.mycompany.myproduct.gui.editors 1.8.15.qualifier to bundle com.mycompany.myproduct.preferences 1.8.15.", "Unable to satisfy dependency from com.mycompany.myproduct.gui.editors 1.8.15.qualifier to bundle com.mycompany.myproduct.gui.utils 1.8.15.", "No solution found because the problem is unsatisfiable."]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
...
, 모든 플러그인 빌드 우리 회사 저장소 (우리가 Artifactory를 사용)에 있습니다. Artifactory 웹 앱에서 나는 preferences
플러그인의 1.8.15-SNAPSHOT 빌드를 분명히 볼 수 있습니다. 그러나이 저장소는 액세스되지 않는 것 같습니다.
저장소 정보는 settings.xml
파일에 지정됩니다. 부모 POM이 성공적으로 저장소에서 검색 참고 : 설정 파일의 내용은
[INFO] Scanning for projects...
Downloading: http://artifactory.buildnet.mycompany.com/artifactory/libs-snapshot-local/com/mycompany/myproduct/gui.parent/1.0-SNAPSHOT/maven-metadata.xml
Downloaded: http://artifactory.buildnet.mycompany.com/artifactory/libs-snapshot-local/com/mycompany/myproduct/gui.parent/1.0-SNAPSHOT/maven-metadata.xml (594 B at 3.3 KB/sec)
입니다
: 이것은 부모 POM (우리의 프로젝트는 마스터에서 분리주의가<settings>
<servers>
... (only relevant for deploy)
</servers>
<mirrors>
<mirror>
<id>mycompany-remote-mirror</id>
<name>mycompany remote repositories mirror</name>
<url>http://artifactory.buildnet.mycompany.com/artifactory/remote-repos</url>
<mirrorOf>*,!eclipse*,!mycompany-snapshots,!mycompany-releases</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>mycompany-default</id>
<repositories>
<repository>
<id>mycompany-snapshots</id>
<name>MyCompany snapshots repository</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://artifactory.buildnet.mycompany.com/artifactory/libs-snapshot-local</url>
<layout>default</layout>
</repository>
<repository>
<id>mycompany-releases</id>
<name>MyCompany releases repository</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://artifactory.buildnet.mycompany.com/artifactory/libs-release-local</url>
<layout>default</layout>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>mycompany-default</activeProfile>
</activeProfiles>
</settings>
모듈을 포함 POM) :
다음과<project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.myproduct</groupId>
<artifactId>gui.parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<product-id>MyProduct</product-id>
<tycho.version>0.17.0</tycho.version>
<tycho-extras.version>0.17.0</tycho-extras.version>
<eclipse.version>juno</eclipse.version>
<eclipse.repo>http://download.eclipse.org/releases/${eclipse-version}</eclipse.repo>
</properties>
<distributionManagement>
...
</distributionManagement>
<repositories>
<repository>
<id>eclipse</id>
<url>${eclipse.repo}</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-versions-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- PARENT PLUGINS -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
...
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho.version}</version>
...
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-versions-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<!-- END OF PARENT PLUGINS -->
<!-- DEFAULT PLUGINS -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerArguments>
<inlineJSR/>
<enableJavadoc/>
<encoding>ISO-8859-1</encoding>
</compilerArguments>
</configuration>
</plugin>
<!-- END OF DEFAULT PLUGINS -->
<!-- OTHER PLUGINS -->
... (maven-resources, tycho-surefire, tycho-p2, tycho-p2-director,
tycho-p2-repository, ...)
<!-- END OF OTHER PLUGINS -->
</plugins>
</pluginManagement>
</build>
</project>
다른 사람에 대한 종속성 플러그인의 pom.xml 파일입니다 같이
다음과 같이<project ...>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mycompany.myproduct</groupId>
<artifactId>gui.parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>com.mycompany.myproduct.gui.editors</artifactId>
<version>1.8.15-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
와 같은 플러그인의 MANIFEST.MF 파일은 다음과 같습니다
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MyProduct Editors Plug-in
Bundle-SymbolicName: com.mycompany.myproduct.gui.editors;singleton:=true
Bundle-Version: 1.8.15.qualifier
Bundle-Activator: com.mycompany.myproduct.gui.editors.Activator
Bundle-ActivationPolicy: lazy
Export-Package: com.mycompany.myproduct.gui.editors,
com.mycompany.myproduct.gui.editors.logger,
com.mycompany.myproduct.gui.editors.report
Bundle-Vendor: MyCompany
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.ui.workbench;bundle-version="3.104.0",
org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.jface;bundle-version="3.8.0",
com.mycompany.myproduct.preferences;bundle-version="1.8.15",
com.mycompany.myproduct.gui.utils;bundle-version="1.8.15",
org.eclipse.ui.workbench;bundle-version="3.104.0"
슬프게도 이것은 올바른 대답 인 것 같습니다. 왜 tycho가 로컬 Maven 레포 (p2도 아님)에서 유물을 찾을 수 있지만 회사 Maven 레파지토리에서는 찾을 수없는 이유는 무엇입니까? – tbacker
Tycho는 로컬로 빌드 된 다른 아티팩트에 대한 빌드의 사용 사례를 지원하기 위해 [명시 적 지원 (http://wiki.eclipse.org/Tycho/Target_Platform#Locally_built_artifacts)] 기능을 제공합니다. 원격 리포지토리에 사용되는 것과 동일한 것이었지만, [본질적으로 확장되지 않습니다] (https://issues.sonatype.org/browse/TYCHO-335). – oberlies
실제로 Nexus Maven 저장소를 사용하여 자동으로이 작업을 수행했습니다. Tycho 빌드 아티팩트 (예 : url 저장소/제품)를 배포하는 기본 Maven 저장소는 p2 레이아웃 (url 저장소/myproduct/.meta/p2)에 내용을 표시합니다. 우리 프로젝트의 리파지토리리스트에 두 URL을 모두 추가함으로써, 이것은 밖으로 작동하는 것처럼 보입니다! 전개 된 의존성은 해결되고 로컬 저장소'.m2/repository/p2/osgi/bundles' 내의 분리 된 디렉토리로 다운로드됩니다. – tbacker