我正在使用maven-bundle-plugin构建一个包,我将其用作使用tycho的eclipse rcp项目的依赖项。我的maven-bundle-configuration是
<configuration>
<instructions>
<!-- @formatter:off -->
<Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
<Bundle-Version>1.0.0-SNAPSHOT</Bundle-Version>
<_removeheaders>Bnd-LastModified,Build-Jdk,Built-By,Created-By,Tool</_removeheaders>
<_snapshot>SNAPSHOT</_snapshot>
<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
<Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
<Embed-Directory>libs</Embed-Directory>
<Embed-Transitive>true</Embed-Transitive>
<Import-Package></Import-Package>
<_exportcontents>!org.apache.commons.logging,!org.apache.commons.logging.impl,*</_exportcontents>
<_failok>true</_failok>
<_nouses>true</_nouses>
<!-- @formatter:on -->
</instructions>
<niceManifest>true</niceManifest>
<manifestLocation>META-INF</manifestLocation>
</configuration>
我的tycho配置为
<dependencies>
<dependency>
<groupId>com.ashish</groupId>
<artifactId>sample-common</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>eclipse</id>
<layout>p2</layout>
<url>http://download.eclipse.com/mars</url>
</repository>
</repositories>
<build>
<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>
<configuration>
<pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
</build>
我的通用软件包在eclipse rcp之前构建,但是在删除本地存储库(.m2 / repository)之后,由于现在无法解决软件包依赖关系,因此无法构建项目。在构建项目时,我收到以下消息。
Added 0 locally built units to the target platform
我已经尝试了所有方法,但现在无法正常工作。如果还原旧存储库,则是构建项目的唯一方法。因此,如何确定要强制Maven(p2解析器)包括本地构建依赖项。
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: ashish.zenith.executor 1.0.0.qualifier
[ERROR] Missing requirement: ashish.zenith.executor 1.0.0.qualifier requires 'java.package; ashish.core.services.client 0.0.0' but it could not be found
[ERROR]
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.