[
https://issues.apache.org/jira/browse/MNG-8114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tamas Cservenak closed MNG-8114.
--------------------------------
Resolution: Fixed
> install plugin failed with NPE for profiles activated by files existing
> -----------------------------------------------------------------------
>
> Key: MNG-8114
> URL: https://issues.apache.org/jira/browse/MNG-8114
> Project: Maven
> Issue Type: Bug
> Environment: Apache Maven 4.0.0-alpha-14-SNAPSHOT
> (9fc4f499172637c403f27808d5c0ccd0c770f93c)
> Maven home:
> C:\Users\sellersj\Downloads\apache-maven-4.0.0-alpha-14-20240425.054714-33-bin
> Java version: 21.0.3, vendor: Eclipse Adoptium, runtime:
> C:\devtools\java\jdk21
> Default locale: en_CA, platform encoding: UTF-8
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "winnt"
> Reporter: Jim Sellers
> Priority: Major
>
> This is a change between apache-maven-4.0.0-alpha-13 and
> 4.0.0-alpha-14-SNAPSHOT which I understand is not released yet.
> This happens both on windows and linux. If an app has a profile that's
> activated by a file existing or not, it will generate a NPE
> {code:XML|title=pom.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
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.example</groupId>
> <artifactId>Zminimal</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> <packaging>jar</packaging>
> <properties>
> <maven.compiler.target>8</maven.compiler.target>
> <maven.compiler.source>8</maven.compiler.source>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> </properties>
> <profiles>
> <profile>
> <id>is-webapp</id>
> <activation>
> <file>
> <exists>${basedir}/src/main/webapp/</exists>
> </file>
> </activation>
> </profile>
> </profiles>
> </project>
> {code}
> {code:title=log snipit}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install)
> on project Zminimal: Execution default-install of goal
> org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Cannot
> invoke
> "org.apache.maven.internal.impl.model.ProfileActivationFilePathInterpolator.interpolate(String,
> org.apache.maven.api.services.model.ProfileActivationContext)" because
> "this.profileActivationFilePathInterpolator" is null -> [Help 1]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)