Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] having Maven provision the eclipse target platform directly from a Maven repository

Short answer is no, you can't use maven repository to resolve p2 (and
osgi in general) dependencies.

Maven repositories simply don't have required metatata. P2 needs to be
able to efficiently find all artifacts by bundle-id, package name or
using even more interesting conditions. This requires access to overall
repository metadata, which is not supported by maven2 repository layout.

--
Regards,
Igor

On 1/8/2014, 20:52, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] wrote:
Hi all

so maybe this is a crazy idea, but I'm wondering if there is a way to
circumvent setting up p2 update sites altogether, and have tycho
discover and add needed osgi artifacts directly from a maven repository
to the target platform?

I was experimenting with the <pomDependencies>consider</pomDependencies>
in the target-platform-configuration, but what I've found is 2 problems:

-Eclipse does not recognize these plugins and still shows build errors,
since dependencies described in the manifest are not in the workspace,

-while this will instruct Maven to find and download the needed jar
file(s), it fails to traverse up the dependency tree because versions
are not specified in the manifest of the included plugin :

Require-Bundle: gov.nasa.arc.irg.util;visibility:=reexport,
  org.codehaus.jackson.json;visibility:=reexport,
  com.google.guava;bundle-version="11.0.2";visibility:=reexport

This causes errors like this:
[ERROR]   Missing requirement: gov.nasa.arc.irg.plan 1.0.0.201401082355
requires 'bundle gov.nasa.arc.irg.util 1.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: gov.nasa.arc.irg.plan.spheres
1.0.0.qualifier depends on: bundle gov.nasa.arc.irg.plan 0.0.0
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: No solution found
because the problem is unsatisfiable.: [Unable to satisfy dependency
from gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle
gov.nasa.arc.irg.util 1.0.0.; Unable to satisfy dependency from
gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle
org.codehaus.jackson.json 0.0.0.; 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 gov.nasa.arc.irg.plan
1.0.0.201401082355 to bundle gov.nasa.arc.irg.util 1.0.0.; Unable to
satisfy dependency from gov.nasa.arc.irg.plan 1.0.0.201401082355 to
bundle org.codehaus.jackson.json 0.0.0.; No solution found because the
problem is unsatisfiable.]

Is this even a feasible idea?

thanks much
Tamar Cohen
NASA Ames Research Center



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top