You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Bukama (via GitHub)" <gi...@apache.org> on 2025/04/25 16:16:04 UTC

[I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Bukama opened a new issue, #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327

   ### 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](https://github.com/apache/maven-compiler-plugin/commit/7d44073616fcf93eb0c5f4aa43c3511da695a778) 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
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2830886539

   I think that this is a duplicated of #326. The master is known to not compile against Maven 4.0.0-rc-3. This is already fixed in pull request #320, which is waiting since April 6th for a volunteer to review it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2831427218

   Thanks. I wll try tomorrow to add a commit using the encoding returned by `System.getProperty("native.encoding")` for parsing the file produced by the forked compiler.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2831221651

   This error didn't occurred in the GitHub action, including on Windows. What is the full name of the directory where the plugin has been cloned on your machine? For checking if there is a special character which appears when the plugin converts a path to an absolute path.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2831375291

   Path of my plugin fork:
   
   `D:\Github\Maven\maven-compiler-plugin`
   
   path of the clone of your PR
   
   `D:\Github\Maven-Official-Testwiese\maven-compiler-plugin`
   
   
   Output
   
   ```
   C:\Windows\system32>jshell
   |  Willkommen bei JShell - Version 21.0.1
   |  Geben Sie für eine Einführung Folgendes ein: /help intro
   
   jshell> System.getProperty("native.encoding")
   $1 ==> "Cp1252"
   
   jshell>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2831039877

   > I think that this is a duplicated of [#326](https://github.com/apache/maven-compiler-plugin/issues/326). The master is known to not compile against Maven 4.0.0-rc-3. This is already fixed in pull request [#320](https://github.com/apache/maven-compiler-plugin/pull/320), which is waiting since April 6th for a volunteer to review it.
   
   I cloned the branch of your PR and get the same error there.
   
   Needed to run as admin, as one other test otherwise fails due to execution rights.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux closed issue #327: master does not build on windows with Maven 4.0.0-rc-3
URL: https://github.com/apache/maven-compiler-plugin/issues/327


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2832136074

   Should be fixed in commit 7bac7a5ec04d565ac50e2c8e9dd47dd177089b11. Can you try again please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2831233766

   Correction: maybe no need to provide the full path. Looking at the line where the error occurred, I think that this is an encoding issue. What is the encoding of your Windows system? Can you check if `System.getProperty("native.encoding")` returns the right encoding on your system?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] master does not build on windows with Maven 4.0.0-rc-3 [maven-compiler-plugin]

Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux commented on issue #327:
URL: https://github.com/apache/maven-compiler-plugin/issues/327#issuecomment-2848906303

   Fixed by 3a56f5a8aec7dcc48d483b95f644c95a85a55756.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org