Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Unsatisfied dependency to fragment in feature

The version is stored in the file artifactid-version-p2artifacts.xml in your Maven repository next to your bundle JAR.

Jeff


On Tue, Aug 6, 2013 at 12:58 PM, Jan Pešta <jan.pesta@xxxxxxxxxxx> wrote:

Hi Bernhard,

 

I have checked it again and it is not correct. Following is example demonstrating my problem:

 

We have in reactor 1 (source code without build):

plugin.1.0.0-SNAPSHOT

MANIFEST.MF – has version 1.0.0.quialifier

feature.1.0.0-SNAPSHOT

<feature

      id=" feature"

      label=" Feature"

      version="1.0.0.qualifier">

   <plugin

         id="plugin"

         version="0.0.0"

         unpack="false"/>

</feature>

 

When this is build and installed into local maven repository I have there following:

plugin.1.0.0-SNAPSHOT

MANIFEST.MF have version 1.0.0.201308060957

feature.1.0.0-SNAPSHOT

<feature

      id=" feature"

      label=" Feature"

      version="1.0.0.201308060957">

   <plugin

         id="plugin"

         version="1.0.0.201308060957"

         unpack="false"/>

</feature>

 

In .repository\.meta\p2-local-metadata.properties is

customer:plugin:1.0.0-SNAPSHOT

customer:feature:1.0.0-SNAPSHOT

 

So I think that plugin is not correctly installed in maven repository, because version 1.0.0.201308060957 is not installed in maven repository.

 

Now if I try in another reactor build product which contains the feature I get following error:

[INFO] Cannot complete the request.  Generating details.

[INFO] Cannot complete the request.  Generating details.

[INFO] {osgi.ws=win32, osgi.os=win32, osgi.arch=x86, org.eclipse.update.install.features=true}

[ERROR] Cannot resolve project dependencies:

[ERROR]   Software being installed: product.product 1.0.0.qualifier

[ERROR]   Missing requirement: feature.feature.group 1.0.0.201308060957 requires plugin [1.0.0.201308060957]' but it could not be found

[ERROR]   Cannot satisfy dependency: product.product 1.0.0.qualifier depends on: feature.feature.group 0.0.0

[ERROR]

[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from feature.feature.group 1.0.0.201308060957 to plugin [1.0.0.201308060957].", "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 feature.feature.group 1.0.0.201308060957 to plugin [1.0.0.201308060957].", "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 feature.feature.group 1.0.0.201308060957 to plugin [1.0.0.201308060957].", "No solution found because the problem is unsatisfiable."]

        at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:77)

        at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:89)

        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:122)

        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:80)

        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:377)

        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:354)

        at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:103)

        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:82)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

        ... 11 more

[ERROR]

[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

 

 

 

 

 

Kind regards / S pozdravem

 

Jan Pešta

SW Engineer Sr.

 

CertiCon a.s., www.certicon.cz

Vaclavska 12

12000 Prague 2

Czech Republic

 

Office Prague: +420 224 904 406

Mobile: +420 604 794 306

 

E-mail: jan.pesta@xxxxxxxxxxx

 

From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Bernhard Baase
Sent: Tuesday, August 06, 2013 11:12 AM
To: Tycho user list
Subject: Re: [tycho-user] Unsatisfied dependency to fragment in feature

 

Have you checked:

 

.m2/repository/.meta/p2-local-metadata.properties

 

Which is tychos locally build artifacts index ..

 

When bundles are build before, they are listed there and they can be fetched by your build from there via id reference in a feature/product..

Be sure to have the correct syntax for reference…

Do you delete local-repo before building the first reactor and reference the plugin in the feature via magic number 0.0.0 ?

 

 

Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Jeff MAURY
Gesendet: Dienstag, 6. August 2013 10:51
An: Tycho user list
Betreff: Re: [tycho-user] Unsatisfied dependency to fragment in feature

 

Tycho will also install in the local repository the plugin jar with the qualifier (in a "hidden" separate location) and should be able to resolve it.

 

Jeff

 

On Tue, Aug 6, 2013 at 10:29 AM, Jan Pešta <jan.pesta@xxxxxxxxxxx> wrote:

Hi,

 

We are building large eclipse project using maven and tycho.

 

I have split the whole project into several reactors.

 

Problem what I have is that when last reactor is build, it has internal dependency to result of previous reactors.

 

When I checked maven repository I see that plugins are available but they have not correct version. The feature is installed in maven repository with version containing –SNAPSHOT, also created jar has SNAPSHOT in name, but when I check context of feature.xml I see qualifier replaced with a build date and all plugins have also replaced qualifier in versions. So then this feature can’t find the plugin because in maven repository is accessible with SNAPSHOT and not with exact version.

 

Can you please let me know what can be wrong here.


Thanks,

Jan

 

 

 

Kind regards / S pozdravem

 

Fehler! Es wurde kein Dateiname angegeben.

Jan Pešta

SW Engineer Sr.

 

CertiCon a.s., www.certicon.cz

Vaclavska 12

12000 Prague 2

Czech Republic

 

Office Prague: +420 224 904 406

Mobile: +420 604 794 306

 

E-mail: jan.pesta@xxxxxxxxxxx

 


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



 

--
Jeff MAURY

Das Bild wurde vom Absender entfernt.
"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

*****************************************************
This e-mail may contain confidential material. It is intended only for the person or entity which it is addressed to. In case you should not be supposed to get this e-mail we ask you to delete it without taking notice of its content. Any views or opinions expressed in this e-mail are those of the sender and do not necessarily coincide with those of The Swiss Raiffeisen Group. Therefore this e-mail does not represent a binding agreement nor an offer to deal. E-Mail transmission can be insecure and can contain errors. Information could be intercepted, corrupted, lost, destroyed, incomplete or may contain viruses. Neither The Swiss Raiffeisen Group nor the sender can accept any liability for any kind of damage as the result of viruses or transmission errors.
****************************************************


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




--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Back to the top