Thanks Tobias for your idea. It makes sense
to me now. Do you think the process you've described could be done as a
maven/tycho goal? The alternative would be to create a script to do the
job, however it would be better to have everything in one 'mvn clean install'
Tycho developers list
Tycho p2 repository origin filtering support
I still don’t think that
you need any new hooks into Tycho to achieve this.
a copy of the metadata of repository A, and remove the bad units from that
an artefact repository in the same directory which points to the original
location (through a compositeContent.xml with only one child).
your settings.xml, tell Tycho that the folder with the local metadata repository
& artefact repository is a mirror of the original site. 
Then the build fails if it
wanted to use a bad artefact.
On Behalf Of Maciej contractor Bendkowski
Sent: Mittwoch, 14. August 2013 17:14
To: Tycho developers list
Subject: Re: [tycho-dev] Tycho p2 repository origin filtering support
Tobias, that would be a nice solution if
I could remove the bad artifacts from the repository. I want my plugin
to work for any project, not only the current one I'm developing against.
The criteria I'm using is dynamic and relies on an external service. Ideally
I would want tycho to compile the project, ask my external service for
the 'valid' artifact list for repository A (this part is actually done
so far), and then check if all used artifacts from my repository A, are
valid. Other p2 repositories wouldn't be filtered. I want only allowed
bundles to be included in my build. This verification should be automatized,
preferably as a maven/tycho plugin, since humans may use bundles which
are fine in the sense of compiling, but not valid in the sense of an external
policy. That's why I want to store the artifact origins - I want to track
their actual usage. The p2 repository is a shared and I can't change it.
Do you have any idea how I could accomplish my goal, e. g. do this filtering?
So you want to fail the build if some bad artifacts in a repository A are
used during the build? This could be achieved by removing all bad artifacts
from A and running the build again. If the bad artifacts need to be used,
the build will fail.
I can't change the target definition. I have multiple repositories, including
different integration build p2 repositories. To be more specific about
my use case - I want to validate compiled bundles which are actually used
in the running build. I have a criteria, which each artifact from A should
meet in. If by any chance an artifact from A which is actually used in
the running build does not meet my criteria, the build should fail.
I am not sure I understand the usecase. To continue your example, why
not change target platform definition to only include repository A?
On 2013-08-14 5:51 PM, Maciej contractor Bendkowski wrote:
> I have a project with multiple p2 repositories as my target definition.
> I'd like to create a maven plugin which would require to know the
> repository origins from my target platform, e. g. if I'm using a
> particular p2 repository A, I'd like to filter my project dependency
> tree and get all dependencies fetched from the p2 repository A. Tycho
> resolves dependencies in order to create the dependency tree, however
> AFAIK it does not store the information from where the particular
> dependencies were taken from. I'd like to fore using a clean install
> default and get the artifact origins using Tycho. Is it possible to
> accomplish this goal? If yes, could you please help me out?
> Best regards,
> Maciej Bendkowski
> tycho-dev mailing list
tycho-dev mailing list tycho-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/tycho-dev
tycho-dev mailing list tycho-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/tycho-dev_______________________________________________
tycho-dev mailing list