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

Build failure on unsupported Language

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0-beta-4
    • 4.0.0-beta-5
    • Core
    • None

    Description

      Maven fails when extensions are declared as part of a plugin (that is, not as extension xml tag), as described in variant 1 of https://maven.apache.org/guides/mini/guide-using-extensions.html

      For reproduction:

       

      [INFO] Scanning for projects...
      [ERROR] Internal error: java.lang.IllegalArgumentException: Unknown extensible enum value 'xml' -> [Help 1]
      org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Unknown extensible enum value 'xml'
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:157)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:981)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:291)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:208)
          at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
          at java.lang.reflect.Method.invoke(Method.java:580)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
      Caused by: java.lang.IllegalArgumentException: Unknown extensible enum value 'xml'
          at org.apache.maven.api.services.ExtensibleEnumRegistry.lambda$require$0(ExtensibleEnumRegistry.java:33)
          at java.util.Optional.orElseThrow(Optional.java:403)
          at org.apache.maven.api.services.ExtensibleEnumRegistry.require(ExtensibleEnumRegistry.java:33)
          at org.apache.maven.internal.impl.DefaultTypeRegistry.lambda$require$1(DefaultTypeRegistry.java:94)
          at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
          at org.apache.maven.internal.impl.DefaultTypeRegistry.require(DefaultTypeRegistry.java:87)
          at org.apache.maven.internal.impl.DefaultTypeRegistry.lookup(DefaultTypeRegistry.java:80)
          at org.apache.maven.internal.impl.DefaultPackagingRegistry.lookup(DefaultPackagingRegistry.java:88)
          at org.apache.maven.internal.impl.model.DefaultLifecycleBindingsInjector.injectLifecycleBindings(DefaultLifecycleBindingsInjector.java:69)
          at org.apache.maven.internal.impl.model.DefaultModelBuilder.build(DefaultModelBuilder.java:575)
          at org.apache.maven.internal.impl.model.DefaultModelBuilder.build(DefaultModelBuilder.java:198)
          at org.apache.maven.project.DefaultProjectBuilder$BuildSession.doBuild(DefaultProjectBuilder.java:825)
          at org.apache.maven.project.DefaultProjectBuilder$BuildSession.lambda$build$6(DefaultProjectBuilder.java:794)
          at java.util.concurrent.FutureTask.run(FutureTask.java:317)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
          at java.lang.Thread.run(Thread.java:1583)

      Deleting just the line "<extension>true</extension>" avoids the exception (of course the build still doesn't succeed then).

      I have several projects that use the Maven Tycho extension (for building Eclipse plugins). All of those builds fail similarly.

       

      Attachments

        1. image-2024-10-09-08-57-47-501.png
          12 kB
          Michael Keppler

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              bananeweizen Michael Keppler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: