Skip to content

Commit

Permalink
Enables maven to update version in README.md file during releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianburton committed Feb 24, 2024
1 parent ec67db3 commit a5f8c84
Show file tree
Hide file tree
Showing 3 changed files with 415 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ releases include source jars for easy reference in your IDE.
<dependency>
<groupId>org.javimmutable</groupId>
<artifactId>collections</artifactId>
<version>insert-desired-version</version>
<version>4.0.1-SNAPSHOT</version>
</dependency>
````

Expand Down
51 changes: 40 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,33 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>readme</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}</outputDirectory>
<resources>
<resource>
<directory>src/main/doc</directory>
<includes>
<include>README.md</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -199,6 +226,8 @@
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
<tagNameFormat>v@{project.version}</tagNameFormat>
<preparationGoals>resources:copy-resources@readme scm:add -Dincludes=README.md</preparationGoals>
<completionGoals>resources:copy-resources@readme scm:add -Dincludes=README.md</completionGoals>
</configuration>
</plugin>
<plugin>
Expand All @@ -220,19 +249,19 @@
<classpathScope>test</classpathScope>
<arguments>
<argument>-classpath</argument>
<classpath />
<classpath/>
<argument>-ea</argument>
<argument>org.javimmutable.collections.stress_test.RunStressTests</argument>
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>deque</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>orderedmap</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>orderedset</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>orderedsetmap</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>hashset</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>deque</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>orderedmap</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>orderedset</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>orderedsetmap</argument>-->
<!-- <argument>&#45;&#45;test</argument>-->
<!-- <argument>hashset</argument>-->
</arguments>
</configuration>
</plugin>
Expand Down
Loading

0 comments on commit a5f8c84

Please sign in to comment.