Skip to content

Commit 3a7faaf

Browse files
AnshulPatniAnshul Patni
andauthored
fix: enforce maven-enforcer-plugin 3.6.3 in release profile and fix POM structure (GoogleCloudPlatform#394)
* build: fix duplicate pluginManagement tag in functions-framework-api In functions-framework-api/pom.xml, an existing pluginManagement block at line 130 caused duplicate tag parse errors when adding maven-enforcer-plugin:3.6.3. This merges the maven-enforcer-plugin configuration into the single existing pluginManagement block, ensuring valid POM XML structure. Change-Id: Iaf22b3348ecd9cbbd42f0ed995e2ce5e1831a4f6 * build: enforce maven-enforcer-plugin 3.6.3 in sonatype-oss-release profile When release builds activate the sonatype-oss-release profile inherited from oss-parent:9, Maven executes maven-enforcer-plugin:1.2 declared in the parent profile's plugins block, overriding root-level pluginManagement. This explicitly declares maven-enforcer-plugin:3.6.3 inside the sonatype-oss-release profile across all modules, guaranteeing modern plugin execution during automated release builds. Change-Id: I410f36f6f53309388dcdef52a53131367b2cb165 --------- Co-authored-by: Anshul Patni <anshulpatni@google.com>
1 parent 056bb07 commit 3a7faaf

3 files changed

Lines changed: 20 additions & 9 deletions

File tree

function-maven-plugin/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@
130130
<id>sonatype-oss-release</id>
131131
<build>
132132
<plugins>
133+
<plugin>
134+
<groupId>org.apache.maven.plugins</groupId>
135+
<artifactId>maven-enforcer-plugin</artifactId>
136+
<version>3.6.3</version>
137+
</plugin>
133138
<plugin>
134139
<groupId>org.apache.maven.plugins</groupId>
135140
<artifactId>maven-source-plugin</artifactId>

functions-framework-api/pom.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,6 @@
7575
</dependencies>
7676

7777
<build>
78-
<pluginManagement>
79-
<plugins>
80-
<plugin>
81-
<groupId>org.apache.maven.plugins</groupId>
82-
<artifactId>maven-enforcer-plugin</artifactId>
83-
<version>3.6.3</version>
84-
</plugin>
85-
</plugins>
86-
</pluginManagement>
8778
<plugins>
8879
<plugin>
8980
<artifactId>maven-compiler-plugin</artifactId>
@@ -129,6 +120,11 @@
129120
</plugins>
130121
<pluginManagement>
131122
<plugins>
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-enforcer-plugin</artifactId>
126+
<version>3.6.3</version>
127+
</plugin>
132128
<plugin>
133129
<artifactId>maven-javadoc-plugin</artifactId>
134130
<version>${maven-javadoc-plugin.version}</version>
@@ -163,6 +159,11 @@
163159
<id>sonatype-oss-release</id>
164160
<build>
165161
<plugins>
162+
<plugin>
163+
<groupId>org.apache.maven.plugins</groupId>
164+
<artifactId>maven-enforcer-plugin</artifactId>
165+
<version>3.6.3</version>
166+
</plugin>
166167
<plugin>
167168
<groupId>org.apache.maven.plugins</groupId>
168169
<artifactId>maven-source-plugin</artifactId>

invoker/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@
9898
<id>sonatype-oss-release</id>
9999
<build>
100100
<plugins>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-enforcer-plugin</artifactId>
104+
<version>3.6.3</version>
105+
</plugin>
101106
<plugin>
102107
<groupId>org.apache.maven.plugins</groupId>
103108
<artifactId>maven-source-plugin</artifactId>

0 commit comments

Comments
 (0)