You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tycho-p2-repository:assemble-repository goal has the property includeAllDependencies to control if "all transitive dependencies" of included artifacts are added to a p2-repositories assembled for a category.xml file or an Eclipse product and thus controls if that repo will be self-contained.
I propose to introduce the possibility to automatically add references pointing to the repositories that provide the dependencies of the included artifacts to the assembled repository. This also makes the repository effectively self-contained but instead of embedding dependencies only the providing repositories are referenced so that P2 can fetch those dependencies from the original repo during installation. Given that the providing repo does not change it should lead to the same result but the assembled repository would be smaller.
Naively spoken what has to be done is:
to each dependency resolved from the TP (or Maven) attach the providing repository
It should be the real/final repo in case of a p2-composite repository
Compute the dependency closure (just like when includeAllDependencies is set to true) and add the Set of providing repos as reference to the assembled repo instead of adding the dependencies themself.
I have not yet looked into the the details, but potential difficulties could be:
Does P2 expose the exact repo a dependency is coming from?
References for Maven dependencies;
IIRC support was added for links to Maven-artifacts using their coordinates? Does P2 understand them too, or only Tycho and M2E?
Can the BND-instructions be embedded into that link too? BND-instructions could for example change the Bundle-Symbolic name.
Can an alternative Maven repository be specified if a Maven artifact is not obtained from Maven-Central?
Unless somebody else wants to work on this, I can offer to take care of this proposal in the mid-term future. @läubi Is this what you have propose in eclipse-m2e/m2e-core#554 (comment)?
The text was updated successfully, but these errors were encountered:
I think "self-contained" more reefers to that I could zip the whole site and everything is included but beside the naming it is not that trivial as it may sound in the first place, just from the "traditional" locations:
Tycho do not know what is the origin of an artifact
An artifact can effectively come from multiple sites (mirrors, composites, someone republishing the artifact)
Artifacts can even come from location that do not have an URL
Artifacts can even come from URLs that are not public accessible (file-url, configured mirrors, ...)
Embedding other Update-site URLs is prone to break your Update-site if the other site changes the URL or remove it completely
Because of this I think having something automatic would add a lot of complexity and it might be more profitable to manage it manually.
What is would be rather simple (and what I have suggested in eclipse-m2e/m2e-core#554 (comment) ) is to fetch the target (if any) iterate it and simply add all URLs of type P2 location as "also look there", and given the concept of a target it makes most sense if one really likes to have such a feature.
About the maven-item part:
Everything that is a valid maven coordinate could be expressed as a maven URL but you would require consumers to either use tycho or m2e, that might or might not be a restriction
as an alternative you could add the actual http url, but this will bind to one specific place (so no mirrors, no caching in the local repository)
You can't use that for anything that is BND wrapped (or at least not without adding special support for this in P2 even though this is something I have had in mind already also for source items)
With the new addIUTargetRepositoryReferences and filterProvided as well as the repositoryReferenceFilter for the tycho-p2-repository-plugin I think we can consider this resolved.
The
tycho-p2-repository:assemble-repository
goal has the propertyincludeAllDependencies
to control if "all transitive dependencies" of included artifacts are added to a p2-repositories assembled for acategory.xml
file or an Eclipse product and thus controls if that repo will be self-contained.I propose to introduce the possibility to automatically add references pointing to the repositories that provide the dependencies of the included artifacts to the assembled repository. This also makes the repository effectively self-contained but instead of embedding dependencies only the providing repositories are referenced so that P2 can fetch those dependencies from the original repo during installation. Given that the providing repo does not change it should lead to the same result but the assembled repository would be smaller.
Naively spoken what has to be done is:
includeAllDependencies
is set to true) and add the Set of providing repos as reference to the assembled repo instead of adding the dependencies themself.I have not yet looked into the the details, but potential difficulties could be:
Unless somebody else wants to work on this, I can offer to take care of this proposal in the mid-term future.
@läubi Is this what you have propose in eclipse-m2e/m2e-core#554 (comment)?
The text was updated successfully, but these errors were encountered: