Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Problem building bundle

Igor,

Thank you for the reply. I was able to use the Confluence page to fix
my problem. I have a follow up question. After adding dependencies to
the pom and telling the platform configuration to consider them, tycho
and m2e will still respect the OSGi convention where a package or set
of classes will be available to an OSGi plugin only if that plugin
imports the package, right? In other words, adding the dependency does
not short circuit OSGi's class path isolation.

Thanks again,

Ben

On Mon, Oct 10, 2011 at 5:03 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> Tycho provides limited support for resolving dependencies from Maven
> repositories. Please read [1] for information how to configure this and
> also about limitations of this approach.
>
> [1]
> https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts
>
> --
> Regards,
> Igor
>
> On 11-10-10 3:48 PM, Ben Abernathy wrote:
>>
>> All,
>>
>> I am pretty new to tycho and maven in general so I would appreciate
>> some help. I have a bundle called com.myco.archive that imports the
>> following packages:
>> org.apache.commons.compress.archivers[1.1.0,2)
>> org.apache.commons.compress.compressors[1.1.0,2)
>>
>> This is an actual plug-in and not a fragment. When trying to install
>> the bundle using "mvn clean install", I get the following exception:
>>
>> [INFO] Scanning for projects...
>> [WARNING] No explicit target runtime environment configuration. Build
>> is platform dependent.
>> [INFO] Resolving target platform for project MavenProject:
>> com.myco:com.myco.archive:1.0.0 @
>> c:\Users\ben.abernathy\src\managed\com.myco.archive\pom.xml
>> [INFO] Adding repository http://download.eclipse.org/releases/helios/
>> [INFO] Adding repository http://download.eclipse.org/releases/helios/
>> [INFO] Cannot complete the request.  Generating details.
>> [INFO]
>> {org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,
>> osgi.ws=win32, osgi.arch=x86_64, osgi.os=win32,
>> org.eclipse.update.install.features=true,
>> org.osgi.framework.system.packages=}
>> [INFO] [Software being installed: com.myco.archive 1.0.0, Missing
>> requirement: com.myco.archive 1.0.0 requires 'package
>> org.apache.commons.compress.archivers [1.1.0,2.0.0)' but it could not
>> be found]
>> [ERROR] Internal error: java.lang.RuntimeException:
>> org.eclipse.equinox.p2.core.ProvisionException: No solution found
>> because the problem is unsatisfiable. ->  [Help 1]
>> org.apache.maven.InternalErrorException: Internal error:
>> java.lang.RuntimeException:
>> org.eclipse.equinox.p2.core.ProvisionException: 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:534)
>>        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:
>> org.eclipse.equinox.p2.core.ProvisionException: No solution found
>> because the problem is unsatisfiable.
>>        at
>> org.sonatype.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:100)
>>        at
>> org.sonatype.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:360)
>>        at
>> org.sonatype.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:325)
>>        at
>> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:472)
>>        at
>> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:151)
>>        at
>> org.codehaus.tycho.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:86)
>>        at
>> org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:94)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>>        ... 11 more
>> Caused by: org.eclipse.equinox.p2.core.ProvisionException: No solution
>> found because the problem is unsatisfiable.
>>        ... 20 more
>>
>> Is this occurring because the p2 site I'm pointed at does not contain
>> the org.apache.commons.compress bundle? If so, what is the best way to
>> handle this? This bundle is kind of an interesting case because if you
>> look at the jar, it is both osgi-ized and is available via the maven
>> repository. Can maven not realize this and grab it from the repo?
>>
>> Thanks,
>>
>> Ben
>> _______________________________________________
>> 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