Skip to content

Commit d848092

Browse files
committed
2 parents 4a62014 + c1894f6 commit d848092

File tree

1 file changed

+4
-72
lines changed

1 file changed

+4
-72
lines changed

README.md

Lines changed: 4 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,12 @@
1-
# tinystruct Maven archetype
1+
# tinystruct maven archetype
22

33
This archetype creates a minimal tinystruct application.
4-
5-
## Usage (after installing the archetype locally)
6-
7-
1. Install the archetype into your local Maven repository:
8-
4+
## Quick usage
95
```cmd
10-
# Windows (cmd.exe)
11-
mvnw.cmd clean install
12-
# Unix / macOS
13-
./mvnw clean install
6+
mvn archetype:generate -DarchetypeGroupId=org.tinystruct -DarchetypeArtifactId=tinystruct-archetype -DarchetypeVersion=1.0.0 -DgroupId=com.mycompany -DartifactId=my-tiny-app -Dpackage=com.mycompany.app -DtinystructVersion=1.7.11 -DinteractiveMode=false
147
```
158

16-
2. Generate a new project from the archetype (example):
17-
18-
```cmd
19-
# Windows (cmd.exe)
20-
mvnw.cmd archetype:generate ^
21-
-DarchetypeCatalog=local ^
22-
-DarchetypeGroupId=org.tinystruct ^
23-
-DarchetypeArtifactId=tinystruct-archetype ^
24-
-DarchetypeVersion=1.0.0 ^
25-
-DgroupId=com.mycompany ^
26-
-DartifactId=my-tiny-app ^
27-
-Dpackage=com.mycompany.app ^
28-
-Dtinystruct.version=1.7.11
29-
30-
# Unix / macOS
31-
./mvnw archetype:generate \
32-
-DarchetypeCatalog=local \
33-
-DarchetypeGroupId=org.tinystruct \
34-
-DarchetypeArtifactId=tinystruct-archetype \
35-
-DarchetypeVersion=1.0.0 \
36-
-DgroupId=com.mycompany \
37-
-DartifactId=my-tiny-app \
38-
-Dpackage=com.mycompany.app \
39-
-Dtinystruct.version=1.7.11
40-
```
41-
42-
3. Build the generated project:
43-
44-
```cmd
45-
cd my-tiny-app
46-
# Windows (cmd.exe)
47-
mvnw.cmd clean package
48-
# Unix / macOS
49-
./mvnw clean package
50-
```
51-
52-
Adjust `tinystructVersion` if needed. The generated project includes a simple `Application` that extends `AbstractApplication` with a sample `hello` action.
53-
54-
## Notes
55-
56-
- **Java version:** this archetype targets Java 17 by default (see `archetype-resources/pom.xml`). Ensure you have JDK 17+ installed.
57-
- **CI:** a sample GitHub Actions workflow is included to build and test the generated projects on push/PR (`.github/workflows/maven.yml`).
58-
- **Maven Wrapper:** consider adding the Maven Wrapper (`mvnw`) to this repository so contributors can build without installing Maven globally.
59-
60-
## Quick tips
61-
62-
- To run tests in a generated project use the wrapper:
63-
64-
```cmd
65-
# Windows (cmd.exe)
66-
mvnw.cmd test
67-
# Unix / macOS
68-
./mvnw test
69-
```
70-
71-
- If you plan to publish the archetype, set `tinystructVersion` to a released version and test generation in a clean directory.
72-
tinystruct Maven archetype
73-
# tinystruct Maven archetype
74-
75-
This archetype creates a minimal tinystruct application.
76-
77-
## Usage (after installing the archetype locally)
9+
## Usage with installing the archetype locally
7810

7911
1. Install the archetype into your local Maven repository:
8012

0 commit comments

Comments
 (0)