Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343339 - Multiplatform feature: Could not resolve feature
Summary: Multiplatform feature: Could not resolve feature
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-20 01:31 EDT by Tobias Jenkner CLA
Modified: 2021-04-28 16:55 EDT (History)
3 users (show)

See Also:


Attachments
example projects to reproduce this exception (32.64 KB, application/x-zip)
2011-04-20 01:31 EDT, Tobias Jenkner CLA
no flags Details
maven output (3.92 KB, text/plain)
2011-04-20 01:32 EDT, Tobias Jenkner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Jenkner CLA 2011-04-20 01:31:09 EDT
Created attachment 193652 [details]
example projects to reproduce this exception

A feature that is included in another feature with specification of more than one "os", "ws" or "arch" (like os="win32" ws="win32" arch="x86,x86_64") leads to 

[ERROR] Internal error: java.lang.RuntimeException: Could not resolve feature com.example.feature2_0.0.0; Path to dependency:
[ERROR] eclipse-feature:com.example.feature1:1.0.0.qualifier: org.codehaus.tycho.osgitools.DefaultReactorProject@5bf30b9c
[ERROR] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve feature com.example.feature2_0.0.0; Path to dep
endency:
  eclipse-feature:com.example.feature1:1.0.0.qualifier: org.codehaus.tycho.osgitools.DefaultReactorProject@5bf30b9c

        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(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        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: Could not resolve feature com.example.feature2_0.0.0; Path to dependency:
  eclipse-feature:com.example.feature1:1.0.0.qualifier: org.codehaus.tycho.osgitools.DefaultReactorProject@5bf30b9c

        at org.codehaus.tycho.ArtifactDependencyVisitor.newRuntimeException(ArtifactDependencyVisitor.java:39)
        at org.codehaus.tycho.ArtifactDependencyVisitor.missingFeature(ArtifactDependencyVisitor.java:23)
        at org.codehaus.tycho.osgitools.AbstractArtifactDependencyWalker.traverseFeature(AbstractArtifactDependencyWalker.java:203)
        at org.codehaus.tycho.osgitools.AbstractArtifactDependencyWalker.traverseFeature(AbstractArtifactDependencyWalker.java:92)
        at org.codehaus.tycho.osgitools.AbstractArtifactDependencyWalker.traverseFeature(AbstractArtifactDependencyWalker.java:194)
        at org.codehaus.tycho.osgitools.EclipseRepositoryProject$1.walk(EclipseRepositoryProject.java:59)
        at org.codehaus.tycho.osgitools.AbstractArtifactBasedProject.resolve(AbstractArtifactBasedProject.java:37)
        at org.codehaus.tycho.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:99)
        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
[ERROR]
Comment 1 Tobias Jenkner CLA 2011-04-20 01:32:19 EDT
Created attachment 193653 [details]
maven output
Comment 2 Igor Fedorenko CLA 2011-04-20 06:56:08 EDT
Is this even supported by p2? I vaguely remember asking p2 developers about this and the answer was "no".
Comment 3 Tobias Jenkner CLA 2011-04-20 08:58:30 EDT
I want to build a feature that contains rootfiles for different platforms, which is common in eclipse and supported by p2/pdebuild. 

I tried to specify multiple os/ws/arch attributes because otherwise the repository only contains the rootfiles for one platform (although I specify multiple environments in the target-platform-configuration).

I though this would be the same for feature.xml as for .product files (see https://issues.sonatype.org/browse/TYCHO-510?focusedCommentId=124728&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_124728).
Comment 4 Pascal Rapicault CLA 2011-04-20 10:20:52 EDT
In one of your feature, I notice the following: 
<includes
         id="com.example.feature2"
         version="0.0.0"
         os="win32"
         ws="win32"
         arch="x86,x86_64"/>

but it is not supported to have multiple values in os/ws and arch

You will have to have two entries.
Comment 5 Tobias Oberlies CLA 2011-04-21 03:19:16 EDT
(In reply to comment #3)
> I want to build a feature that contains rootfiles for different platforms,
> which is common in eclipse and supported by p2/pdebuild. 

This also works in Tycho 0.11 [1]. I don't know how this relates to this bug though. Why don't you ask on the mailing list again, if you are still having problems with root files for different platforms?

[1] https://docs.sonatype.org/display/TYCHO/PackagingTypes#PackagingTypes-eclipsefeature