Skip to content

Commit

Permalink
#483 Add enforcer plugin again (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada authored Oct 24, 2023
1 parent aee7e0a commit a4e08d0
Show file tree
Hide file tree
Showing 16 changed files with 437 additions and 171 deletions.
329 changes: 168 additions & 161 deletions dependencies.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions doc/changes/changes_2.9.14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Project Keeper 2.9.14, released 2023-10-24

Code name: Add enforcer-plugin

## Summary

This release adds the enforcer-plugin to generated parent POMs to avoid error messages during build. The minimum Maven version is set to 3.6.3 so that builds also work on Ubuntu 20.04.

## Features

* #483: Added enforcer-plugin

## Dependency Updates

### Project-Keeper Shared Model Classes

#### Plugin Dependency Updates

* Added `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1`

### Project Keeper Core

#### Compile Dependency Updates

* Updated `com.exasol:project-keeper-shared-model-classes:2.9.13` to `2.9.14`

#### Runtime Dependency Updates

* Updated `com.exasol:project-keeper-java-project-crawler:2.9.13` to `2.9.14`

#### Test Dependency Updates

* Updated `com.exasol:project-keeper-shared-test-setup:2.9.13` to `2.9.14`

#### Plugin Dependency Updates

* Added `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1`

### Project Keeper Command Line Interface

#### Compile Dependency Updates

* Updated `com.exasol:project-keeper-core:2.9.13` to `2.9.14`

#### Test Dependency Updates

* Updated `com.exasol:project-keeper-shared-test-setup:2.9.13` to `2.9.14`

#### Plugin Dependency Updates

* Added `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1`

### Project Keeper Maven Plugin

#### Compile Dependency Updates

* Updated `com.exasol:project-keeper-core:2.9.13` to `2.9.14`

#### Test Dependency Updates

* Updated `org.jacoco:org.jacoco.agent:0.8.10` to `0.8.11`

#### Plugin Dependency Updates

* Added `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1`
* Updated `org.apache.maven.plugins:maven-plugin-plugin:3.9.0` to `3.10.1`

### Project Keeper Java Project Crawler

#### Compile Dependency Updates

* Updated `com.exasol:project-keeper-shared-model-classes:2.9.13` to `2.9.14`

#### Test Dependency Updates

* Updated `org.jacoco:org.jacoco.agent:0.8.10` to `0.8.11`

#### Plugin Dependency Updates

* Added `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1`

### Project Keeper Shared Test Setup

#### Compile Dependency Updates

* Updated `com.exasol:project-keeper-shared-model-classes:2.9.13` to `2.9.14`

#### Plugin Dependency Updates

* Added `org.apache.maven.plugins:maven-enforcer-plugin:3.4.1`
22 changes: 21 additions & 1 deletion maven-project-crawler/pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions maven-project-crawler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<version>${revision}</version>
</parent>
<url>https://github.com/exasol/project-keeper/</url>
<prerequisites>
<maven>${minimum.maven.version}</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>com.exasol</groupId>
Expand Down
3 changes: 2 additions & 1 deletion parent-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
</repository>
</distributionManagement>
<properties>
<revision>2.9.13</revision>
<revision>2.9.14</revision>
<maven.version>3.9.5</maven.version>
<minimum.maven.version>3.6.3</minimum.maven.version>
<junit.version>5.10.0</junit.version>
<xmlunit.version>2.9.1</xmlunit.version>
<mockito.version>5.6.0</mockito.version>
Expand Down
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,30 @@
<name>Project Keeper Project</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.itsallcode</groupId>
<artifactId>openfasttrace-maven-plugin</artifactId>
<version>1.6.2</version>
<version>1.6.1</version>
<executions>
<execution>
<id>trace-requirements</id>
Expand Down
20 changes: 20 additions & 0 deletions project-keeper-cli/pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion project-keeper-maven-plugin/pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion project-keeper-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<artifactId>project-keeper-maven-plugin-generated-parent</artifactId>
<version>${revision}</version>
</parent>
<prerequisites>
<maven>${minimum.maven.version}</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>com.exasol</groupId>
Expand Down Expand Up @@ -84,7 +87,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.9.0</version>
<version>3.10.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
20 changes: 20 additions & 0 deletions project-keeper/pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class PomFileGenerator {
private static final List<PluginTemplateGenerator> PLUGIN_GENERATORS = List.of(
new SimplePluginTemplateGenerator("maven_templates/sonar-maven-plugin.xml", DEFAULT),
new SimplePluginTemplateGenerator("maven_templates/maven-compiler-plugin.xml", DEFAULT),
new SimplePluginTemplateGenerator("maven_templates/maven-enforcer-plugin.xml", DEFAULT),
new SimplePluginTemplateGenerator("maven_templates/flatten-maven-plugin.xml", DEFAULT),
new SimplePluginTemplateGenerator("maven_templates/ossindex-maven-plugin.xml", DEFAULT),
new SimplePluginTemplateGenerator("maven_templates/maven-surefire-plugin.xml", DEFAULT),
Expand Down Expand Up @@ -177,7 +178,7 @@ private ElementBuilder dependencies(final Collection<ProjectKeeperModule> enable
? dependency("org.projectlombok", "lombok", "1.18.28", "provided", null)
: null) //
.nullableChild(enabledModules.contains(UDF_COVERAGE) //
? dependency("org.jacoco", "org.jacoco.agent", "0.8.10", "test", "runtime")
? dependency("org.jacoco", "org.jacoco.agent", "0.8.11", "test", "runtime")
: null);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ void testGenerateWithDefaultModule() throws XmlPullParserException, IOException
() -> assertThat(license.getName(), equalTo("My License")),
() -> assertThat(license.getDistribution(), equalTo("repo")),
() -> assertThat(pluginNames,
containsInAnyOrder("sonar-maven-plugin", "maven-compiler-plugin", "flatten-maven-plugin",
"ossindex-maven-plugin", "reproducible-build-maven-plugin", "maven-surefire-plugin",
"versions-maven-plugin", "jacoco-maven-plugin", "error-code-crawler-maven-plugin",
"duplicate-finder-maven-plugin")));
containsInAnyOrder("sonar-maven-plugin", "maven-compiler-plugin", "maven-enforcer-plugin",
"flatten-maven-plugin", "ossindex-maven-plugin", "reproducible-build-maven-plugin",
"maven-surefire-plugin", "versions-maven-plugin", "jacoco-maven-plugin",
"error-code-crawler-maven-plugin", "duplicate-finder-maven-plugin")));
}

static Stream<Arguments> testPluginsAddedByModuleCases() {
Expand Down
20 changes: 20 additions & 0 deletions shared-model-classes/pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a4e08d0

Please sign in to comment.