Repository navigation
docs: explain source directory exclusions - #1221
Umer-Butt07 wants to merge 3 commits into
Conversation
gnodet-bot
left a comment
There was a problem hiding this comment.
These filters select the source files passed explicitly to the compiler. The compiler may still find an excluded source on the source path and compile it implicitly if another source references it. See the implicit parameter for control over implicit class-file generation with javac.
A few doc-quality observations:
1. Weak should not on a hard constraint (line 32)
Patterns are relative to each source root, such as
src/main/java, and should not start with/.
The constraint is not advisory — leading slashes simply won't match. Use direct phrasing: "Patterns are relative to each source root, such as src/main/java. Do not start patterns with /."
2. Run-on sentence in the multi-module paragraph (lines 55–57)
In a multi-module build, put this configuration in the POM of the module that needs the exclusion, rather than in a parent POM where it would be inherited by the other modules.
This is a 33-word sentence chaining two clauses. Split: "In a multi-module build, put this configuration in the module POM that needs the exclusion. Do not add it to a parent POM — it would be inherited by all child modules."
3. Implicit-compilation note — passive construction (lines 79–80)
These filters select the source files passed explicitly to the compiler.
Rewrite: "These filters select which source files the compiler receives explicitly." or simply lead with the action: "The compiler only receives the non-excluded source files."
4. date: front-matter
Other example pages use the page's original creation date in the front matter (e.g. 2006-07-05). Using today's date is unusual but not wrong — it just differs from existing convention. Worth aligning with the project style if maintainers care about it.
No correctness issues. The parameter links (excludes, testExcludes, implicit) and the XML snippet are accurate. LGTM structurally.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| Use the [`excludes`](../compile-mojo.html#excludes) parameter to exclude source | ||
| files or directories from main compilation. Patterns are relative to each source | ||
| root, such as `src/main/java`, and should not start with `/`. | ||
|
|
There was a problem hiding this comment.
should not reads as a recommendation, but leading / simply doesn't work — the pattern won't match anything. Use an imperative:
| files or directories from main compilation. Patterns are relative to each source | |
| root, such as `src/main/java`. Do not start patterns with `/`. |
| ``` | ||
|
|
||
| Run `mvn compile` to compile the remaining main sources. In a multi-module build, |
There was a problem hiding this comment.
💬 Run-on sentence (33 words, two clauses). Split for clarity:
| ``` | |
| Run `mvn compile` to compile the remaining main sources. In a multi-module build, | |
| Run `mvn compile` to compile the remaining main sources. In a multi-module build, | |
| put this configuration in the module POM that needs the exclusion. Do not add it | |
| to a parent POM — it would be inherited by all child modules. |
|
|
||
| ## Implicit Compilation | ||
|
|
||
| These filters select the source files passed explicitly to the compiler. The |
There was a problem hiding this comment.
💬 Passive construction. Rewrite in active voice:
| These filters select the source files passed explicitly to the compiler. The | |
| The compiler only receives the non-excluded source files, so an excluded source |
|
Adding the "3.x" label because the recommended way to exclude files would be different with version 4.x of the plugin. |
|
thanks, updated the wording in all three places. the site build passes too. |
gnodet-bot
left a comment
There was a problem hiding this comment.
Following up on my earlier review — all three wording findings are addressed.
- "should not start" → "Do not start patterns with
/" ✅ - Run-on sentence in the multi-module paragraph — split ✅
- Passive "source files passed explicitly" → "source files the plugin passes explicitly" ✅
One remaining nit in the new commit: "Configuration in a parent POM is inherited by its child modules." still uses passive voice. Active rewrite:
Child modules inherit any configuration set in a parent POM.
This also makes the caution slightly more explicit (parent POM → all children, not just some).
This review was generated by an AI agent, Hermès on behalf of @gnodet.
| put this configuration in the module POM that needs the exclusion. Configuration | ||
| in a parent POM is inherited by its child modules. |
There was a problem hiding this comment.
💡 Nit (passive voice): "is inherited by" is passive. Consider:
| put this configuration in the module POM that needs the exclusion. Configuration | |
| in a parent POM is inherited by its child modules. | |
| put this configuration in the module POM that needs the exclusion. Child modules | |
| inherit any configuration set in a parent POM. |
gnodet-bot
left a comment
There was a problem hiding this comment.
Previous findings are all addressed. LGTM.
- "Do not start patterns with
/" (direct phrasing) ✅ - Multi-module paragraph split into two shorter sentences ✅
- "Child modules inherit any configuration set in a parent POM." (active voice) ✅
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
done, changed that sentence to active voice and rebuilt the site. the rendered page and links check out. |
Closes #721.
Add an example for excluding source directories, including recursive patterns and configuration for a single module. Cover test-source exclusions separately and explain the compiler's implicit-compilation behavior. The guide is linked from the Examples menu.
Checks:
mvn -Prun-its verify: 51 unit tests and 74 integration builds passed, with 6 skips.mvn -Preporting -DskipTests site: built the site and checked the generated page, menu and parameter links.AI helped with the guide, checks and PR text.