Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70488

Incrementalified projects fail to build with maven 4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • _unsorted
    • None
    • Maven 4.0.0 alpha 3, Temurin 19.0.2

      Building an incrementalified project with maven 4 fails, and complains about the lack of the couple of incremental profiles.
      I attempted to build the following plugin: jenkinsci/console-column-plugin
      by invoking

      mvn clean package -DskipTests -X
      

      which resulted in the following stacktrace:

      [ERROR] The requested profiles [might-produce-incrementals, consume-incrementals] could not be activated or deactivated because they do not exist. -> [Help 1]
      org.apache.maven.MissingProfilesException: The requested profiles [might-produce-incrementals, consume-incrementals] could not be activated or deactivated because they do not exist.
          at org.apache.maven.DefaultMaven.validateRequiredProfiles (DefaultMaven.java:555)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:297)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:226)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:151)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:854)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:197)
          at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
          at java.lang.reflect.Method.invoke (Method.java:578)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
          at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
      [ERROR] 
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProfilesException
      

      If I remove

      -Pconsume-incrementals
      -Pmight-produce-incrementals
      

      from .mvn/maven.config, I get a successful build.

            Unassigned Unassigned
            notmyfault Alexander Brandes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: