Skip to content

Commit f6d4eea

Browse files
committed
Improved rule 110-java-maven-best-practices
1 parent fc8826d commit f6d4eea

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

.cursor/rules/110-java-maven-best-practices.mdc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ Effective Maven usage involves robust dependency management via `<dependencyMana
2323
- Rule 6: Manage Repositories Explicitly
2424
- Rule 7: Centralize Version Management with Properties
2525

26+
27+
## Instructions for AI
28+
29+
Update the pom.xml based on the following rules about Maven best practices.
30+
31+
2632
## Rule 1: Effective Dependency Management
2733

2834
Title: Manage Dependencies Effectively using `dependencyManagement` and BOMs
@@ -582,3 +588,9 @@ Description: Define all dependency and plugin versions in the `<properties>` sec
582588
</project>
583589

584590
```
591+
592+
593+
## Output Requirements
594+
595+
- Update the file pom.xml if something is not correct
596+
- verify changes with the command: `mvn validate`

spml/src/main/resources/110-java-maven-best-practices.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
<toc auto-generate="true"/>
3232

3333
<content-sections>
34+
<instruction-section>
35+
<instruction-title>Instructions for AI</instruction-title>
36+
<instruction-description>Update the pom.xml based on the following rules about Maven best practices.</instruction-description>
37+
</instruction-section>
38+
3439
<rule-section number="1" id="effective-dependency-management">
3540
<rule-header>
3641
<rule-title>Effective Dependency Management</rule-title>
@@ -625,5 +630,13 @@ my-app/
625630
</bad-example>
626631
</code-examples>
627632
</rule-section>
633+
634+
<output-requirements-section>
635+
<output-requirements-title>Output Requirements</output-requirements-title>
636+
<output-requirements-rules>
637+
<output-requirements-rule>Update the file pom.xml if something is not correct</output-requirements-rule>
638+
<output-requirements-rule>verify changes with the command: `mvn validate`</output-requirements-rule>
639+
</output-requirements-rules>
640+
</output-requirements-section>
628641
</content-sections>
629642
</system-prompt>

spml/src/test/resources/110-java-maven-best-practices.mdc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ Effective Maven usage involves robust dependency management via `<dependencyMana
2323
- Rule 6: Manage Repositories Explicitly
2424
- Rule 7: Centralize Version Management with Properties
2525

26+
27+
## Instructions for AI
28+
29+
Update the pom.xml based on the following rules about Maven best practices.
30+
31+
2632
## Rule 1: Effective Dependency Management
2733

2834
Title: Manage Dependencies Effectively using `dependencyManagement` and BOMs
@@ -582,3 +588,9 @@ Description: Define all dependency and plugin versions in the `<properties>` sec
582588
</project>
583589

584590
```
591+
592+
593+
## Output Requirements
594+
595+
- Update the file pom.xml if something is not correct
596+
- verify changes with the command: `mvn validate`

0 commit comments

Comments
 (0)