-
-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for repository tags #6116
Conversation
e.g. add a property tags="baseline,release, foo";\ to a Repository in build.bnd tags="baseline,release, foo";\ Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
example: -runrepos: \ Workspace,\ @resolve this adds the Workspace repo and all other repos tagged with the tag 'resolve' I used the '@' character as a marker for tags (for now). initially I wanted to use '#' but this is a comment in a .bndrun file. With this i got a successful resolution as before Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
Summary from the bnd zoom call today:
That's it so far. I will post an update once I have this implemented and from there we can discuss the next step. Thanks @pkriens for the input. |
- this commit partly reverts previous commit - repos now get the 'resolve' tag by default if not specified - .bndrun: empty -runrepos will be populated with all repos having the 'resolve' tag - .bndrun: resolution consider all repos having the 'resolve' tag. that means you can exclude a repo from resolution by manually assigning it a different tag (e.g. to exclude the baseline repo from resolution, you should give the baseline-repo e.g. the tag 'baseline' and make sure it does NOT have the 'resolve' tag Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
@pkriens I have implemented the above.
Example: this is my Repositories list with no It is basically all repos with the resolve tag (repos have not tags specified, so the default 'resolve' is used) Resolution:
Quoting commit b9a574f
Let's discuss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. You can take the recommendations:
- extend RepositoryPlugin with Tagged
- Maybe make a Tags class, extending Set
- not parsing the string all the time
biz.aQute.repository/test/aQute/bnd/repository/maven/provider/WorkspaceTest.java
Outdated
Show resolved
Hide resolved
- extend RepositoryPlugin with Tagged - make a Tags class, extending Set - not parsing the string all the time - replace RepoTags enum with Constants.REPOTAGS_RESOLVE Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
Somehow I think it belongs there. Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
fix and improve testcase to test for consistent sorting of tags Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
- keep backwards compatibility so that Repos without tags return an empty set and empty set means "matches" - renamed Tags.matchesTags to Tags.isIncluded - move tags to own package aQute.bnd.service.tags Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
I think that better reflects the intent. - also adjusting javadoc accordingly - and move static methods to bottom Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
Closes #5966
Based on brainstorming here https://bnd.discourse.group/t/baseline-repo-exclude-from-the-build-path/391/6
In this PR
tags="baseline,release, foo"
to a Repository inbuild.bnd
.bndrun
if you remove the-runrepos
you get all repositories which have either no tags set or the 'resolve' tagresolve
(but instead any other tag e.g.<<EMPTY>>
and remove the-runrepos
from the.bndrun
.-runrepos
then today's behavior is still in place that the given repo names are usede.g. a
.bndrun
file without-runrepos
would include the following repos in the resolution:because it has the
resolve
tagand
because there is no tags
but not
because it has a no
resolve
tag.To exclude the baseline repo in the example, you would not add the
resolve
tag to the baseline-repo, and then it won't be considered for Resolving. I have not used baselining yet, so I am not familiar with the topic and what areas are not covered by this.The current state of the PR just lay the foundation for tagging. More features could be added like allowing for NOT or more sophisticated filter expressions.