Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] (no subject)

Thanks, that was what I needed to figure out what I'd done wrong.

I'd wrapped my <dependencies> in a <dependencyManagement>. Removing that fixed it.

Thanks again for all your help.

Matt

On Mon, Nov 21, 2011 at 7:23 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
Works for me, see attached working example...

--
Regards,
Igor


On 11-11-21 4:48 PM, Matthew O'Connor wrote:
Thanks. I'm having some trouble getting this to work.

I have a project that has a dependency on Apache Commons Math
(org.apache.commons:commons-math:2.2) - which is available as an OSGi
bundle from the Maven repositories.

To my project root pom, I added:

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math</artifactId>
<version>2.2</version>
</dependency>

Also in the root pom under
org.eclipse.tycho:target-platform-configuration's configuration, I added:

<pomDependencies>consider</pomDependencies>

One of the child projects has a MANIFEST.MF with:

Import-Package: org.apache.commons.math.util;version="2.2"

This is the output when I run `mvn clean compile`. What am I doing that
is preventing Tycho from resolving the manifest specified dependency?

[INFO] Scanning for projects...
[INFO] Resolving target platform for project MavenProject:
com.example:com.example.test:1.0.0 @ C:\ws\osgi\com.example.test\pom.xml
[INFO] Adding repository http://download.eclipse.org/releases/indigo
[INFO] Fetching p2.index (0B of 131B at 0B/s) from
http://download.eclipse.org/technology/epp/packages/indigo/
[INFO] Fetching p2.index (131B of 131B at 0B/s) from
http://download.eclipse.org/technology/epp/packages/indigo/
[INFO] Adding repository http://download.eclipse.org/releases/indigo
[INFO] Fetching p2.index (0B of 131B at 0B/s) from
http://download.eclipse.org/technology/epp/packages/indigo/
[INFO] Fetching p2.index (131B of 131B at 0B/s) from
http://download.eclipse.org/technology/epp/packages/indigo/
[INFO] 1 operation remaining.
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO]
{org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,
osgi.ws <http://osgi.ws>=gtk, osgi.arch=x86_64, osgi.os=linux,
org.eclipse.update.in <http://org.eclipse.update.in>

stall.features=true, org.osgi.framework.system.packages=}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: com.example.test 1.0.0
[ERROR]   Missing requirement: com.example.test 1.0.0 requires 'package
org.apache.commons.math.util 2.2.0' 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.example.test 1.0.0 to package org.apache.commons.math.util
2.2.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 com.example.test
1.0.0 to package org.apache.commons.math.util 2.2.0.", "No solution
found because the problem is unsatisfiable."]
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: "No solution found because the
problem is unsatisfiable.": ["Unable to satisfy dependency from
com.example.test 1.0.0 to package org.apache.commons.math.util 2.2.0.",
"No solution found because the problem is unsatisfiable."]
        at
org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:106)
        at
org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:102)
        at
org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:69)
        at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:342)
        at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:162)
        at
org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:85)
        at
org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        ... 11 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException

On Fri, Nov 18, 2011 at 7:12 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:

   There are two distinct cases.

   If dependencies available from Maven repositories are OSGi bundles, then
   it is possible to consume such dependencies directly from Tycho build.
   See [1] for more information how to set this up.

   If dependencies available from Maven repositories are not OSGi bundles,
   they need made OSGi bundles first. There is probably more than one way
   to do this, but I had good experience with maven-bundle-plugin
   <Embed-Dependency> feature to "wrap" maven artifacts in OSGi bundles.
   See [2] for more information. Such wrapper bundles can then be consumed
   from Tycho build as explained in [1].


   [1]
   https://docs.sonatype.org/__display/TYCHO/Dependency+on+__pom-first+artifacts
   <https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts>
   [2]
   http://felix.apache.org/site/__apache-felix-maven-bundle-__plugin-bnd.html

   <http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html>

   --
   Regards,
   Igor



   On 11-11-18 6:39 PM, Matthew O'Connor wrote:

       Maybe this is the wrong question as I still want to be able to
       build the
       project in Eclipse & thus it needs access to those jars.

       Could I instead use Maven with Tycho to generate an extension to the
       Eclipse target platform that could be used by Eclipse for its
       builds &
       by Tycho for its? It would be nice if this could pull jars from
       Maven
       repos, local supplied ones, etc.

       On Fri, Nov 18, 2011 at 2:00 PM, Matthew O'Connor
       <thegreendragon@xxxxxxxxx <mailto:thegreendragon@gmail.com>
       <mailto:thegreendragon@gmail.__com

       <mailto:thegreendragon@gmail.com>>> wrote:

           Hi all,

           I'm in the process of converting an existing Equinox project
       from a
           PDE build to a Maven/Tycho build, given its size I've started a
           sample workspace with projects to test out what I'm trying
       to do.

           I used `mvn -e
           org.eclipse.tycho:tycho-__pomgenerator-plugin:generate-__poms

           -DgroupId=com.example` to build initial poms.

           I modified my root pom to reflect the "Exemplary parent POM" at
       http://wiki.eclipse.org/Tycho/__Reference_Card
       <http://wiki.eclipse.org/Tycho/Reference_Card>.


           I want to enable Tycho to resolve artifacts/plugins from a Maven
           repository since we have dependencies that will exist in a Maven
           repo that won't be and aren't in a standard Eclipse p2 site. I'd
           like to keep our plugin dependencies specified in the
       manifests via
       "Import-Package". I've tried different permutations of this
           (removing the Eclipse Indigo p2 site from the pom repositories,
           adding explicit pom dependencies - like log4j:log4j, etc.),
       but have
           been unable to figure anything out.

           Is there a way to do this?

           Thanks,
           Matthew

           _________________________________________________

           tycho-user mailing list
       tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
       <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
       https://dev.eclipse.org/__mailman/listinfo/tycho-user
       <https://dev.eclipse.org/mailman/listinfo/tycho-user>





       _________________________________________________

       tycho-user mailing list
       tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
       https://dev.eclipse.org/__mailman/listinfo/tycho-user
       <https://dev.eclipse.org/mailman/listinfo/tycho-user>

   _________________________________________________

   tycho-user mailing list
   tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
   https://dev.eclipse.org/__mailman/listinfo/tycho-user

   <https://dev.eclipse.org/mailman/listinfo/tycho-user>




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

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



Back to the top