Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-8114

install plugin failed with NPE for profiles activated by files existing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      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

      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>
      
      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]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sellersj Jim Sellers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: