Skip to content

Commit 341eddc

Browse files
authored
Merge pull request #360 from nramc/359-bug-docker-build-and-push-takes-too-long
fix: open-rewrite profile added to handle ope rewrite tasks
2 parents 4295a9b + 5bc6253 commit 341eddc

File tree

2 files changed

+74
-67
lines changed

2 files changed

+74
-67
lines changed

.github/workflows/ci-build-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ jobs:
4646
env:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
4848
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
49-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage -Dsonar.projectKey=nramc_journey-api
49+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -P coverage,open-rewrite -Dsonar.projectKey=nramc_journey-api
5050

pom.xml

+73-66
Original file line numberDiff line numberDiff line change
@@ -204,72 +204,6 @@
204204
<tagNameFormat>v@{project.version}</tagNameFormat>
205205
</configuration>
206206
</plugin>
207-
<plugin>
208-
<groupId>org.openrewrite.maven</groupId>
209-
<artifactId>rewrite-maven-plugin</artifactId>
210-
<version>${rewrite-maven-plugin.version}</version>
211-
<executions>
212-
213-
<execution>
214-
<id>run-open-rewrite-execution</id>
215-
<goals>
216-
<goal>runNoFork</goal>
217-
</goals>
218-
<phase>process-sources</phase>
219-
<configuration>
220-
<rewriteSkip>${rewrite-maven-plugin.skip.run-execution}</rewriteSkip>
221-
</configuration>
222-
</execution>
223-
<execution>
224-
<id>dry-run-open-rewrite-execution</id>
225-
<goals>
226-
<goal>dryRunNoFork</goal>
227-
</goals>
228-
<phase>prepare-package</phase>
229-
<configuration>
230-
<rewriteSkip>${rewrite-maven-plugin.skip.dry-run-execution}</rewriteSkip>
231-
</configuration>
232-
</execution>
233-
</executions>
234-
<configuration>
235-
<failOnDryRunResults>true</failOnDryRunResults>
236-
<activeRecipes>
237-
<recipe>com.github.nramc.recipes.sources</recipe>
238-
<recipe>org.openrewrite.java.security.OwaspTopTen.customized</recipe>
239-
<recipe>com.github.nramc.recipes.testing</recipe>
240-
</activeRecipes>
241-
<activeStyles>
242-
<style>org.openrewrite.java.IntelliJ</style>
243-
</activeStyles>
244-
</configuration>
245-
<dependencies>
246-
<dependency>
247-
<groupId>org.openrewrite.recipe</groupId>
248-
<artifactId>rewrite-static-analysis</artifactId>
249-
<version>${rewrite-static-analysis.version}</version>
250-
</dependency>
251-
<dependency>
252-
<groupId>org.openrewrite.recipe</groupId>
253-
<artifactId>rewrite-recommendations</artifactId>
254-
<version>${rewrite-recommendations.version}</version>
255-
</dependency>
256-
<dependency>
257-
<groupId>org.openrewrite.recipe</groupId>
258-
<artifactId>rewrite-testing-frameworks</artifactId>
259-
<version>${rewrite-testing-frameworks.version}</version>
260-
</dependency>
261-
<dependency>
262-
<groupId>org.openrewrite.recipe</groupId>
263-
<artifactId>rewrite-java-security</artifactId>
264-
<version>${rewrite-java-security.version}</version>
265-
</dependency>
266-
<dependency>
267-
<groupId>org.openrewrite.recipe</groupId>
268-
<artifactId>rewrite-logging-frameworks</artifactId>
269-
<version>${rewrite-logging-frameworks.version}</version>
270-
</dependency>
271-
</dependencies>
272-
</plugin>
273207
</plugins>
274208
</build>
275209

@@ -286,6 +220,79 @@
286220
</property>
287221
</activation>
288222
</profile>
223+
<profile>
224+
<id>open-rewrite</id>
225+
<build>
226+
<plugins>
227+
<plugin>
228+
<groupId>org.openrewrite.maven</groupId>
229+
<artifactId>rewrite-maven-plugin</artifactId>
230+
<version>${rewrite-maven-plugin.version}</version>
231+
<executions>
232+
233+
<execution>
234+
<id>run-open-rewrite-execution</id>
235+
<goals>
236+
<goal>runNoFork</goal>
237+
</goals>
238+
<phase>process-sources</phase>
239+
<configuration>
240+
<rewriteSkip>${rewrite-maven-plugin.skip.run-execution}</rewriteSkip>
241+
</configuration>
242+
</execution>
243+
<execution>
244+
<id>dry-run-open-rewrite-execution</id>
245+
<goals>
246+
<goal>dryRunNoFork</goal>
247+
</goals>
248+
<phase>prepare-package</phase>
249+
<configuration>
250+
<rewriteSkip>${rewrite-maven-plugin.skip.dry-run-execution}</rewriteSkip>
251+
</configuration>
252+
</execution>
253+
</executions>
254+
<configuration>
255+
<failOnDryRunResults>true</failOnDryRunResults>
256+
<activeRecipes>
257+
<recipe>com.github.nramc.recipes.sources</recipe>
258+
<recipe>org.openrewrite.java.security.OwaspTopTen.customized</recipe>
259+
<recipe>com.github.nramc.recipes.testing</recipe>
260+
</activeRecipes>
261+
<activeStyles>
262+
<style>org.openrewrite.java.IntelliJ</style>
263+
</activeStyles>
264+
</configuration>
265+
<dependencies>
266+
<dependency>
267+
<groupId>org.openrewrite.recipe</groupId>
268+
<artifactId>rewrite-static-analysis</artifactId>
269+
<version>${rewrite-static-analysis.version}</version>
270+
</dependency>
271+
<dependency>
272+
<groupId>org.openrewrite.recipe</groupId>
273+
<artifactId>rewrite-recommendations</artifactId>
274+
<version>${rewrite-recommendations.version}</version>
275+
</dependency>
276+
<dependency>
277+
<groupId>org.openrewrite.recipe</groupId>
278+
<artifactId>rewrite-testing-frameworks</artifactId>
279+
<version>${rewrite-testing-frameworks.version}</version>
280+
</dependency>
281+
<dependency>
282+
<groupId>org.openrewrite.recipe</groupId>
283+
<artifactId>rewrite-java-security</artifactId>
284+
<version>${rewrite-java-security.version}</version>
285+
</dependency>
286+
<dependency>
287+
<groupId>org.openrewrite.recipe</groupId>
288+
<artifactId>rewrite-logging-frameworks</artifactId>
289+
<version>${rewrite-logging-frameworks.version}</version>
290+
</dependency>
291+
</dependencies>
292+
</plugin>
293+
</plugins>
294+
</build>
295+
</profile>
289296
<profile>
290297
<id>coverage</id>
291298
<build>

0 commit comments

Comments
 (0)