在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):openrewrite/rewrite-maven-plugin开源软件地址(OpenSource Url):https://github.com/openrewrite/rewrite-maven-plugin开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):Eliminate Tech-Debt. At build time.What is this?This project provides a Maven plugin that applies Rewrite checking and fixing tasks as build tasks, one of several possible workflows for propagating change across an organization's source code. Getting startedThis To configure, add the plugin to your POM: <?xml version="1.0" encoding="UTF-8"?>
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version><!-- latest version here --></version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.format.AutoFormat</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</project> If wanting to leverage recipes from other dependencies: <?xml version="1.0" encoding="UTF-8"?>
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version><!-- latest version here --></version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.testing.junit5.JUnit5BestPractices</recipe>
<recipe>org.openrewrite.github.ActionsSetupJavaAdoptOpenJDKToTemurin</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-testing-frameworks</artifactId>
<version><!-- latest dependency version here --></version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-github-actions</artifactId>
<version><!-- latest dependency version here --></version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> To get started, try See the Maven Plugin Configuration documentation for full configuration and usage options. SnapshotsTo use the latest <?xml version="1.0" encoding="UTF-8"?>
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<!-- Use whichever version is latest at the time of reading. This number is a placeholder. -->
<version>4.17.0-SNAPSHOT</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.logging.slf4j.Log4j2ToSlf4j</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-testing-frameworks</artifactId>
<!-- Use whichever version is latest at the time of reading. This number is a placeholder. -->
<version>1.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>ossrh-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
</project> Notes for developing and testing this pluginThis plugin uses the All tests can be run from the command line using: ./mvnw verify If you're looking for more information on the output from a test, try checking the Using this plugin against itselfThe ./mvnw -Pbootstrap rewrite:dryRun Resource guides
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论