Skip to content

Commit fe04679

Browse files
4.x: Archive archetype test projects (helidon-io#10720)
* Archive archetype test projects Update archetype README.md Fix micronaut data tests configuration for pipelines * Fix merge pattern, use test-project as the artifactId for static test projects
1 parent 50c9053 commit fe04679

5 files changed

Lines changed: 42 additions & 38 deletions

File tree

.github/workflows/validate.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ jobs:
282282
with:
283283
build-cache: read-only
284284
native-image: ${{ matrix.packaging == 'native' }}
285-
test-artifact-name: tests-archetypes-${{ matrix.group }}-${{ matrix.packaging }}
285+
artifact-name: archetypes-${{ matrix.group }}-${{ matrix.packaging }}-projects
286+
artifact-path: |
287+
archetypes/**/target/tests/**
286288
run: |
287289
mvn ${MVN_ARGS} \
288290
-f archetypes/archetypes/pom.xml \
@@ -303,7 +305,9 @@ jobs:
303305
- uses: ./.github/actions/common
304306
with:
305307
build-cache: read-only
306-
test-artifact-name: tests-legacy-archetypes
308+
artifact-name: archetypes-legacy-projects
309+
artifact-path: |
310+
archetypes/**/target/tests/**
307311
run: |
308312
mvn ${MVN_ARGS} \
309313
-f archetypes/pom.xml \
@@ -366,9 +370,18 @@ jobs:
366370
-Pnative-image \
367371
-am \
368372
verify
373+
archetype-results:
374+
runs-on: ubuntu-22.04
375+
needs: [ archetypes, legacy-archetypes ]
376+
name: archetype/results
377+
steps:
378+
- uses: actions/upload-artifact/merge@v4
379+
with:
380+
name: archetype-projects
381+
pattern: "archetypes-*-projects"
369382
test-results:
370383
runs-on: ubuntu-22.04
371-
needs: [ _tests, archetypes, legacy-archetypes, _tck, packaging, _native-image ]
384+
needs: [ _tests, _tck, packaging, _native-image ]
372385
name: tests/results
373386
steps:
374387
- uses: actions/upload-artifact/merge@v4
@@ -377,7 +390,7 @@ jobs:
377390
pattern: "tests-*"
378391
gate:
379392
runs-on: ubuntu-22.04
380-
needs: [ copyright, checkstyle, shellcheck, docs, javadoc, _spotbugs, test-results ]
393+
needs: [ copyright, checkstyle, shellcheck, docs, javadoc, _spotbugs, archetype-results, test-results ]
381394
steps:
382395
- shell: bash
383396
run: |

archetypes/README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Archetypes Development
22

3-
Helidon provides a set of archetypes to bootstrap end user's application development journey. They are implemented here based on
4-
[Archetype V2 engine] (https://github.com/helidon-io/helidon-build-tools/wiki/Archetype-Engine-V2)
3+
Helidon provides a set of archetypes to bootstrap end user's application development journey.
4+
5+
See https://github.com/helidon-io/helidon-build-tools/wiki/Archetype-Engine-V2
56

67
## Build
78

@@ -11,24 +12,26 @@ From the root `archetypes` directory, just issue
1112
mvn clean install
1213
```
1314

14-
This will build all archetypes (including legacy) and run tests. To save time, during development cycle, you can skip test using
15+
This will build all archetypes (including legacy) and run tests.
1516

17+
To save time, during development cycle, you can skip test using:
1618
```bash
17-
mvn clean install -Darchetype.test.skip=true
19+
mvn clean install -DskipTests -e
1820
```
1921

20-
## Test
22+
The build output shows instructions on how to use the archetypes locally.
2123

22-
Archetypes build generates `cli-data` that you can provide to installed [Helidon CLI](../README.md#helidon-cli).
24+
## Smoke Tests
2325

24-
```bash
25-
helidon init --reset --url file:///<path-to>/helidon/archetypes/helidon/target/cli-data
26+
Generate the projects and validate the pom files.
27+
```shell
28+
mvn clean install -Darchetype.test.testGoal=clean -e
2629
```
2730

28-
Once the archetype is selected the other options have defaults (and allows user to make selections) and the project is generated in a directory named after the `artifactId` value.
29-
30-
```bash
31-
cd `artifactId`
31+
Download the previous archetype test projects and diff them:
32+
```shell
33+
.projects-diff.sh \
34+
--actual=./target/tests \
35+
--orig=$HOME/Download/archetype-tests \
36+
diff_projects
3237
```
33-
34-
Now, just follow instructions in the generated README file.

archetypes/archetypes/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2020, 2023 Oracle and/or its affiliates.
4+
Copyright (c) 2020, 2025 Oracle and/or its affiliates.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -85,6 +85,9 @@
8585
</patterns>
8686
</validation>
8787
</validations>
88+
<externalValues>
89+
<artifactId>test-project</artifactId>
90+
</externalValues>
8891
</configuration>
8992
</execution>
9093
</executions>

archetypes/legacy/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<configuration>
8989
<generateTests>false</generateTests>
9090
<externalValues>
91-
<artifactId>myproject</artifactId>
91+
<artifactId>test-project</artifactId>
9292
</externalValues>
9393
</configuration>
9494
</execution>

integrations/micronaut/data/pom.xml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,6 @@
206206
</execution>
207207
</executions>
208208
</plugin>
209-
<plugin>
210-
<groupId>org.apache.maven.plugins</groupId>
211-
<artifactId>maven-surefire-plugin</artifactId>
212-
<configuration>
213-
<skipTests>false</skipTests>
214-
</configuration>
215-
</plugin>
216209
</plugins>
217210
</build>
218211
</profile>
@@ -222,17 +215,9 @@
222215
<activation>
223216
<jdk>!21</jdk>
224217
</activation>
225-
<build>
226-
<plugins>
227-
<plugin>
228-
<groupId>org.apache.maven.plugins</groupId>
229-
<artifactId>maven-surefire-plugin</artifactId>
230-
<configuration>
231-
<skipTests>true</skipTests>
232-
</configuration>
233-
</plugin>
234-
</plugins>
235-
</build>
218+
<properties>
219+
<skipTests>true</skipTests>
220+
</properties>
236221
</profile>
237222
</profiles>
238223
</project>

0 commit comments

Comments
 (0)