Skip to content

Commit

Permalink
Added maven-properties-adoc profile
Browse files Browse the repository at this point in the history
  • Loading branch information
vy committed Sep 15, 2023
1 parent 6ac7327 commit cdf5f60
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
67 changes: 67 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,73 @@

</profile>

<!-- populate `doc/maven-properties.adoc` from `doc/maven-properties.tmpl.adoc` -->
<profile>

<id>maven-properties-adoc</id>

<activation>
<file>
<exists>doc/maven-properties.tmpl.adoc</exists>
</file>
</activation>

<build>
<plugins>

<!-- copy `doc/maven-properties.tmpl.adoc` to `target/doc` -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-doc-maven-properties-tmpl</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<inherited>false</inherited>
<configuration>
<target>
<copy overwrite="true" tofile="${project.build.directory}/doc/maven-properties.adoc" verbose="true">
<fileset file="doc/maven-properties.tmpl.adoc" />
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>

<!-- process `target/doc` and output to `doc` -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter-doc-maven-properties-tmpl</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>process-sources</phase>
<inherited>false</inherited>
<configuration>
<outputDirectory>doc</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/doc</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

</profile>

</profiles>

</project>
8 changes: 8 additions & 0 deletions src/changelog/.10.x.x/add-maven-properties-adoc-profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="added">
<author id="github:vy"/>
<description format="markdown">Added `maven-properties-adoc` profile that populates `doc/maven-properties.adoc` from `doc/maven-properties.tmpl.adoc`, if present</description>
</entry>

0 comments on commit cdf5f60

Please sign in to comment.