Skip to content

Commit 65a7860

Browse files
aloubyanskygsmet
authored andcommitted
* Move platform version-specific tooling codestarts from the base to the project core codestarts.
* Bundle Gradle wrapper 8.14 in the base codestarts for backward compatibility when generating projects for version prior 3.26. (cherry picked from commit 8defe1c)
1 parent d186091 commit 65a7860

File tree

32 files changed

+1860
-187
lines changed

32 files changed

+1860
-187
lines changed

devtools/project-core-extension-codestarts/pom.xml

Lines changed: 158 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@
1717
<gradle-wrapper.path>${project.basedir}/../gradle</gradle-wrapper.path>
1818
<gradle.executable>gradlew</gradle.executable>
1919
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.jboss.logmanager</groupId>
24+
<artifactId>log4j-jboss-logmanager</artifactId>
25+
<scope>test</scope>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.junit.jupiter</groupId>
29+
<artifactId>junit-jupiter</artifactId>
30+
<scope>test</scope>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.assertj</groupId>
34+
<artifactId>assertj-core</artifactId>
35+
<scope>test</scope>
36+
</dependency>
37+
</dependencies>
38+
2039
<build>
2140
<resources>
2241
<resource>
@@ -30,47 +49,21 @@
3049
<pluginManagement>
3150
<plugins>
3251
<plugin>
33-
<groupId>org.apache.maven.plugins</groupId>
34-
<artifactId>maven-jar-plugin</artifactId>
52+
<artifactId>maven-resources-plugin</artifactId>
3553
<configuration>
36-
<excludes>
37-
<exclude>gradle-wrapper/.gradle/**</exclude>
38-
</excludes>
54+
<propertiesEncoding>UTF-8</propertiesEncoding>
3955
</configuration>
4056
</plugin>
4157
</plugins>
4258
</pluginManagement>
4359
<plugins>
4460
<plugin>
45-
<groupId>org.codehaus.mojo</groupId>
46-
<artifactId>exec-maven-plugin</artifactId>
47-
<executions>
48-
<execution>
49-
<id>generate-gradle-wrapper</id>
50-
<phase>prepare-package</phase>
51-
<configuration>
52-
<executable>${gradle-wrapper.path}/${gradle.executable}</executable>
53-
<environmentVariables>
54-
<!-- Force a higher value than the default 64m, used by
55-
gradlew script, to make sure the no-daemon option is honoured
56-
-->
57-
<JAVA_OPTS>-Xmx512m</JAVA_OPTS>
58-
</environmentVariables>
59-
<arguments>
60-
<argument>init</argument>
61-
<argument>--type</argument>
62-
<argument>basic</argument>
63-
<argument>--no-daemon</argument>
64-
<argument>--overwrite</argument>
65-
</arguments>
66-
<workingDirectory>target/classes/gradle-wrapper</workingDirectory>
67-
<addOutputToClasspath>true</addOutputToClasspath>
68-
</configuration>
69-
<goals>
70-
<goal>exec</goal>
71-
</goals>
72-
</execution>
73-
</executions>
61+
<artifactId>maven-surefire-plugin</artifactId>
62+
<configuration>
63+
<systemPropertyVariables>
64+
<gradle-wrapper.version>${gradle-wrapper.version}</gradle-wrapper.version>
65+
</systemPropertyVariables>
66+
</configuration>
7467
</plugin>
7568
</plugins>
7669
</build>
@@ -87,5 +80,136 @@
8780
<gradle.executable>gradlew.bat</gradle.executable>
8881
</properties>
8982
</profile>
83+
<profile>
84+
<id>install-gradle-wrapper</id>
85+
<activation>
86+
<property>
87+
<name>installGradleWrapper</name>
88+
</property>
89+
</activation>
90+
<build>
91+
<plugins>
92+
<plugin>
93+
<groupId>org.codehaus.mojo</groupId>
94+
<artifactId>exec-maven-plugin</artifactId>
95+
<executions>
96+
<execution>
97+
<id>init-gradle-project</id>
98+
<phase>generate-sources</phase>
99+
<configuration>
100+
<executable>${gradle-wrapper.path}/${gradle.executable}</executable>
101+
<environmentVariables>
102+
<!-- Force a higher value than the default 64m, used by
103+
gradlew script, to make sure the no-daemon option is honoured
104+
-->
105+
<JAVA_OPTS>-Xmx512m</JAVA_OPTS>
106+
</environmentVariables>
107+
<arguments>
108+
<argument>init</argument>
109+
<argument>--type</argument>
110+
<argument>basic</argument>
111+
<argument>--no-daemon</argument>
112+
<argument>--overwrite</argument>
113+
</arguments>
114+
<workingDirectory>${project.build.directory}/gradle-wrapper</workingDirectory>
115+
<addOutputToClasspath>true</addOutputToClasspath>
116+
</configuration>
117+
<goals>
118+
<goal>exec</goal>
119+
</goals>
120+
</execution>
121+
<execution>
122+
<id>install-gradle-wrapper</id>
123+
<phase>generate-sources</phase>
124+
<configuration>
125+
<executable>${gradle-wrapper.path}/${gradle.executable}</executable>
126+
<environmentVariables>
127+
<!-- Force a higher value than the default 64m, used by
128+
gradlew script, to make sure the no-daemon option is honoured
129+
-->
130+
<JAVA_OPTS>-Xmx512m</JAVA_OPTS>
131+
</environmentVariables>
132+
<arguments>
133+
<argument>wrapper</argument>
134+
<argument>--gradle-version</argument>
135+
<argument>${gradle-wrapper.version}</argument>
136+
<argument>--no-daemon</argument>
137+
</arguments>
138+
<workingDirectory>${project.build.directory}/gradle-wrapper</workingDirectory>
139+
<addOutputToClasspath>true</addOutputToClasspath>
140+
</configuration>
141+
<goals>
142+
<goal>exec</goal>
143+
</goals>
144+
</execution>
145+
</executions>
146+
</plugin>
147+
<plugin>
148+
<artifactId>maven-resources-plugin</artifactId>
149+
<executions>
150+
<execution>
151+
<id>copy-gradle-wrapper</id>
152+
<phase>generate-sources</phase>
153+
<goals>
154+
<goal>copy-resources</goal>
155+
</goals>
156+
<configuration>
157+
<outputDirectory>${project.build.outputDirectory}/codestarts/quarkus/tooling/gradle-wrapper/base/</outputDirectory>
158+
<resources>
159+
<resource>
160+
<directory>${project.build.directory}/gradle-wrapper/</directory>
161+
<includes>
162+
<include>gradle/wrapper/**</include>
163+
<include>gradlew</include>
164+
<include>gradlew.bat</include>
165+
</includes>
166+
<filtering>false</filtering>
167+
</resource>
168+
</resources>
169+
</configuration>
170+
</execution>
171+
</executions>
172+
</plugin>
173+
</plugins>
174+
</build>
175+
</profile>
176+
<profile>
177+
<id>copy-gradle-wrapper</id>
178+
<activation>
179+
<property>
180+
<name>!installGradleWrapper</name>
181+
</property>
182+
</activation>
183+
<build>
184+
<plugins>
185+
<plugin>
186+
<artifactId>maven-resources-plugin</artifactId>
187+
<executions>
188+
<execution>
189+
<id>copy-gradle-wrapper</id>
190+
<phase>generate-sources</phase>
191+
<goals>
192+
<goal>copy-resources</goal>
193+
</goals>
194+
<configuration>
195+
<outputDirectory>${project.build.outputDirectory}/codestarts/quarkus/tooling/gradle-wrapper/base/</outputDirectory>
196+
<resources>
197+
<resource>
198+
<directory>${gradle-wrapper.path}</directory>
199+
<includes>
200+
<include>gradle/wrapper/**</include>
201+
<include>gradlew</include>
202+
<include>gradlew.bat</include>
203+
</includes>
204+
<filtering>false</filtering>
205+
</resource>
206+
</resources>
207+
</configuration>
208+
</execution>
209+
</executions>
210+
</plugin>
211+
</plugins>
212+
</build>
213+
</profile>
90214
</profiles>
91215
</project>
File renamed without changes.
File renamed without changes.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see https://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
25+
# Eclipse
26+
.project
27+
.classpath
28+
.settings/
29+
bin/
30+
31+
# IntelliJ
32+
.idea
33+
*.ipr
34+
*.iml
35+
*.iws
36+
37+
# NetBeans
38+
nb-configuration.xml
39+
40+
# Visual Studio Code
41+
.vscode
42+
.factorypath
43+
44+
# OSX
45+
.DS_Store
46+
47+
# Vim
48+
*.swp
49+
*.swo
50+
51+
# patch
52+
*.orig
53+
*.rej
54+
55+
# Gradle
56+
.gradle/
57+
build/
58+
59+
# Maven
60+
target/
61+
pom.xml.tag
62+
pom.xml.releaseBackup
63+
pom.xml.versionsBackup
64+
release.properties
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# {extension.full-name}
2+
3+
This is a Quarkus Extension for ...
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: git
2+
ref: git
3+
type: tooling
4+

0 commit comments

Comments
 (0)