Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polyglot fails with latest maven 4.0.0-alpha versions #224

Open
McFoggy opened this issue Dec 31, 2020 · 3 comments
Open

polyglot fails with latest maven 4.0.0-alpha versions #224

McFoggy opened this issue Dec 31, 2020 · 3 comments

Comments

@McFoggy
Copy link

McFoggy commented Dec 31, 2020

using a simple sample project

pom.yaml

modelVersion: 4.0.0
groupId: fr.brouillard.oss.maven.sample
artifactId: yaml-project
version: 0.0.1-SNAPSHOT
name: 'Sample using YAML POM'

extensions.xml

<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.
-->

<extensions>
  <extension>
    <groupId>io.takari.polyglot</groupId>
    <artifactId>polyglot-yaml</artifactId>
    <version>0.4.6</version>
  </extension>
</extensions>

On latest maven versions Apache Maven 4.0.0-alpha-1-SNAPSHOT (2caed6218a5ec0a0b7fce2975743331e5ec76c89) the build fails with Internal error: java.lang.RuntimeException: Unable to determine model input format; options={transformerContext=org.apache.maven.model.building.DefaultModelBuilder$DefaultTransformerContextBuilder$1@70cccd8f}

full stack trace
[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.RuntimeException: Unable to determine model input format; options={transformerContext=org.apache.maven.model.building.DefaultModelBuilder$DefaultTransformerContextBuilder$1@70cccd8f} -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Unable to determine model input format; options={transformerContext=org.apache.maven.model.building.DefaultModelBuilder$DefaultTransformerContextBuilder$1@70cccd8f}
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:134)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:982)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:200)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    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)
Caused by: java.lang.RuntimeException: Unable to determine model input format; options={transformerContext=org.apache.maven.model.building.DefaultModelBuilder$DefaultTransformerContextBuilder$1@70cccd8f}
    at org.sonatype.maven.polyglot.PolyglotModelManager.getReaderFor (PolyglotModelManager.java:65)
    at org.sonatype.maven.polyglot.TeslaModelProcessor.read (TeslaModelProcessor.java:147)
    at org.sonatype.maven.polyglot.TeslaModelProcessor.read (TeslaModelProcessor.java:91)
    at org.apache.maven.model.building.DefaultModelBuilder.readRawModel (DefaultModelBuilder.java:743)
    at org.apache.maven.model.building.DefaultModelBuilder.readEffectiveModel (DefaultModelBuilder.java:364)
    at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:506)
    at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:494)
    at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:619)
    at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:401)
    at org.sonatype.maven.polyglot.TeslaProjectBuilder.build (TeslaProjectBuilder.java:43)
    at org.apache.maven.project.collector.DefaultProjectsSelector.selectProjects (DefaultProjectsSelector.java:63)
    at org.apache.maven.project.collector.MultiModuleCollectionStrategy.collectProjects (MultiModuleCollectionStrategy.java:71)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:426)
    at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:97)
    at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:559)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:233)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:206)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:119)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:982)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:200)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    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)
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/InternalErrorException

Looking quickly at the code in PolyglotModelManager it looks like the injection of mappings did not worked as expected.

@McFoggy McFoggy changed the title polyglot fails with latest 4.0 maven branch polyglot fails with latest maven 4.0.0-alpha versions Dec 31, 2020
@mosabua
Copy link
Member

mosabua commented Jan 1, 2021

I am not surprised to be honest.. we will have to try to update the internal Maven used in polyglot closer to 3.6.3 first .. also have to upgrade to Java 11 .. which is hard due to inactive jruby related projects and such. Not sure when or if we will find time for that work. Pull requests are welcome of course..

@laeubi
Copy link
Contributor

laeubi commented May 5, 2021

which is hard due to inactive jruby related projects

Shouldn't "older" J8 still work with J11 code? If not I think it is acceptable to drop ruby support as long as there are no new releases.

@laeubi
Copy link
Contributor

laeubi commented Jan 29, 2022

Is there any progress here? Any help needed? Is java 8 still a concern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants