commit 0b45f1e27c53546616f7f6e8588a99ed847328a5 Author: ZhouXY108 Date: Fri Dec 13 17:11:54 2024 +0800 first commit. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88cc440 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +target/ + +### VS Code ### +.vscode/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..67db3d6 --- /dev/null +++ b/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + xyz.zhouxy + plusone-archetype + 1.0 + maven-archetype + + plusone-archetype + + + + + org.apache.maven.archetype + archetype-packaging + 3.3.1 + + + + + + + maven-archetype-plugin + 3.3.1 + + + + + + http://www.zhouxy.xyz + diff --git a/src/main/resources/META-INF/maven/archetype-metadata.xml b/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..453ac1a --- /dev/null +++ b/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,31 @@ + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.properties + + + + src/test/java + + **/*.java + + + + src/test + + **/*.properties + + + + diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..e79f6b8 --- /dev/null +++ b/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + + demo + + http://www.zhouxy.xyz + + + UTF-8 + 1.8 + 1.8 + + + + + org.junit.jupiter + junit-jupiter-api + 5.9.2 + test + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/src/main/resources/archetype-resources/src/main/java/App.java b/src/main/resources/archetype-resources/src/main/java/App.java new file mode 100644 index 0000000..8db2470 --- /dev/null +++ b/src/main/resources/archetype-resources/src/main/java/App.java @@ -0,0 +1,14 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +package ${package}; + +/** + * Hello world! + * + */ +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} diff --git a/src/main/resources/archetype-resources/src/main/resources/config.properties b/src/main/resources/archetype-resources/src/main/resources/config.properties new file mode 100644 index 0000000..712a6a3 --- /dev/null +++ b/src/main/resources/archetype-resources/src/main/resources/config.properties @@ -0,0 +1,3 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) diff --git a/src/main/resources/archetype-resources/src/test/java/AppTest.java b/src/main/resources/archetype-resources/src/test/java/AppTest.java new file mode 100644 index 0000000..91395a6 --- /dev/null +++ b/src/main/resources/archetype-resources/src/test/java/AppTest.java @@ -0,0 +1,21 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +package ${package}; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +/** + * Unit test for simple App. + */ +public class AppTest { + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() { + assertTrue(true); + } +} diff --git a/src/main/resources/archetype-resources/src/test/resources/config.properties b/src/main/resources/archetype-resources/src/test/resources/config.properties new file mode 100644 index 0000000..712a6a3 --- /dev/null +++ b/src/main/resources/archetype-resources/src/test/resources/config.properties @@ -0,0 +1,3 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) diff --git a/src/test/resources/projects/basic/archetype.properties b/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000..71c8e91 --- /dev/null +++ b/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,5 @@ +#Fri Dec 13 16:28:43 CST 2024 +package=it.pkg +version=0.1-SNAPSHOT +groupId=archetype.it +artifactId=basic diff --git a/src/test/resources/projects/basic/goal.txt b/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000..e69de29