Skip to content

master does not build on windows with Maven 4.0.0-rc-3 #327

Closed
@Bukama

Description

@Bukama

Affected version

4.0.0-beta-3-SNAPSHOT

Bug description

I wanted to update parent version, but I got test errors. So I tried to build master and got the same error too.

When trying to build current master (4.0.0-beta-3-SNAPSHOT) as of commit 7d44073 the build breaks on my Windows machine

D:\Github\Maven\maven-compiler-plugin>mvn clean verify site -P run-its -V
Apache Maven 4.0.0-rc-3 (3952d00ce65df6753b63a51e86b1f626c55a8df2)
Maven home: C:\apache-maven-4.0.0-rc-3
Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: C:\JDK\Java21
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "winnt"
[WARNING] [stderr] OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[ERROR] Tests run: 14, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.515 s <<< FAILURE! -- in org.apache.maven.plugin.compiler.CompilerMojoTestCase
[ERROR] org.apache.maven.plugin.compiler.CompilerMojoTestCase.testCompilerFork(CompilerMojo, TestCompilerMojo) -- Time elapsed: 0.506 s <<< ERROR!
org.apache.maven.plugin.compiler.CompilationFailureException:
Cannot compile myGroupId:myArtifactId:jar:1.0-SNAPSHOT main classes.
The first error is: Input length = 1
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.compile(AbstractCompilerMojo.java:1458)
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:995)
        at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:165)
        at org.apache.maven.plugin.compiler.CompilerMojoTestCase.testCompilerFork(CompilerMojoTestCase.java:209)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.charset.MalformedInputException: Input length = 1
        at java.base/java.lang.String.throwMalformed(String.java:1279)
        at java.base/java.lang.String.decodeUTF8_UTF16(String.java:1235)
        at java.base/java.lang.String.newStringUTF8NoRepl(String.java:759)
        at java.base/java.lang.String.newStringNoRepl1(String.java:790)
        at java.base/java.lang.String.newStringNoRepl(String.java:772)
        at java.base/java.lang.System$2.newStringNoRepl(System.java:2476)
        at java.base/java.nio.file.Files.readString(Files.java:3349)
        at java.base/java.nio.file.Files.readString(Files.java:3305)
        at org.apache.maven.plugin.compiler.ForkedTool.run(ForkedTool.java:167)
        at org.apache.maven.plugin.compiler.ForkedCompiler$1.call(ForkedCompiler.java:96)
        at org.apache.maven.plugin.compiler.CompilationTaskSources.compile(CompilationTaskSources.java:55)
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.compile(AbstractCompilerMojo.java:1395)
        ... 6 more

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   CompilerMojoTestCase.testCompilerFork:209 » CompilationFailure Cannot compile myGroupId:myArtifactId:jar:1.0-SNAPSHOT main classes.
The first error is: Input length = 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions