Discussion:
How to force tycho to refer the local build package
(too old to reply)
Ashish Tyagi
2018-07-05 12:13:42 UTC
Permalink
I am building a bundle using maven-bundle-plugin, which I am using as
dependency for my eclipse rcp project using tycho. my
maven-bundle-configuration is

<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>


while my tycho configuration is

<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>


my common bundle build before eclipse rcp but after I removed my local
repository (.m2/repository) I am unable to build the project because now
the bundle dependency is not being resolved. I am getting following message
while building the project.


Added 0 locally built units to the target platform


I have tried everything but it not working now. the only way I can build
the project if I restore the old repository. So how can I force maven to
(p2 resolver) to include the locally build dependency for sure.


[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.


Kind Regards
======================
*Ashish Tyagi*
****@gmail.com <***@gmail.com>*
919-578-4944
======================

Continue reading on narkive:
Loading...