Merge pull request 'feature/19437' (#2) from feature/19437 into master
it sounds good.
This commit is contained in:
commit
f57cdc28a5
|
@ -1,6 +1,8 @@
|
|||
# Changelog for Maven-Parent
|
||||
|
||||
## [v1.1.0] [r4.23.0] 2020-01-27
|
||||
## [v1.1.0] - 2020-01-27
|
||||
|
||||
### Features
|
||||
|
||||
* New build profiles to support CI/CD
|
||||
* Enforcement for:
|
||||
|
@ -8,5 +10,5 @@
|
|||
* OpenJDK as target Java VM.
|
||||
* Maven 3.3.9+
|
||||
|
||||
## [v1.0.0] [r4.0.0] 2017-12-20
|
||||
## [v1.0.0] - 2017-12-20
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ A parent pom for all the gCube artifacts.
|
|||
* Java 8 (target and source)
|
||||
* OpenJDK as target Java VM.
|
||||
* Maven 3.3.9+
|
||||
* README.md, CHANGELOG.md and LICENSE.md are present in the baseDir of each Maven module
|
||||
* CHANGELOG.md must declare a tag [v+Pom version] (e.g. [v1.0.0])
|
||||
|
||||
# Build Profiles
|
||||
|
||||
|
|
84
pom.xml
84
pom.xml
|
@ -157,6 +157,15 @@
|
|||
</distributionManagement>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}</directory>
|
||||
<includes>
|
||||
<include>LICENSE.md</include>
|
||||
</includes>
|
||||
<targetPath>META-INF</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
|
@ -319,8 +328,17 @@
|
|||
</repository>
|
||||
</distributionManagement>
|
||||
<build>
|
||||
<plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}</directory>
|
||||
<includes>
|
||||
<include>LICENSE.md</include>
|
||||
</includes>
|
||||
<targetPath>META-INF</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
|
@ -448,8 +466,17 @@
|
|||
</repository>
|
||||
</distributionManagement>
|
||||
<build>
|
||||
<plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}</directory>
|
||||
<includes>
|
||||
<include>LICENSE.md</include>
|
||||
</includes>
|
||||
<targetPath>META-INF</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
|
@ -898,6 +925,59 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-files-exist</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireFilesExist>
|
||||
<files>
|
||||
<file>${project.basedir}/README.md</file>
|
||||
<file>${project.basedir}/LICENSE.md</file>
|
||||
<file>${project.basedir}/CHANGELOG.md</file>
|
||||
</files>
|
||||
</requireFilesExist>
|
||||
</rules>
|
||||
<fail>true</fail>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.gmaven</groupId>
|
||||
<artifactId>groovy-maven-plugin</artifactId>
|
||||
<version>2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<defaults>
|
||||
<name>tag</name>
|
||||
</defaults>
|
||||
<source>
|
||||
def fileContents = new File("${project.basedir}/CHANGELOG.md").getText('UTF-8')
|
||||
matcher = (fileContents =~ /(?s).\[v$project.version\].*?/)
|
||||
if (!matcher.find()) {
|
||||
throw new IllegalArgumentException("Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md")
|
||||
}
|
||||
assert matcher[0][1]: "Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md"
|
||||
</source>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
Loading…
Reference in New Issue