OpenRewrite: 一个夸克的内容是未知的,因此字符集是未知的

huangapple go评论97阅读模式
英文:

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:

&lt;project&gt;
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.openrewrite.maven&lt;/groupId&gt;
        &lt;artifactId&gt;rewrite-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;4.41.0&lt;/version&gt;
        &lt;configuration&gt;
          &lt;activeRecipes&gt;
            &lt;recipe&gt;org.openrewrite.java.migrate.Java8toJava11&lt;/recipe&gt;
          &lt;/activeRecipes&gt;
        &lt;/configuration&gt;
        &lt;dependencies&gt;
          &lt;dependency&gt;
            &lt;groupId&gt;org.openrewrite.recipe&lt;/groupId&gt;
            &lt;artifactId&gt;rewrite-migrate-java&lt;/artifactId&gt;
            &lt;version&gt;1.17.1&lt;/version&gt;
          &lt;/dependency&gt;
        &lt;/dependencies&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;

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!

huangapple
  • 本文由 发表于 2023年3月4日 03:07:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/75630973.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定