Skip to content

Commit

Permalink
Improvements on the template for maven users (#56)
Browse files Browse the repository at this point in the history
* Improvements on the template for maven users

Signed-off-by: Adriano Machado <[email protected]>

* Minor touch ups

---------

Signed-off-by: Adriano Machado <[email protected]>
Co-authored-by: Tim te Beek <[email protected]>
  • Loading branch information
2 people authored and Philzen committed Jun 24, 2024
1 parent 08ef39a commit 7f98c0f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ target/
.idea/
out/
src/main/generated/
.vscode/
*.iml
File renamed without changes.
68 changes: 64 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencies>
Expand All @@ -17,6 +18,7 @@
<artifactId>lombok</artifactId>
<version>1.18.32</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<!-- Refaster style recipes need the rewrite-templating annotation processor and dependency for generated recipes -->
Expand All @@ -30,6 +32,7 @@
<artifactId>error_prone_core</artifactId>
<version>2.28.0</version>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.google.auto.service</groupId>
Expand Down Expand Up @@ -92,7 +95,7 @@
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-recipe-bom</artifactId>
<version>2.11.1</version>
<version>2.13.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -129,18 +132,75 @@
<path>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-templating</artifactId>
<version>1.8.1</version>
<version>1.11.1</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>copy</id>
<phase>process-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<!-- Add any additional dependencies required for the JavaParser's classpath -->
<artifactItem>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.basedir}/src/main/resources/META-INF/rewrite/classpath</outputDirectory>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
<!--
Only needed when you want to apply the OpenRewriteBestPractices recipe to your recipes through
./mvnw rewrite:run -Drewrite.activeRecipes=org.openrewrite.recipes.OpenRewriteBestPractices
-->
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.34.1</version>
<configuration>
<failOnDryRunResults>true</failOnDryRunResults>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-recommendations</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 7f98c0f

Please sign in to comment.