Skip to content

Commit 78e5d8b

Browse files
committed
Small refactoring
1 parent 3f65cc6 commit 78e5d8b

39 files changed

Lines changed: 54 additions & 1362 deletions

.github/workflows/maven.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
distribution: 'graalvm' # See 'Supported distributions' for available options
1616
java-version: '24'
1717
- name: Generate Cursor Rules
18-
run: cd spml && ./mvnw --batch-mode --no-transfer-progress verify --file pom.xml
18+
run: cd pml && ./mvnw --batch-mode --no-transfer-progress verify --file pom.xml
1919
- name: Maven build
2020
run: cd examples/maven-demo && ./mvnw --batch-mode --no-transfer-progress verify --file pom.xml
2121
- name: Spring Boot build
@@ -31,4 +31,4 @@ jobs:
3131
- name: Spring Boot JMeter build
3232
run: cd examples/spring-boot-jmeter-demo && ./mvnw --batch-mode --no-transfer-progress package --file pom.xml
3333
- name: Quarkus build
34-
run: cd examples/quarkus-demo && ./mvnw --batch-mode --no-transfer-progress package --file pom.xml
34+
run: cd examples/quarkus-demo && ./mvnw --batch-mode --no-transfer-progress package --file pom.xml
File renamed without changes.
File renamed without changes.
File renamed without changes.

spml/pom.xml renamed to pml/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55

6-
<groupId>info.jab.xml</groupId>
7-
<artifactId>cursor-rule-generator</artifactId>
6+
<groupId>info.jab.pml</groupId>
7+
<artifactId>cursor-rules-generator</artifactId>
88
<version>0.1.0</version>
99

1010
<properties>
11-
<java.version>21</java.version>
11+
<java.version>24</java.version>
1212
<maven.version>3.9.10</maven.version>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1414
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

spml/src/main/java/info/jab/xml/CursorRuleGenerator.java renamed to pml/src/main/java/info/jab/pml/CursorRuleGenerator.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package info.jab.xml;
1+
package info.jab.pml;
22

33
import java.io.InputStream;
44
import java.io.StringWriter;
@@ -25,8 +25,7 @@
2525
*/
2626
public final class CursorRuleGenerator {
2727

28-
private static final String XSD_FILE_NAME_V1_1 = "spml-1.1.xsd";
29-
private static final String XSD_FILE_NAME_V1_0 = "spml.xsd";
28+
private static final String XSD_FILE_NAME_V1_1 = "pml-1.1.xsd";
3029

3130
// ===============================================================
3231
// PUBLIC API - Entry point for cursor rule generation
@@ -169,20 +168,12 @@ private Optional<Schema> loadXsdSchema(String schemaFileName) {
169168
}
170169

171170
/**
172-
* Loads XSD schema from classpath for validation with fallback.
171+
* Loads XSD schema from classpath for validation.
173172
* Returns Optional to handle missing schema gracefully.
174-
* Tries v1.0 schema first, then v1.1 schema as fallback.
173+
* Uses v1.1 schema (direct sections).
175174
*/
176175
private Optional<Schema> loadXsdSchemaWithFallback() {
177-
// Try v1.0 schema first (with content-sections wrapper)
178-
Optional<Schema> schema = loadXsdSchema(XSD_FILE_NAME_V1_0);
179-
180-
// If v1.0 not found, try v1.1 schema (direct sections)
181-
if (schema.isEmpty()) {
182-
schema = loadXsdSchema(XSD_FILE_NAME_V1_1);
183-
}
184-
185-
return schema;
176+
return loadXsdSchema(XSD_FILE_NAME_V1_1);
186177
}
187178

188179
/**

spml/src/main/resources/100-java-checklist-guide.xml renamed to pml/src/main/resources/100-java-checklist-guide.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<prompt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="spml-1.1.xsd"
3+
xsi:noNamespaceSchemaLocation="pml-1.1.xsd"
44
id="100-java-checklist-guide" version="1.0">
55

66
<metadata>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<prompt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="spml-1.1.xsd"
3+
xsi:noNamespaceSchemaLocation="pml-1.1.xsd"
44
id="110-java-maven-best-practices" version="1.0">
55

66
<metadata>

0 commit comments

Comments
 (0)