Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] Tycho p2 repository origin filtering support

The use case seems far too rare to justify an addition to Tycho core. We have some more rarely needed things in tycho-extras, but the things that you want to do won’t work as a simple extra Maven plugin/goal.

 

So you are probably best off scripting your solution around a mvn call.

 

Regards

Tobias

 

 

From: tycho-dev-bounces@xxxxxxxxxxx [mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Maciej contractor Bendkowski
Sent: Montag, 19. August 2013 13:08
To: Tycho developers list
Subject: Re: [tycho-dev] Tycho p2 repository origin filtering support

 

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' command out-of-the-box.

Best regards,
Maciej Bendkowski




From:        "Oberlies, Tobias" <tobias.oberlies@xxxxxxx>
To:        Tycho developers list <tycho-dev@xxxxxxxxxxx>,
Date:        2013-08-19 11:03
Subject:        Re: [tycho-dev] Tycho p2 repository origin filtering support
Sent by:        tycho-dev-bounces@xxxxxxxxxxx





I still don’t think that you need any new hooks into Tycho to achieve this.
 
1.       Create a copy of the metadata of repository A, and remove the bad units from that repository.
2.       Create an artefact repository in the same directory which points to the original location (through a compositeContent.xml with only one child).
3.       In your settings.xml, tell Tycho that the folder with the local metadata repository & artefact repository is a mirror of the original site. [1]
 
Then the build fails if it wanted to use a bad artefact.
 
Regards
Tobias
 
[1] http://wiki.eclipse.org/Tycho/Target_Platform/Authorization_and_Mirrors
 
 
From: tycho-dev-bounces@xxxxxxxxxxx [mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Maciej contractor Bendkowski
Sent:
Mittwoch, 14. August 2013 17:14
To:
Tycho developers list
Cc:
tycho-dev-bounces@xxxxxxxxxxx
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?

Best regards,
Maciej Bendkowski




From:        
"Oberlies, Tobias" <tobias.oberlies@xxxxxxx>
To:        
Tycho developers list <tycho-dev@xxxxxxxxxxx>,
Date:        
2013-08-14 16:51

Subject:        
Re: [tycho-dev] Tycho p2 repository origin filtering support
Sent by:        
tycho-dev-bounces@xxxxxxxxxxx






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.

 
Regards

Tobias
 
From:
tycho-dev-bounces@xxxxxxxxxxx [mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Maciej contractor Bendkowski
Sent:
Mittwoch, 14. August 2013 16:08
To:
Tycho developers list
Subject:
Re: [tycho-dev] Tycho p2 repository origin filtering support

 
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.


Best regards,
Maciej Bendkowski




From:        
Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To:        
tycho-dev@xxxxxxxxxxx,
Date:        
2013-08-14 15:56

Subject:        
Re: [tycho-dev] Tycho p2 repository origin filtering support
Sent by:        
tycho-dev-bounces@xxxxxxxxxxx







I am not sure I understand the usecase. To continue your example, why
not change target platform definition to only include repository A?

--
Regards,
Igor

On 2013-08-14 5:51 PM, Maciej contractor Bendkowski wrote:
> Hi,
>
> 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 p2
> 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 by
> 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@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
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


Back to the top