You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2024/08/09 14:12:00 UTC

[jira] [Assigned] (MNG-8188) [REGRESSION] Property not resolved in profile pluginManagement

     [ https://issues.apache.org/jira/browse/MNG-8188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tamas Cservenak reassigned MNG-8188:
------------------------------------

    Assignee: Tamas Cservenak

> [REGRESSION] Property not resolved in profile pluginManagement
> --------------------------------------------------------------
>
>                 Key: MNG-8188
>                 URL: https://issues.apache.org/jira/browse/MNG-8188
>             Project: Maven
>          Issue Type: Bug
>          Components: POM, Profiles
>    Affects Versions: 3.9.8
>            Reporter: Alexis Jehan
>            Assignee: Tamas Cservenak
>            Priority: Major
>             Fix For: 3.9.9
>
>         Attachments: pom.xml
>
>
> Hello,
> Consider the following POM file:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
> 	<modelVersion>4.0.0</modelVersion>
> 	<groupId>foo</groupId>
> 	<artifactId>foo</artifactId>
> 	<version>foo</version>
> 	<properties>
> 		<version.spring-boot>3.3.1</version.spring-boot>
> 	</properties>
> 	<build>
> 		<pluginManagement>
> 			<plugins>
> 				<plugin>
> 					<groupId>org.springframework.boot</groupId>
> 					<artifactId>spring-boot-maven-plugin</artifactId>
> 					<version>${version.spring-boot}</version>
> 				</plugin>
> 			</plugins>
> 		</pluginManagement>
> 	</build>
> 	<profiles>
> 		<profile>
> 			<id>foo</id>
> 			<build>
> 				<pluginManagement>
> 					<plugins>
> 						<plugin>
> 							<groupId>org.springframework.boot</groupId>
> 							<artifactId>spring-boot-maven-plugin</artifactId>
> 							<version>${version.spring-boot}</version>
> 						</plugin>
> 					</plugins>
> 				</pluginManagement>
> 			</build>
> 		</profile>
> 	</profiles>
> </project>
> {code}
> Using this command: {{mvn help:effective-pom}}
> The "version.spring-boot" property is resolved in the first case, but not in the second one. The property should be resolved everywhere.
> Snippet of the generated effective POM:
> {code:xml}
> […]
>     <profile>
>       <id>foo</id>
>       <build>
>         <pluginManagement>
>           <plugins>
>             <plugin>
>               <groupId>org.springframework.boot</groupId>
>               <artifactId>spring-boot-maven-plugin</artifactId>
>               <version>${version.spring-boot}</version>
>             </plugin>
>           </plugins>
>         </pluginManagement>
>       </build>
>     </profile>
> […]
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)