forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#26806 from ia3andy/with-codestart
- Loading branch information
Showing
19 changed files
with
226 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ts/src/main/resources/codestarts/quarkus-extension/code/extension-codestart/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: extension-codestart | ||
type: code |
44 changes: 44 additions & 0 deletions
44
...on-tests/src/test/java/{package-name.dir}/it/{class-name-base}CodestartTest.tpl.qute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{#if input.extra-codestarts.contains("integration-tests")} | ||
package {package-name}.it; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartCatalog.Language; | ||
import io.quarkus.devtools.testing.codestarts.QuarkusCodestartTest; | ||
|
||
public class {class-name-base}CodestartTest { | ||
|
||
@RegisterExtension | ||
public static QuarkusCodestartTest codestartTest = QuarkusCodestartTest.builder() | ||
.languages(Language.JAVA) | ||
.setupStandaloneExtensionTest("{group-id}:{namespace.id}{extension.id}") | ||
.build(); | ||
|
||
/** | ||
* Make sure the generated code meets the expectations. | ||
* <br> | ||
* The generated code uses mocked data to be immutable and allow snapshot testing. | ||
* <br><br> | ||
* | ||
* Read the doc: <br> | ||
* {@link https://quarkus.io/guides/extension-codestart#integration-test} | ||
*/ | ||
@Test | ||
void testContent() throws Throwable { | ||
//codestartTest.checkGeneratedSource("org.acme.SomeClass"); | ||
//codestartTest.assertThatGeneratedFileMatchSnapshot(Language.JAVA, "\"src/main/resources/some-resource.ext"); | ||
} | ||
|
||
/** | ||
* This test runs the build (with tests) on generated projects for all selected languages | ||
*/ | ||
@Test | ||
void buildAllProjects() throws Throwable { | ||
codestartTest.buildAllProjects(); | ||
} | ||
} | ||
|
||
{#else} | ||
<SKIP> | ||
{/if} |
29 changes: 29 additions & 0 deletions
29
...urces/codestarts/quarkus-extension/code/extension-codestart/java/runtime/pom.tpl.qute.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>generate-codestart-jar</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
<configuration> | ||
<classesDirectory>$\{project.basedir}/src/main</classesDirectory> | ||
<includes> | ||
<include>codestarts/**</include> | ||
</includes> | ||
<classifier>codestarts</classifier> | ||
<skipIfEmpty>true</skipIfEmpty> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
1 change: 1 addition & 0 deletions
1
...me/src/main/codestarts/quarkus/{extension.id}-codestart/base/README.tpl.qute.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{#include readme-header /} |
1 change: 1 addition & 0 deletions
1
...{extension.id}-codestart/base/src/main/resources/META-INF/resources/index.entry.qute.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{#include index-entry /} |
13 changes: 13 additions & 0 deletions
13
.../java/runtime/src/main/codestarts/quarkus/{extension.id}-codestart/codestart.tpl.qute.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: {extension.id}-codestart | ||
ref: {extension.id} | ||
type: code | ||
tags: extension-codestart | ||
metadata: | ||
title: {extension.name} | ||
description: {#if extension.description}{extension.description}{#else}Start coding with {extension.name}{/if} | ||
# path: /some-path | ||
{#if input.extra-codestarts.contains("quarkiverse")} | ||
related-guide-section: https://quarkiverse.github.io/quarkiverse-docs/quarkus-quinoa/dev/index.html | ||
{#else} | ||
# related-guide-section: TBD | ||
{/if} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.