I think it is not that much work. We should specify a string format for the tags (which is basically a comma separated list). This can be a property on the plugin, we get all those via setProperties
in the Plugin interface.
aQute.bnd.repository.maven.provider.MavenBndRepository;\
tags = "baseline,release"; \
name="Maven Central";\
releaseUrl="${mavencentral}";\
snapshotUrl="${ossrh}";\
index="${.}/central.mvn";\
readOnly=true,\
The plugin should then implement a Tagged interface. On this interface we can make convenience methods that turn this in a set, etc.
We then extend the getPlugins(Class) and companions with String …
getPlugins(MavenBndRepository.class, BUILDPATH_TAG, "all")
This would mean that it requires tag “abc” AND “def”. We could support ! for not.
On the Tagged interface we could make static methods to create more complex expressions but I do not think they’re needed to start with. With our filter we can make fancy expressions though
The Workspace.getRepositories can also take the list of tag names.
The Project.getBundle() also need tags then, this is called from the places where get the Container lists to populate the paths.
Would be nice to support the tagging on the list of repositories in the (-repo I think) bndrun files. This is now always a bit of a pain in the ass with the ugly names repos tend to get.
Workspace.getRepositories()
should become private and we need to add separate methods for each type of repo. (getBuildRepositories(),getTestRespositories() … etc)
This is clearly not the way to go. The places where we build the paths are I think only once and they can provide the proper tags to a new getBundles() method.
Transitioning is going to be interesting. Clearly the tags are not going to be there from the start so we need a strategy that when no tags are set on the plugins, it should work like today. We might have to set a default set of tags when tags are not supported. This includes then all tags used in the Workspace/Project.