You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/100-java-checklist-guide.mdc
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -5,19 +5,17 @@ alwaysApply: false
5
5
---
6
6
# Create a Checklist with all Java steps to use with cursor rules for Java
7
7
8
-
## System prompt characterization
8
+
## Role
9
9
10
-
Role definition: You are a Senior software engineer with extensive experience in Java programming language and technical documentation
10
+
You are a Senior software engineer with extensive experience in Java programming language and technical documentation
11
11
12
-
## Description
12
+
## Instructions for AI
13
13
14
14
Your task is to create a comprehensive step-by-step guide that follows the exact format and structure defined in the embedded template below.
15
15
16
-
## Instructions for AI
17
-
18
-
Create a markdown file named `JAVA-DEVELOPMENT-GUIDE.md` with the following exact structure: [java-checklist-template.md](mdc:.cursor/rules/templates/java-checklist-template.md)
16
+
Create a markdown file named `CURSOR-RULES-JAVA.md` with the following exact structure: [java-checklist-template.md](mdc:.cursor/rules/templates/java-checklist-template.md)
19
17
20
-
### Restrictions
18
+
## Restrictions
21
19
22
20
**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:
23
21
@@ -28,7 +26,6 @@ Create a markdown file named `JAVA-DEVELOPMENT-GUIDE.md` with the following exac
28
26
- **ONLY** use the exact wording and structure from the template
29
27
- If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it
30
28
31
-
32
29
## Output Requirements
33
30
34
31
- Generate the complete markdown file following the embedded template exactly
Copy file name to clipboardExpand all lines: .cursor/rules/110-java-maven-best-practices.mdc
+52-32Lines changed: 52 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,27 @@ alwaysApply: false
5
5
---
6
6
# Maven Best Practices
7
7
8
-
## System prompt characterization
8
+
## Role
9
9
10
-
Role definition: You are a Senior software engineer with extensive experience in Java software development
10
+
You are a Senior software engineer with extensive experience in Java software development
11
11
12
-
## Description
12
+
## Instructions for AI
13
13
14
-
Effective Maven usage involves robust dependency management via `<dependencyManagement>` and BOMs, adherence to the standard directory layout, and centralized plugin management. Build profiles should be used for environment-specific configurations. POMs must be kept readable and maintainable with logical structure and properties for versions. Custom repositories should be declared explicitly and their use minimized, preferably managed via a central repository manager.
14
+
Update the pom.xml based on the following rules about Maven best practices.
15
15
16
-
## Table of contents
16
+
## Examples
17
17
18
-
- Rule 1: Effective Dependency Management
19
-
- Rule 2: Standard Directory Layout
20
-
- Rule 3: Plugin Management and Configuration
21
-
- Rule 4: Use Build Profiles for Environment-Specific Configurations
22
-
- Rule 5: Keep POMs Readable and Maintainable
23
-
- Rule 6: Manage Repositories Explicitly
24
-
- Rule 7: Centralize Version Management with Properties
18
+
### Table of contents
25
19
26
-
## Rule 1: Effective Dependency Management
20
+
- Example 1: Effective Dependency Management
21
+
- Example 2: Standard Directory Layout
22
+
- Example 3: Plugin Management and Configuration
23
+
- Example 4: Use Build Profiles for Environment-Specific Configurations
24
+
- Example 5: Keep POMs Readable and Maintainable
25
+
- Example 6: Manage Repositories Explicitly
26
+
- Example 7: Centralize Version Management with Properties
27
+
28
+
### Example 1: Effective Dependency Management
27
29
28
30
Title: Manage Dependencies Effectively using `dependencyManagement` and BOMs
29
31
Description: Use the `<dependencyManagement>` section in parent POMs or import Bill of Materials (BOMs) to centralize and control dependency versions. This helps avoid version conflicts and ensures consistency across multi-module projects. Avoid hardcoding versions directly in `<dependencies>` when managed elsewhere.
@@ -92,9 +94,10 @@ Description: Use the `<dependencyManagement>` section in parent POMs or import B
92
94
</dependency>
93
95
</dependencies>
94
96
</project>
97
+
95
98
```
96
99
97
-
**Bad Example:**
100
+
**Bad example:**
98
101
99
102
```xml
100
103
<!-- Child POM hardcoding versions -->
@@ -118,16 +121,17 @@ Description: Use the `<dependencyManagement>` section in parent POMs or import B
118
121
</dependency>
119
122
</dependencies>
120
123
</project>
124
+
121
125
```
122
126
123
-
## Rule 2: Standard Directory Layout
127
+
### Example 2: Standard Directory Layout
124
128
125
129
Title: Adhere to the Standard Directory Layout
126
130
Description: Follow Maven's convention for directory structure (`src/main/java`, `src/main/resources`, `src/test/java`, `src/test/resources`, etc.). This makes projects easier to understand and build, as Maven relies on these defaults.
127
131
128
132
**Good example:**
129
133
130
-
```
134
+
```text
131
135
my-app/
132
136
├── pom.xml
133
137
└── src/
@@ -141,11 +145,12 @@ my-app/
141
145
│ └── com/example/myapp/AppTest.java
142
146
└── resources/
143
147
└── test-data.xml
148
+
144
149
```
145
150
146
-
**Bad Example:**
151
+
**Bad example:**
147
152
148
-
```
153
+
```text
149
154
my-app/
150
155
├── pom.xml
151
156
├── sources/ <!-- Non-standard -->
@@ -155,9 +160,10 @@ my-app/
155
160
└── tests/ <!-- Non-standard -->
156
161
└── com/example/myapp/AppTest.java
157
162
<!-- This would require explicit configuration in pom.xml to specify source/resource directories -->
163
+
158
164
```
159
165
160
-
## Rule 3: Plugin Management and Configuration
166
+
### Example 3: Plugin Management and Configuration
161
167
162
168
Title: Manage Plugin Versions and Configurations Centrally
163
169
Description: Use `<pluginManagement>` in a parent POM to define plugin versions and common configurations. Child POMs can then use the plugins without specifying versions, ensuring consistency. Override configurations in child POMs only when necessary.
@@ -198,9 +204,10 @@ Description: Use `<pluginManagement>` in a parent POM to define plugin versions
198
204
</plugins>
199
205
</build>
200
206
</project>
207
+
201
208
```
202
209
203
-
**Bad Example:**
210
+
**Bad example:**
204
211
205
212
```xml
206
213
<!-- Child POM -->
@@ -220,9 +227,10 @@ Description: Use `<pluginManagement>` in a parent POM to define plugin versions
220
227
</plugins>
221
228
</build>
222
229
</project>
230
+
223
231
```
224
232
225
-
## Rule 4: Use Build Profiles for Environment-Specific Configurations
233
+
### Example 4: Use Build Profiles for Environment-Specific Configurations
226
234
227
235
Title: Employ Build Profiles for Environment-Specific Settings
228
236
Description: Use Maven profiles to customize build settings for different environments (e.g., dev, test, prod) or other conditional scenarios. This can include different dependencies, plugin configurations, or properties. Activate profiles via command line, OS, JDK, or file presence.
@@ -272,9 +280,10 @@ Description: Use Maven profiles to customize build settings for different enviro
272
280
</profiles>
273
281
</project>
274
282
<!-- Activation: mvn clean install -P prod -->
283
+
275
284
```
276
285
277
-
**Bad Example:**
286
+
**Bad example:**
278
287
279
288
```xml
280
289
<!-- Commented out sections for different environments -->
@@ -285,9 +294,10 @@ Description: Use Maven profiles to customize build settings for different enviro
285
294
<database.url>jdbc:postgresql://prodserver/mydb</database.url> <!-- Manually switch by commenting/uncommenting -->
286
295
</properties>
287
296
</project>
297
+
288
298
```
289
299
290
-
## Rule 5: Keep POMs Readable and Maintainable
300
+
### Example 5: Keep POMs Readable and Maintainable
291
301
292
302
Title: Structure POMs Logically for Readability
293
303
Description: Organize your `pom.xml` sections in a consistent order (e.g., project coordinates, parent, properties, dependencyManagement, dependencies, build, profiles, repositories). Use properties for recurring versions or values. Add comments for complex configurations.
@@ -344,9 +354,10 @@ Description: Organize your `pom.xml` sections in a consistent order (e.g., proje
344
354
<!-- Repositories and Plugin Repositories (if needed) -->
345
355
<!-- ... -->
346
356
</project>
357
+
347
358
```
348
359
349
-
**Bad Example:**
360
+
**Bad example:**
350
361
351
362
```xml
352
363
<!-- Haphazard order, missing properties for versions -->
@@ -369,9 +380,10 @@ Description: Organize your `pom.xml` sections in a consistent order (e.g., proje
369
380
<artifactId>my-app</artifactId>
370
381
<version>1.0.0-SNAPSHOT</version>
371
382
</project>
383
+
372
384
```
373
385
374
-
## Rule 6: Manage Repositories Explicitly
386
+
### Example 6: Manage Repositories Explicitly
375
387
376
388
Title: Declare Custom Repositories Explicitly and Minimize Their Use
377
389
Description: Prefer dependencies from Maven Central. If custom repositories are necessary, declare them in the `<repositories>` section and `<pluginRepositories>` for plugins. It's often better to manage these in a company-wide Nexus/Artifactory instance configured in `settings.xml` rather than per-project POMs. Avoid relying on transitive repositories.
@@ -395,9 +407,10 @@ Description: Prefer dependencies from Maven Central. If custom repositories are
395
407
</pluginRepositories>
396
408
</project>
397
409
<!-- Better: Configure these in settings.xml and use a repository manager -->
410
+
398
411
```
399
412
400
-
**Bad Example:**
413
+
**Bad example:**
401
414
402
415
```xml
403
416
<!-- No explicit repository for a non-central artifact, relying on developer's local settings or transitive ones -->
@@ -414,9 +427,10 @@ Description: Prefer dependencies from Maven Central. If custom repositories are
414
427
</dependency>
415
428
</dependencies>
416
429
</project>
430
+
417
431
```
418
432
419
-
## Rule 7: Centralize Version Management with Properties
433
+
### Example 7: Centralize Version Management with Properties
420
434
421
435
Title: Use Properties to Manage Dependency and Plugin Versions
422
436
Description: Define all dependency and plugin versions in the `<properties>` section rather than hardcoding them throughout the POM. This centralizes version management, makes updates easier, reduces duplication, and helps maintain consistency across related dependencies. Use consistent property naming conventions: `maven-plugin-[name].version` for Maven plugins, simple names like `[library].version` for dependencies, and descriptive names for quality thresholds like `coverage.level`.
@@ -436,22 +450,22 @@ Description: Define all dependency and plugin versions in the `<properties>` sec
Copy file name to clipboardExpand all lines: .cursor/rules/112-java-maven-documentation.mdc
+14-39Lines changed: 14 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -5,52 +5,27 @@ alwaysApply: false
5
5
---
6
6
# Create README-DEV.md with information about how to use the Maven project
7
7
8
-
## System prompt characterization
8
+
## Role
9
9
10
-
Role definition: You are a Senior software engineer with extensive experience in Java software development
10
+
You are a Senior software engineer with extensive experience in Java software development
11
11
12
-
## Description
12
+
## Instructions for AI
13
13
14
14
When creating a README-DEV.md file for a Maven project, include ONLY the following sections with the specified Maven goals. Do NOT add any additional sections, explanations, or content beyond what is explicitly listed below.
15
15
16
-
## STRICT Structure for README-DEV.md (Template):
16
+
Create a markdown file named `README-DEV.md` with the following exact structure: [java-maven-documentation-template.md](mdc:.cursor/rules/templates/java-maven-documentation-template.md)
17
17
18
-
**IMPORTANT: Include ONLY the content specified below.**
18
+
## Restrictions
19
19
20
-
---
21
-
22
-
# Essential Maven Goals:
23
-
24
-
```bash
25
-
# Analyze dependencies
26
-
./mvnw dependency:tree
27
-
./mvnw dependency:analyze
28
-
./mvnw dependency:resolve
29
-
30
-
./mvnw clean validate -U
31
-
./mvnw buildplan:list-plugin
32
-
./mvnw buildplan:list-phase
33
-
./mvnw help:all-profiles
34
-
./mvnw help:active-profiles
35
-
./mvnw license:third-party-report
36
-
37
-
# Clean the project
38
-
./mvnw clean
39
-
40
-
# Clean and package in one command
41
-
./mvnw clean package
42
-
43
-
# Run integration tests
44
-
./mvnw verify
20
+
**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:
45
21
46
-
# Check for dependency updates
47
-
./mvnw versions:display-property-updates
48
-
./mvnw versions:display-dependency-updates
49
-
./mvnw versions:display-plugin-updates
22
+
- **DO NOT** create additional steps beyond what's shown in the template
23
+
- **DO NOT** expand or elaborate on sections beyond what the template shows
24
+
- **ONLY** use the exact wording and structure from the template
25
+
- If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it
50
26
51
-
# Generate project reports
52
-
./mvnw site
53
-
jwebserver -p 8005 -d "$(pwd)/target/site/"
54
-
```
27
+
## Output Requirements
55
28
56
-
**END OF TEMPLATE - DO NOT ADD ANYTHING BEYOND THIS POINT**
29
+
- Generate the complete markdown file following the embedded template exactly
30
+
- Use proper markdown formatting with headers, code blocks, tables, and checklists
31
+
- **VERIFY**: Final output contains ONLY what appears in the embedded template
0 commit comments