Skip to content

Commit

Permalink
Condition the new config doc sections of the extension template
Browse files Browse the repository at this point in the history
When creating projects or extensions, the codestarts from the tooling
version are always used even for older versions so we need to be
careful about it.

Fixes #42649

(cherry picked from commit d6123f2)
  • Loading branch information
gsmet committed Aug 20, 2024
1 parent 39319e7 commit 78efeb5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
</execution>
</executions>
</plugin>
{#if quarkus.version.or(quarkus.bom.version).compareVersionTo("3.14") >= 0}
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-config-doc-maven-plugin</artifactId>
Expand All @@ -63,6 +64,7 @@
<targetDirectory>$\{project.basedir}/modules/ROOT/pages/includes/</targetDirectory>
</configuration>
</plugin>
{/if}
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
Expand All @@ -75,6 +77,13 @@
<configuration>
<outputDirectory>$\{project.basedir}/modules/ROOT/pages/includes/</outputDirectory>
<resources>
{#if quarkus.version.or(quarkus.bom.version).compareVersionTo("3.14") < 0}
<resource>
<directory>$\{project.basedir}/../target/asciidoc/generated/config/</directory>
<include>{namespace.id}{extension.id}.adoc</include>
<filtering>false</filtering>
</resource>
{/if}
<resource>
<directory>$\{project.basedir}/templates/includes</directory>
<include>attributes.adoc</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<developerConnection>scm:git:[email protected]:quarkiverse/quarkus-{extension.id}.git</developerConnection>
<url>https://github.com/quarkiverse/quarkus-{extension.id}</url>
</scm>
{#if quarkus.version.or(quarkus.bom.version).compareVersionTo("3.14") >= 0}
<build>
<pluginManagement>
<plugins>
Expand All @@ -19,6 +20,7 @@
</plugins>
</pluginManagement>
</build>
{/if}
<profiles>
<profile>
<id>it</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void testCreateQuarkiverseExtension(TestInfo testInfo) throws Throwable {
Properties properties = new Properties();
properties.put("groupId", "io.quarkiverse.my-quarkiverse-ext");
properties.put("extensionId", "my-quarkiverse-ext");
properties.put("quarkusVersion", "2.10.5.Final");
properties.put("quarkusVersion", "3.14.0");
properties.put("extensionName", "My Quarkiverse extension");
properties.put("extensionDescription", "My Quarkiverse extension description");
properties.put("withCodestart", "true");
Expand Down Expand Up @@ -136,7 +136,7 @@ public void testCreateStandaloneExtension(TestInfo testInfo) throws Throwable {
properties.put("groupId", "io.standalone");
properties.put("extensionId", "my-own-ext");
properties.put("namespaceId", "my-org-");
properties.put("quarkusVersion", "2.10.5.Final");
properties.put("quarkusVersion", "3.14.0");
InvocationResult result = setup(properties);

assertThat(result.getExitCode()).isZero();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.version>2.10.5.Final</quarkus.version>
<quarkus.version>3.14.0</quarkus.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.version>2.10.5.Final</quarkus.version>
<quarkus.version>3.14.0</quarkus.version>
<surefire-plugin.version>3.3.1</surefire-plugin.version>
</properties>

Expand Down

0 comments on commit 78efeb5

Please sign in to comment.