Skip to content

Commit

Permalink
Merge pull request #360 from nramc/359-bug-docker-build-and-push-take…
Browse files Browse the repository at this point in the history
…s-too-long

fix: open-rewrite profile added to handle ope rewrite tasks
  • Loading branch information
nramc authored Oct 21, 2024
2 parents 4295a9b + 5bc6253 commit 341eddc
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage -Dsonar.projectKey=nramc_journey-api
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -P coverage,open-rewrite -Dsonar.projectKey=nramc_journey-api

139 changes: 73 additions & 66 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,72 +204,6 @@
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>${rewrite-maven-plugin.version}</version>
<executions>

<execution>
<id>run-open-rewrite-execution</id>
<goals>
<goal>runNoFork</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<rewriteSkip>${rewrite-maven-plugin.skip.run-execution}</rewriteSkip>
</configuration>
</execution>
<execution>
<id>dry-run-open-rewrite-execution</id>
<goals>
<goal>dryRunNoFork</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<rewriteSkip>${rewrite-maven-plugin.skip.dry-run-execution}</rewriteSkip>
</configuration>
</execution>
</executions>
<configuration>
<failOnDryRunResults>true</failOnDryRunResults>
<activeRecipes>
<recipe>com.github.nramc.recipes.sources</recipe>
<recipe>org.openrewrite.java.security.OwaspTopTen.customized</recipe>
<recipe>com.github.nramc.recipes.testing</recipe>
</activeRecipes>
<activeStyles>
<style>org.openrewrite.java.IntelliJ</style>
</activeStyles>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-static-analysis</artifactId>
<version>${rewrite-static-analysis.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-recommendations</artifactId>
<version>${rewrite-recommendations.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-testing-frameworks</artifactId>
<version>${rewrite-testing-frameworks.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-java-security</artifactId>
<version>${rewrite-java-security.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-logging-frameworks</artifactId>
<version>${rewrite-logging-frameworks.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

Expand All @@ -286,6 +220,79 @@
</property>
</activation>
</profile>
<profile>
<id>open-rewrite</id>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>${rewrite-maven-plugin.version}</version>
<executions>

<execution>
<id>run-open-rewrite-execution</id>
<goals>
<goal>runNoFork</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<rewriteSkip>${rewrite-maven-plugin.skip.run-execution}</rewriteSkip>
</configuration>
</execution>
<execution>
<id>dry-run-open-rewrite-execution</id>
<goals>
<goal>dryRunNoFork</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<rewriteSkip>${rewrite-maven-plugin.skip.dry-run-execution}</rewriteSkip>
</configuration>
</execution>
</executions>
<configuration>
<failOnDryRunResults>true</failOnDryRunResults>
<activeRecipes>
<recipe>com.github.nramc.recipes.sources</recipe>
<recipe>org.openrewrite.java.security.OwaspTopTen.customized</recipe>
<recipe>com.github.nramc.recipes.testing</recipe>
</activeRecipes>
<activeStyles>
<style>org.openrewrite.java.IntelliJ</style>
</activeStyles>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-static-analysis</artifactId>
<version>${rewrite-static-analysis.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-recommendations</artifactId>
<version>${rewrite-recommendations.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-testing-frameworks</artifactId>
<version>${rewrite-testing-frameworks.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-java-security</artifactId>
<version>${rewrite-java-security.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-logging-frameworks</artifactId>
<version>${rewrite-logging-frameworks.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>coverage</id>
<build>
Expand Down

0 comments on commit 341eddc

Please sign in to comment.