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

[MNG-8489] Clean up model description and API doc #2023

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

[MNG-8489] Clean up model description and API doc #2023

wants to merge 3 commits into from

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Jan 4, 2025

Also:

  1. Removed pre-maven 3 details
  2. Brought API docs inline with Oracle conventions for describing methods with verbs
  3. Minor copy edits

@elharo elharo marked this pull request as ready for review January 5, 2025 12:48
@elharo elharo requested review from gnodet and slachiewicz January 5, 2025 12:48
</description>
<type>String</type>
</field>
<field>
<name>artifactId</name>
<version>3.0.0+</version>
<required>true</required>
<description>The identifier for this artifact that is unique within the group given by the
<description>Returns a string that defines a collection of versions within the group given by the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds weird to define the artifactId as a collection of version. That's not really what is it imho. The groupId:artifact represents an artifact, and several versions of it can be available. But an artifatId is not a collection of version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is tricky. There might be a better way of putting this. Note that I am not saying here that a groupId:artifactId is a collection of versions but that it defines a collection of versions. Perhaps I could change it to identifies a collection of versions. I could also make a case for delineates a collection of versions, though that word is a little obscure for technical writing.

@slachiewicz
Copy link
Member

Would be best, later, to backport to 3.x line to have model 4.0.0 updated.

@@ -104,9 +104,9 @@
<field xdoc.separator="blank">
<name>parent</name>
<version>4.0.0+</version>
<description>The location of the parent project, if one exists. Values from the parent
<description>Returns the coordinates of the parent project, if one exists. Values from the parent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description fields are not only used to document the getter.
In maven 3, the description is used to generate javadoc for the field, getter and setter:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, the javadoc is not generated anymore when generating the Maven 3 model...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bleah. If i had my druthers, we wouldn't generate any of this. If we're going to use Modello to generate Javadocs, then we need to get the docs right.

For the field, we can drop it. It's private and doesn't need Javadoc. Do we have setters? We likely shouldn't.

I am surprised to hear that "the javadoc is not generated anymore when generating the Maven 3 model." If so, where did it come from? I noticed this problem when looking at the generated code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bleah. If i had my druthers, we wouldn't generate any of this. If we're going to use Modello to generate Javadocs, then we need to get the docs right.

For the field, we can drop it. It's private and doesn't need Javadoc. Do we have setters? We likely shouldn't.

I am surprised to hear that "the javadoc is not generated anymore when generating the Maven 3 model." If so, where did it come from? I noticed this problem when looking at the generated code.

anymore is the key word here. The Maven 3 model now wraps the Maven 4 one and the generator has changed, loosing javadoc generation in the process.
I don't think that's a big problem though, as if people target Maven 4, they should avoid using these classes anymore, and if they don't, they'd rather use the Maven 3 artifacts which have the javadoc.

@slachiewicz slachiewicz removed their request for review January 6, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants