-
Notifications
You must be signed in to change notification settings - Fork 118
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
Get rid of maven API #1147
Comments
I don't think that is feasible to do to the full extend. AFAIK in Maven 3.x almost everything effectively is API because in pre Java-9/module-system there is now way to enforce strong encapsulation of internals. |
Connectors can't use "everything" they can only use what m2e offers them. So if we have good API facade for whats really needed there won't be a problem at all. This also has nothing to do with module-system (maven already hides some things from plugins). |
I also am unsure it's a good thing here to design and expose yet-another-API, when the target audience (m2e connectors developers) are most likely already familiar with Maven APIs. |
If we ever want to support more than one maven version it actually is required. Connectors are not directly affected here as these can be specific to one version of a plugin (that uses a certain maven-api version), but m2e should work without these specila mven types that are completely out of our control. They might change, or even vanish completely. Because of this, I think all API we expose should not contain any maven types (e.g. MavenProject, MavenSession, Maven...), but one might adapt such type to a particular special type (e.g. IMavenProjectFacade > MavenProject) but should be aware it might not be possible and act accordingly. |
Just to collect a first place m2e-core/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DefaultClasspathManagerDelegate.java Lines 103 to 104 in 2ca5d4b
This can be replaced by having a This will then allow us to even perform performance improvements like parallel downloads using the resolver API and makes the classpath computation independent from the maven Version/API. |
Another place is m2e-core/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java Lines 303 to 304 in 2ca5d4b
|
Currently m2e uses some maven "api" in connectors and code, especially
MavenProject
.We should encapsulate these (like we did with the ArcheType API) so it is always possible to exchange the backing model, this will be especially important if we want to support maven3/4.
The text was updated successfully, but these errors were encountered: