[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-users] Bundles as dependencies in m2eclipse-tycho
|
You are using p2 dependency resolver for manifest-first projects and not
-Dtycho.targetPlatform, right? Assuming this is the case, run your
manfiest-first build with "-X -Dtycho.debug.resolver=artifactId"
parameters, where artifactId is the artifact id of the project that
fails dependency resolution. Tycho is expected to log information about
all p2 installable units it knows about, including everything coming
from maven repositories. You should see something like "Adding maven
artifact com.github.android.tools" in the log as well as corresponding
IU propagating through resolver, i.e. slicing, projection (whatever that
means) and OSGi resolution. See where it's lost and hopefully this will
provide enough info to fix it.
--
Regards,
Igor
On 11-05-25 12:54 PM, Ricardo Gladwell wrote:
The pom-first dependency is in a separate source tree, and is
installed to my local repo separate to the build from my eclipse
plugin test.
--
Ricardo Gladwell<ricardo.gladwell@xxxxxxxxx>
http://www.google.com/profiles/ricardo.gladwell
Twitter: @rgladwell - MSN: axonrg@xxxxxxxxx
On 25 May 2011 17:36, Igor Fedorenko<igor@xxxxxxxxxxxxxx> wrote:
Did you setup a *separate* build for your pom-first dependencies?
--
Regards,
Igor
On 11-05-25 11:36 AM, Ricardo Gladwell wrote:
I think it's resolving correctly in both the IDE and the command line,
but the dependency bundle is not being bundled when I run the tests.
--
Ricardo Gladwell<ricardo.gladwell@xxxxxxxxx>
http://www.google.com/profiles/ricardo.gladwell
Twitter: @rgladwell - MSN: axonrg@xxxxxxxxx
On 25 May 2011 13:08, Igor Fedorenko<igor@xxxxxxxxxxxxxx> wrote:
Have you looked at [1] that shows how to mix and match pom-first and
manifest-first projects both inside IDE and during command line build?
[1]
https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts
--
Regards,
Igor
On 11-05-25 05:21 AM, Ricardo Gladwell wrote:
Hi guys
I'm trying to use the Tycho m2eclipse extension, and I'd like to add a
OSGi bundle as a dependency. However, I can't seem to get them to
build them.
I created the following POM for my OSGi bundle dependency:
<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>com.github.rgladwell</groupId>
<artifactId>com.github.android.tools</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.5.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>com.github.android.tools</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
I also created a META-INF/MANIFEST.MF and it seems to compile in my
Eclipse.
In my eclipse-test-plugin project I added the following line to my
MANIFEST.MF file:
Require-Bundle:
com.github.rgladwell.com.github.android.tools;bundle-version="0.1.0"
However, when I actually execute the build in my unit tests I get a
missing dependency exception:
Failed to execute runnable (java.lang.IllegalArgumentException: Bundle
"com.googlecode.eclipse.m2e.android.test" not found. Possible causes
include missing dependencies, too restrictive version ranges, or a
non-matching required execution environment.)
Is there something else I should be doing to add bundle dependencies
to my eclipse-test-plugin project?
Regards...
--
Ricardo Gladwell<ricardo.gladwell@xxxxxxxxx>
http://www.google.com/profiles/ricardo.gladwell
Twitter: @rgladwell - MSN: axonrg@xxxxxxxxx