Skip to content

Commit a28bae6

Browse files
committed
Experiment with a plugin that generates Spring config metadata
The plugin is installed at the deployment phase and assembles everything that is in the classpath. The metadata is augmented with some additional Quarkus metadata. There is still some improvements to make but it's a start. Also the big problem is that we will have to add this plugin for each deployment module in the tree.
1 parent f4fd1a2 commit a28bae6

File tree

16 files changed

+510
-0
lines changed

16 files changed

+510
-0
lines changed

build-parent/pom.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,23 @@
398398
<plugin>
399399
<artifactId>maven-compiler-plugin</artifactId>
400400
</plugin>
401+
<plugin>
402+
<groupId>io.quarkus</groupId>
403+
<artifactId>quarkus-extension-deployment-metadata-maven-plugin</artifactId>
404+
<version>${project.version}</version>
405+
<executions>
406+
<execution>
407+
<id>generate-config-doc</id>
408+
<phase>package</phase>
409+
<goals>
410+
<goal>attach-deployment-metadata</goal>
411+
</goals>
412+
<configuration>
413+
<skip>${skipDocs}</skip>
414+
</configuration>
415+
</execution>
416+
</executions>
417+
</plugin>
401418
<plugin>
402419
<groupId>org.codehaus.mojo</groupId>
403420
<artifactId>properties-maven-plugin</artifactId>
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>io.quarkus</groupId>
7+
<artifactId>quarkus-devtools-all</artifactId>
8+
<version>999-SNAPSHOT</version>
9+
</parent>
10+
<artifactId>quarkus-extension-deployment-metadata-maven-plugin</artifactId>
11+
<name>Quarkus - Extension deployment metadata Maven plugin</name>
12+
<packaging>maven-plugin</packaging>
13+
<properties>
14+
<maven-core.version>3.9.8</maven-core.version>
15+
</properties>
16+
<build>
17+
<pluginManagement>
18+
<plugins>
19+
<plugin>
20+
<artifactId>maven-compiler-plugin</artifactId>
21+
</plugin>
22+
<plugin>
23+
<artifactId>maven-javadoc-plugin</artifactId>
24+
<configuration>
25+
<quiet>true</quiet>
26+
<doclint>none</doclint>
27+
</configuration>
28+
</plugin>
29+
<plugin>
30+
<groupId>org.apache.maven.plugins</groupId>
31+
<artifactId>maven-enforcer-plugin</artifactId>
32+
<dependencies>
33+
<dependency>
34+
<groupId>io.quarkus</groupId>
35+
<artifactId>quarkus-enforcer-rules</artifactId>
36+
<version>${project.version}</version>
37+
</dependency>
38+
</dependencies>
39+
<executions>
40+
<execution>
41+
<id>enforce</id>
42+
<phase>${maven-enforcer-plugin.phase}</phase>
43+
<configuration>
44+
<rules>
45+
<dependencyConvergence/>
46+
<externalRules>
47+
<location>classpath:enforcer-rules/quarkus-require-java-version.xml</location>
48+
</externalRules>
49+
<externalRules>
50+
<location>classpath:enforcer-rules/quarkus-require-maven-version.xml</location>
51+
</externalRules>
52+
<externalRules>
53+
<location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
54+
</externalRules>
55+
<bannedDependencies>
56+
<excludes>
57+
<!-- findbugs is not required at runtime -->
58+
<exclude>com.google.code.findbugs:jsr305</exclude>
59+
<!-- com.google.guava:listenablefuture is empty and the ListenableFuture class is available in Guava -->
60+
<exclude>com.google.guava:listenablefuture</exclude>
61+
</excludes>
62+
</bannedDependencies>
63+
</rules>
64+
</configuration>
65+
<goals>
66+
<goal>enforce</goal>
67+
</goals>
68+
</execution>
69+
</executions>
70+
</plugin>
71+
</plugins>
72+
</pluginManagement>
73+
<plugins>
74+
<plugin>
75+
<groupId>org.eclipse.sisu</groupId>
76+
<artifactId>sisu-maven-plugin</artifactId>
77+
<version>0.9.0.M3</version>
78+
<executions>
79+
<execution>
80+
<id>index-project</id>
81+
<goals>
82+
<goal>main-index</goal>
83+
<goal>test-index</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-plugin-plugin</artifactId>
91+
<configuration>
92+
<goalPrefix>quarkus-config-doc</goalPrefix>
93+
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
94+
</configuration>
95+
<executions>
96+
<execution>
97+
<id>help-goal</id>
98+
<goals>
99+
<goal>helpmojo</goal>
100+
</goals>
101+
</execution>
102+
<execution>
103+
<id>default-config-doc</id>
104+
<phase>generate-resources</phase>
105+
</execution>
106+
</executions>
107+
</plugin>
108+
</plugins>
109+
</build>
110+
<dependencies>
111+
<dependency>
112+
<groupId>io.quarkus</groupId>
113+
<artifactId>quarkus-extension-processor</artifactId>
114+
<version>${project.version}</version>
115+
</dependency>
116+
<dependency>
117+
<groupId>javax.inject</groupId>
118+
<artifactId>javax.inject</artifactId>
119+
</dependency>
120+
<dependency>
121+
<groupId>org.apache.maven</groupId>
122+
<artifactId>maven-plugin-api</artifactId>
123+
<scope>provided</scope>
124+
</dependency>
125+
<dependency>
126+
<groupId>org.apache.maven.plugin-tools</groupId>
127+
<artifactId>maven-plugin-annotations</artifactId>
128+
</dependency>
129+
<dependency>
130+
<groupId>org.apache.maven</groupId>
131+
<artifactId>maven-core</artifactId>
132+
<scope>provided</scope>
133+
</dependency>
134+
<dependency>
135+
<groupId>org.apache.maven</groupId>
136+
<artifactId>maven-embedder</artifactId>
137+
<scope>provided</scope>
138+
</dependency>
139+
<dependency>
140+
<groupId>org.apache.maven</groupId>
141+
<artifactId>maven-settings-builder</artifactId>
142+
<scope>provided</scope>
143+
</dependency>
144+
<dependency>
145+
<groupId>org.apache.maven</groupId>
146+
<artifactId>maven-resolver-provider</artifactId>
147+
<scope>provided</scope>
148+
</dependency>
149+
<dependency>
150+
<groupId>org.apache.maven</groupId>
151+
<artifactId>maven-model</artifactId>
152+
<scope>provided</scope>
153+
</dependency>
154+
<dependency>
155+
<groupId>org.apache.maven</groupId>
156+
<artifactId>maven-model-builder</artifactId>
157+
<scope>provided</scope>
158+
</dependency>
159+
<dependency>
160+
<groupId>org.apache.maven</groupId>
161+
<artifactId>maven-artifact</artifactId>
162+
<scope>provided</scope>
163+
</dependency>
164+
<dependency>
165+
<groupId>org.apache.maven</groupId>
166+
<artifactId>maven-settings</artifactId>
167+
<scope>provided</scope>
168+
</dependency>
169+
<dependency>
170+
<groupId>org.apache.maven</groupId>
171+
<artifactId>maven-builder-support</artifactId>
172+
<scope>provided</scope>
173+
</dependency>
174+
<dependency>
175+
<groupId>org.apache.maven</groupId>
176+
<artifactId>maven-repository-metadata</artifactId>
177+
<scope>provided</scope>
178+
</dependency>
179+
</dependencies>
180+
</project>

0 commit comments

Comments
 (0)