-
Notifications
You must be signed in to change notification settings - Fork 261
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
[MNGSITE-550] What's new in Maven 4? #598
base: master
Are you sure you want to change the base?
Conversation
Info:
|
Thanks for the feedback and the editing @gnodet! |
Hope everything is fine now :) |
content/markdown/whatsnewinmaven4.md
Outdated
The updated API provides hints as preparation for Maven 4. | ||
You can enable them by passing the following argument to your build: `-Dmaven.plugin.validation=verbose`. | ||
You should also only rely on the official Maven BOMs when developing plugins. | ||
If a plugin still relies on long-deprecated and now removed Plexus dependency resolution, it will no longer work |
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.
I'm not sure this is true. If it is, elaboration is needed.
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.
Thank you for your feedback @elharo! Integrated all of your text suggestions and left the two questions/doubts for further responses/discussion - I'm open to everything. |
I slightly disagree on that: The audience of this document are all Maven users - those who only want to run their build, but also those who want to know more about the changes, are responsible for build management in their teams, etc (I think someone called them "power users"). If we only considers those who "blindly" use Maven, we don't need the article at all. They are those who still run Maven 3.3.9 and
What do you think about
Used the term "consumers" due the terms the committers introduced when developing this feature. |
@elharo Thanks for your feedback again. I don't know why I have not seen it 4 days ago :O Think I went through all of them, except the subproject renaming. Might have another look at it tomorrow (I'm too tired for that now). |
do You have plan to publish it now or when 4 is released? |
I would like to release it now, as a) @cstamas said we get asked what changes more often and b) several of us (e.g. Maarten, Karl Heinz, Robert, me) give talks about that quite a long time, but it's always too less time on conferences or many JUG to cover all. |
74b0df5
to
99ea2cc
Compare
|
||
### Declaring the root directory and directory properties | ||
|
||
Every time Maven executes a build, it has to determine the project's root to identify things like the parent project, |
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.
Where else are these terms defined?
|
||
As you can see, these properties differentiate by their scope, where `project` is always related to the Maven project's | ||
definition (you could interpret this as the POM files) and `session` is the actual execution of a Maven build and is the | ||
current working directory. |
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.
is session the actual execution of a Maven build or the
current working directory? Or does this sentence need to be rephrased?
Removing myself since I don't have the capacity to review such large PRs. |
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.
This doesn't say that the namespace is changing from http://maven.apache.org/POM/4.0.0 to http://maven.apache.org/POM/4.1.0. IMHO it shouldn't be changing and I'm hopeful this change can be reverted. Mixing versions into namespace URIs is a known XML antipattern. But if it's in play it is a huge change that should be called out here.
What are you referring to exactly ? |
For this PR it should call out that the namespace used to be http://maven.apache.org/POM/4.0.0 and is now http://maven.apache.org/POM/4.1.0 For the general Issue I filed a bug in Jira with more details. Versions in namespace URIs is an antipattern, though a common one. |
Mentioned the new namespace in the Model 4.1.0 section |
|
||
Security is important, and storing unencrypted passwords is bad practice. | ||
Maven 3's password encryption had several serious issues and could more accurately be called "password obfuscation". | ||
Maven 4 instead has a completely redone encryption system, based on Maven Encryption (`mvnenc`) - a standalone CLI tool. |
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.
mvnenc is just a frontend, the underlying backend is rather https://github.com/codehaus-plexus/plexus-sec-dispatcher. Compare with #654.
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.
I would not go into this distinction: plexus-sec-dispatcher is NOT an API, is not something people should use or reuse or even made aware. We already had problems with it in Maven3.
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.
But
based on Maven Encryption (
mvnenc
) - a standalone CLI tool.
feels wrong to me. I would rather remove the sentence then altogether.
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.
So what API is proposed by Maven for sensitive values e.g. for Mojos or extensions?
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.
"plexus-sec-dispatcher is NOT an API, is not something people should use or reuse or even made aware. " -- Hyrum's Law rides again
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.
But
based on Maven Encryption (
mvnenc
) - a standalone CLI tool.feels wrong to me. I would rather remove the sentence then altogether.
The phrasing is based on @cstamas blog about it:
Maven4 password encryption is handled by the new CLI tool: mvnenc.
Shall I add a link to https://maven.apache.org/guides/mini/guide-encryption.html here, because that's the guide about encryption, which can (or should) hold the details.
This reverts commit 61da4f8.
<meta name="author" content="Matthias Bünger" /> | ||
</head> | ||
|
||
# What's new in Maven 4? |
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.
Inference of <modelVersion>
is another new feature in Maven v4. You may want to add that.
Doing
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd">
<modelVersion>4.1.0</modelVersion>
</project>
is no longer necessary: you can leave out the <modelVersion>
element and it will be inferred from the XML ns.
The below is equivalent to the above:
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd">
</project>
(no <modelVersion>
element)
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.
that feature has been challenged by https://issues.apache.org/jira/browse/MNG-8537
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.
that feature has been challenged by https://issues.apache.org/jira/browse/MNG-8537
I'm aware of this issue and as far as I understand the discussion it's also the cause why this PR does not move forward. Maybe I should even close it completely. It's open for about 6 weeks now, some don't want to review it cause if its size and as long as it's open from time and time someone sneaks in to request documentation which should be in the explicit pages but not in a summary (@lbruun I don't mean you by this, your ping about the not necessary <modelVersion>
is totally fine and I would instantly add it, if MNG-8537 would not exists/be closed).
This PR adds an article about the major changes in Maven 4.