tycho icon indicating copy to clipboard operation
tycho copied to clipboard

Make P2ArtifactRepositoryLayout actually lookup artifacts

Open laeubi opened this issue 2 years ago • 4 comments

currently the P2ArtifactRepositoryLayout only provides a disabled repository. We should implement it that way that it is possible to resolve p2. prefixed artifacts e.g in the form of:

<dependency>
  <groupId>p2.eclipse.plugin</groupId>
  <artifactId>org.eclipse.osgi</artifactId>
  <version>3.17.0.v20210823-1805</version>
  <type>eclipse-plugin</type>
</dependency>

if I add a repository of layout p2 it should be able to resolve this to the correct item.

laeubi avatar Jan 30 '22 15:01 laeubi

If we keep type eclipse-plugin or other tycho-specific types, we can just ignore the groupId and filter on the type.

mickaelistria avatar Jan 31 '22 09:01 mickaelistria

Yes that's the idea here. in the above example one would simply search for an IU (regardless of group-id) with id=org.eclipse.osgi and version= 3.17.0.v20210823-1805 of namespace=osgi.bundle (what we might can support as an alternative type name)

laeubi avatar Jan 31 '22 09:01 laeubi

Sadly maven does not support version-range resolving through custom layouts, I've opened https://issues.apache.org/jira/browse/MNG-7421

laeubi avatar Feb 22 '22 19:02 laeubi

We might be able to generate a https://maven.apache.org/ref/3.2.5/maven-repository-metadata/ for a P2 repository with tycho.

laeubi avatar Feb 22 '22 19:02 laeubi