Skip to content
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

Modularise the plugin #758

Closed
jarmoniuk opened this issue Oct 14, 2022 · 10 comments · Fixed by #782
Closed

Modularise the plugin #758

jarmoniuk opened this issue Oct 14, 2022 · 10 comments · Fixed by #782
Milestone

Comments

@jarmoniuk
Copy link
Contributor

Another (mainteinance) idea: modularise the plugin: at least a separate module for the API, etc.

@slawekjaranowski
Copy link
Member

Idea is known ... topic not easy

https://groups.google.com/g/mojohaus-dev/c/hRltMfTmB4o

We also have some of proposition in PR #619

@slawekjaranowski
Copy link
Member

The most important is that we will break a links to documentation site.

Site is referenced from many place ... we need some redirection from old url to new one.

There is many useful hints https://gist.github.com/domenic/1f286d415559b56d725bee51a62c24a7

@jarmoniuk
Copy link
Contributor Author

I've noticed that it's not an easy job. Everything is interconnected.

@jarmoniuk
Copy link
Contributor Author

I don't get why you want to move the repository though. I'll create a draft PR so that you can have a look at my work so far, albeit not done yet.

jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 21, 2022
@jarmoniuk
Copy link
Contributor Author

jarmoniuk commented Oct 21, 2022

The most important is that we will break a links to documentation site.

I've updated the links, but now I'm actually thinking of maybe changing the outputDirectory of maven-plugin-plugin:report so that all mojo documentation is generated in the same folder?

EDIT: No, that would mess things up.

@slawekjaranowski
Copy link
Member

Proposition for first step

first modules

  • parent - with gav org.codehaus.mojo.versions:versions
  • versions-maven-plugin - org.codehaus.mojo:versions-maven-plugin - almost everything as is
  • model - org.codehaus.mojo.versions:model - model for main plugin - rules
  • model-report - org.codehaus.mojo.versions:model-report - model for reporting

assumptions

  • plugin will has original groupId org.codehaus.mojo
  • all new modules will have new groupId org.codehaus.mojo.versions - we will have everything for versions project under separate groupId in one place
  • current documentations is for plugin - so should be in versions-m-p module as is

rename git repository to versions

Links like https://www.mojohaus.org/versions-maven-plugin/... should be redirect to https://www.mojohaus.org/versions/versions-maven-plugin/...

I hope it can be achieved by creating simple html files in https://github.com/mojohaus/mojohaus.github.io with redirects
AFS analytics can help to detect missing items

https://analytics.apache.org/index.php?module=CoreHome&action=index&date=yesterday&period=day&idSite=18#?idSite=18&period=day&date=yesterday&category=General_Actions&subcategory=Events_Events

Next steps

Introduce new module versions-report-maven-plugin

Reporting needs many stuff on dependencies for doxia and so on - those are not needed for standard plugin

Probably shared/common module will be needed for commons items for main and reporting plugin

Public api module

Public api should only contains interfaces / enums which allow to crate extensions for plugin
We need documentation and examples how to write extensions

@jarmoniuk
Copy link
Contributor Author

If we're changing the packages, shouldn't it be org.mojohaus?

@jarmoniuk
Copy link
Contributor Author

jarmoniuk commented Oct 23, 2022

current documentations is for plugin - so should be in versions-m-p module as is

Well, that will make the generated root site notably empty.

image

Unless you want to redirect the output of the site plugin to the root module's target, but I wouldn't recommend that.

@slawekjaranowski
Copy link
Member

Root site will contains list of modules and simple description like in https://maven.apache.org/surefire/index.html

jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 23, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 23, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 29, 2022
@slawekjaranowski slawekjaranowski linked a pull request Nov 2, 2022 that will close this issue
@slawekjaranowski
Copy link
Member

First step done,
Next should be in next PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants