Skip to content

Commit fbae1c9

Browse files
authored
Generate config props during doc phase (#110)
Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
1 parent 8d20f4a commit fbae1c9

File tree

2 files changed

+38
-25
lines changed

2 files changed

+38
-25
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
echo BUILD_VERSION=$BUILD_VERSION >> $GITHUB_ENV
3636
- name: Run Antora
3737
run: |
38-
./mvnw -pl spring-grpc-docs antora
38+
./mvnw -pl spring-grpc-docs process-resources antora -P docs
3939
- name: Publish Docs
4040
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.11
4141
with:

spring-grpc-docs/pom.xml

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,30 +99,6 @@
9999
<skip>true</skip>
100100
</configuration>
101101
</plugin>
102-
<plugin>
103-
<groupId>org.codehaus.mojo</groupId>
104-
<artifactId>exec-maven-plugin</artifactId>
105-
<version>${maven-exec-plugin.version}</version>
106-
<executions>
107-
<execution>
108-
<id>generate-configprops</id>
109-
<phase>package</phase>
110-
<goals>
111-
<goal>java</goal>
112-
</goals>
113-
<configuration>
114-
<includeProjectDependencies>true</includeProjectDependencies>
115-
<includePluginDependencies>false</includePluginDependencies>
116-
<mainClass>
117-
org.springframework.grpc.internal.ConfigurationPropertiesAsciidocGenerator</mainClass>
118-
<arguments>
119-
<argument>${configprops.path}</argument>
120-
<argument>${configprops.inclusionPattern}</argument>
121-
</arguments>
122-
</configuration>
123-
</execution>
124-
</executions>
125-
</plugin>
126102
<plugin>
127103
<groupId>org.jruby.maven</groupId>
128104
<artifactId>gem-maven-plugin</artifactId>
@@ -209,6 +185,43 @@
209185
</plugins>
210186
</build>
211187

188+
<profiles>
189+
<profile>
190+
<id>docs</id>
191+
<activation>
192+
<activeByDefault>false</activeByDefault>
193+
</activation>
194+
<build>
195+
<plugins>
196+
<plugin>
197+
<groupId>org.codehaus.mojo</groupId>
198+
<artifactId>exec-maven-plugin</artifactId>
199+
<version>${maven-exec-plugin.version}</version>
200+
<executions>
201+
<execution>
202+
<id>generate-configprops</id>
203+
<phase>process-resources</phase>
204+
<goals>
205+
<goal>java</goal>
206+
</goals>
207+
<configuration>
208+
<includeProjectDependencies>true</includeProjectDependencies>
209+
<includePluginDependencies>false</includePluginDependencies>
210+
<mainClass>
211+
org.springframework.grpc.internal.ConfigurationPropertiesAsciidocGenerator</mainClass>
212+
<arguments>
213+
<argument>${configprops.path}</argument>
214+
<argument>${configprops.inclusionPattern}</argument>
215+
</arguments>
216+
</configuration>
217+
</execution>
218+
</executions>
219+
</plugin>
220+
</plugins>
221+
</build>
222+
</profile>
223+
</profiles>
224+
212225
<repositories>
213226
<repository>
214227
<id>mavengems</id>

0 commit comments

Comments
 (0)