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
ICU-22324 Add docs for Maven usage #2655
Conversation
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
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.
lgtm tnx!
I did not read every word...
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
<dependency> | ||
<groupId>com.ibm.icu</groupId> | ||
<artifactId>icu4j</artifactId> | ||
<version>68.1</version> |
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.
Nitpick: newer version? (74.1, or at least 73.2 ?)
If 68.1 is already used in other places then either change all, or keep 68.1 here and do an update later (your call)
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.
Ack. I'm okay with an old version. We shouldn't feel the need to update this during a new version release's BRS tasks. If it's not old now, it will become so after the next version.
Any resource files (non-source files) will be located at `src/main/resources`. | ||
|
||
|
||
| Sub-component Path | Sub-component Name | Build Dependencies | Public API Packages | Description | |
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 wonder if it is worth listing this.
Or at least the dependency, and component names columns.
These are things that can be easily obtained with maven:
mvn dependency:tree
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 included that to be consistent with the Ant-based docs we have for ICU 73 and earlier. The same argument could have been made there ("just look at the build.xml file to find component deps").
Personally, I think documentation about a codebase is something that I find useful and would like to see more of, even though it is rare. But I do believe it to be a different type of doc than inline source comments, API docs, design/architecture docs, and tutorials.
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.
Yes, but documentation about code base also gets outdated very fast :-)
For the Ant dependencies you had to grep, then "massage" things yourself.
Maven has a standard way to do it.
What about keep the table, but remove the "Dependencies" column, and say "for an up to date dependency report run mvn dependency:tree
"?
The result is more readable than this table (for example you can see if something is a test dependency or not)
docs/userguide/icu4j/index.md
Outdated
</tr> | ||
<tr> | ||
<td><code>main/shared</code></td> | ||
<td>(Obsolete?) Files shared by ICU4J sub-components under the <code>main</code> directory including: <ul> <li>ICU4J runtime data archive (icudata.jar).</li> <li>ICU4J unit test data archive (testdata.jar).</li> <li>Shared Ant build script and configuration files.</li> <li>License files.</li></ul> </td> |
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.
+10
Obsolete, can remove the whole line.
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.
Done.
</tr> | ||
</table> | ||
|
||
## The Structure and Contents of ICU4J - ICU 73 and earlier |
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.
Idea: split in a different file, to reduce the clutter?
And with only a link from here?
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.
Markus wanted to keep the Ant instructions for people who might still be using a version of ICU4J that is a few versions old. There will be a non-trivial number of people.
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.
Yes, I didn't say remove.
Only split into a different file with a link.
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.
Let's keep it here for now, at least for expediency.
docs/userguide/icu4j/index.md
Outdated
Once the JDK and Maven are installed, run the desired Maven target. For example: | ||
|
||
~~~ | ||
~/icu/icu4j$ mvn test |
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.
mvn verify
?
Let's not encourage people to skip the integration tests :-)
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.
Done.
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.
Added a few comments.
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.
Updated.
And sorry, I realized I missed maven.md
. Will do.
docs/devsetup/java/maven.md
Outdated
--- | ||
|
||
|
||
Maven is a pretty standard build tool in the Java ecosystem with a very well-defined |
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.
Nitpick: remove "pretty" :-) After 20+ years it is standard :-)
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.
Done.
docs/devsetup/java/maven.md
Outdated
## Installation | ||
|
||
Install Maven from your OS package manager. | ||
The minimum version is 3.2.5, as configured in the `<ICU>/icu4j/pom.xml` root POM file's maven-enforcer-plugin. |
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.
Do we want this level of detail?
This is the kind of stuff that gets outdated sooner or later.
Link to https://books.sonatype.com/mvnex-book/reference/installation.html ?
In general I would make this doc smaller and link to the relevant sections of "Maven by Example" or "Maven: The Complete Reference" as 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.
Done.
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.
Added a few comments, nitpicks.
If you like (some) of them, don't be reluctant to implement them.
I will re-approve in a minute.
|
||
## Usage at the command line | ||
|
||
Maven divides its concept of a build into a "lifecycle" of a linear sequence of steps, called "phases". |
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 `<projectlist>` is a comma-separated list of names of the subfolders which contain the submodule configuration pom.xml files. | ||
|
||
If you want to run only a specific test(s), use the `-Dtest="<test>"` option, where `<test>` can be a test name, a class name / package prefix, or a comma-separate list of them. |
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.
Maybe drop this paragraph, since you have a whole "Run a single test" section?
mvn integration-test -am -pl main/core | ||
``` | ||
|
||
#### Run a single test |
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.
## More info on Maven | ||
|
||
To learn more about the details of Maven not covered above, | ||
start by reading the [*Maven by Example* book](https://books.sonatype.com/mvnex-book/reference/index.html), |
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.
Nitpick / personal pref: "book" outside the link.
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
I did a manual run of the "Deploy User Guide" workflow in my personal fork so that you can preview the effects of the changes.
Checklist