0

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.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Marco Fantasia
  • 720
  • 8
  • 12
  • Looks like your problem would be fixed with this pull request: https://github.com/openrewrite/rewrite-maven-plugin/pull/517 – Tim Mar 03 '23 at 19:32

1 Answers1

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!

Tim
  • 19,793
  • 8
  • 70
  • 95