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
Create a 'maven-p2-site' plugin #121
Conversation
- add a PublisherApplication - add first version of mojo Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Filter duplicates Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
I have now added support to include even managed dependencies, that way it is possible to create an 'self-contained' updatesite for a BOM the following way:
With |
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
I have now added an option to optionally specify a category.xml if one does not likes the default generated one or likes more sophisticated filtering rules. For advanced filtering, I also added the maven information as capabilities to the p2 unit. |
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
If there are not concerns I'll merge this next week, we can change/improve later then. |
I haven't looked in details but we shouldn't (strongly discouraged) name it maven-p2-plugin as per https://maven.apache.org/guides/plugin/guide-java-plugin-development.html |
Good point what so at least |
I would prefer |
Tycho already has a tycho-p2-repository-plugin that seems to fit very well. This should just be a new |
I can place the mojo there of course if you think it fits there...
Otherwise it is hard to use in a target-file as PDE otherwise do not offer anything to select
a user can always provide a category.xml if more control over generated categories is desired.
Actually I think they are perfect to be consumed by end-users and are not intermediary at all |
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
relocated and renamed to |
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Any more comments on this? |
I still find the name |
It assembles a p2-maven-site that is a p2 site only containing references to maven artifacts :-)
I find this misleading as it does not assemble any artifacts nor dependencies, it just takes what is already there... |
So what about |
This does not publish any artifacts, I think we should really keep the name descriptive. |
This name is not descriptive of what it does or what's it's intended to. I'll keep thinking about it and will change it when I find something better. |
Sure we can improve the name (I just don't like to delay this more just because of the name), but maybe it would help to explain why you think it is 'not descriptive of what it does or what's it's intended to' as it is descriptive and describes exactly what it does to me. So maybe its me (as I'm not a native english speaker) getting it wrong, or we have a different understanding of the scope of this feature? |
If I read "assemble-p2-maven-site" with basic knowledge of Maven or p2, I don't know what to expect nor really have a clue about what it does. |
I think we can't explain the whole story in the mojo-name. That's why I added a longer explanation in the javadoc that should show up in the site-docs then. So a good name for me should state that:
|
That's already implied by the plugin name (tycho-p2-repository-plugin). |
I'm not sure if I understand what you have in mind here, but must confess that I don't like to bend the task of a mojo too much with many of config options to distinguish between different use-cases... It might be better to have a dedicated mojo for such use-cases and handling existing repositories seems a bit out of scope.. If you think p2 is implied I would suggest simply |
I imagine that if we have a pre-existing p2 repo, this mojo could be used to just add references to the existing repo, extending it.
"maven site" is a dedicated term that's entirely unrelated in the maven world. We mustn't use this. And I think we should really avoid creating a new concept of a "maven site", after all, it's just a p2 repo, which happens reference maven artifacts. |
I'm not sure if this will work well...
And repository as well ;-) I don't think that 'site' or 'repository' are any terms could be exclusive dedicated to maven, and putting the 'references' is just more confusing IMO... thats why we have invented namespaces and tycho could use names in his namespace that might have a different meaning in another namespace (maven). From a users-perspective I already find tycho very confusing with all its different plugins and counter intuitive mojo names so one needs to lookup how the thing is named all the time ... so probably we better name the mojos from their bug numbers and simply use |
Right, but repository is a p2 term as well, so although it's confusing, it's not new and is semantically strong. "site" means nothing in p2 world, so let's not introduce a new meaningless and confusing term.
If you use a good pom editor, it can suggest the mojo via fuzzy search. So the question is "what would a Tycho user type if they want to build a p2 repository made of references to maven artifacts". Maybe "assemble" because it's used in other, maybe "repository" because it's used in the standard "assemble-repository" mojo. And what else? |
If repository is fine for you what about But for the sake of completeness, I would defiantly type 'maven' as a first guess for sure... |
I find it a bit weak (not very explicit about it being only referencing artifacts and not including them) and confusing (I read "maven-repository" as "Maven Repository" exactly the opposite of the meaning of repository here). That said, it's better than the current name. I'll start a PR to adopt that name. |
Thats the problem that p2 and maven share some names but I have no idea... and artificial intelligence seems not to help here either... |
See #114 for some more details.
This mojo produces a true maven p2 update site, that means that
Such a site might be consumed in a tycho build like this: