英文:
OpenRewrite: The contents of a quark are unknown, so the charset is unknown
问题
我想执行从Java8到Java11的源代码迁移,使用OpenRewrite插件和以下链接的食谱:https://docs.openrewrite.org/reference/recipes/java/migrate/java8tojava11。
如指南建议,我已经将迁移代码的插件指令添加到父POM中:
<project>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>4.41.0</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.migrate.Java8toJava11</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<version>1.17.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
我已经执行了mvn目标,但运行停在以下消息:
一个夸克的内容未知,因此字符集未知。
该项目是一个多模块项目,使用的文件编码是ISO-8859-1。
英文:
I want to execute the migration of my source code from Java8 to Jave11 using the OpenRewrite plugin and the recipe of the following link:https://docs.openrewrite.org/reference/recipes/java/migrate/java8tojava11.
As the guide suggests, I have added to the parent pom the plug-in instruction to migrate the code:
<project>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>4.41.0</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.migrate.Java8toJava11</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<version>1.17.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
I have executed the mvn goal, but the run stop with the following message:
> The contents of a quark are unknown, so the charset is unknown.
The project is a multi-module one and the file encoding used is ISO-8859-1.
答案1
得分: 1
这个问题已经在这个代码更改中修复1,发布在rewrite-maven-plugin v4.41.1中。感谢您提醒我们!
1: https://github.com/openrewrite/rewrite-maven-plugin/pull/517
2: https://github.com/openrewrite/rewrite-maven-plugin/releases/tag/v4.41.1
英文:
This issue was fixed with this code change, released in rewrite-maven-plugin v4.41.1. Thank you for bringing this to our attention!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论