Skip to content

Commit 2d094cf

Browse files
Copilotjairmyree
andcommitted
Restore maven-checkstyle-plugin and spotbugs-maven-plugin
Co-authored-by: jairmyree <[email protected]>
1 parent 4ae3555 commit 2d094cf

File tree

1 file changed

+67
-4
lines changed

1 file changed

+67
-4
lines changed

sdk/tools/azure-openrewrite/pom.xml

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,14 @@
222222
<version>2.10.1</version> <!-- {x-version-update;com.azure:azure-security-keyvault-jca;dependency} -->
223223
<scope>test</scope>
224224
</dependency>
225+
<!-- Dependency not available in Maven Central - would need to be built locally
225226
<dependency>
226227
<groupId>com.azure.v2</groupId>
227228
<artifactId>azure-core</artifactId>
228-
<version>2.0.0-beta.1</version> <!-- {x-version-update;com.azure.v2:azure-core;dependency} -->
229+
<version>2.0.0-beta.1</version>
229230
<scope>test</scope>
230231
</dependency>
232+
-->
231233
</dependencies>
232234
</profile>
233235

@@ -312,12 +314,14 @@
312314
<version>1.0.0-beta.10</version> <!-- {x-version-update;io.clientcore:core;dependency} -->
313315
<scope>provided</scope>
314316
</dependency>
317+
<!-- Dependency not available in Maven Central - would need to be built locally
315318
<dependency>
316319
<groupId>com.azure.v2</groupId>
317320
<artifactId>azure-core</artifactId>
318-
<version>2.0.0-beta.1</version> <!-- {x-version-update;com.azure.v2:azure-core;dependency} -->
321+
<version>2.0.0-beta.1</version>
319322
<scope>provided</scope>
320323
</dependency>
324+
-->
321325
</dependencies>
322326
</profile>
323327
</profiles>
@@ -379,8 +383,67 @@
379383
</executions>
380384
</plugin>
381385

382-
383-
386+
<!-- This plugin scans checkstyle issues in the code -->
387+
<plugin>
388+
<groupId>org.apache.maven.plugins</groupId>
389+
<artifactId>maven-checkstyle-plugin</artifactId>
390+
<version>3.6.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-checkstyle-plugin;external_dependency} -->
391+
<dependencies>
392+
<dependency>
393+
<groupId>com.azure</groupId>
394+
<artifactId>sdk-build-tools</artifactId>
395+
<version>1.0.0</version> <!-- {x-version-update;com.azure:sdk-build-tools;external_dependency} -->
396+
</dependency>
397+
<dependency>
398+
<groupId>com.puppycrawl.tools</groupId>
399+
<artifactId>checkstyle</artifactId>
400+
<version>9.3</version> <!-- {x-version-update;com.puppycrawl.tools:checkstyle;external_dependency} -->
401+
</dependency>
402+
</dependencies>
403+
<configuration>
404+
<configLocation>${project.basedir}/../../../eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml</configLocation>
405+
<suppressionsLocation>${project.basedir}/../../../eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
406+
<headerLocation>${project.basedir}/../../../eng/code-quality-reports/src/main/resources/checkstyle/java.header</headerLocation>
407+
<propertyExpansion>samedir=</propertyExpansion>
408+
<consoleOutput>true</consoleOutput>
409+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
410+
<linkXRef>true</linkXRef>
411+
<failsOnError>true</failsOnError>
412+
<failOnViolation>true</failOnViolation>
413+
</configuration>
414+
</plugin>
415+
<!-- This plugin scans reports spotbugs in the code -->
416+
<plugin>
417+
<groupId>com.github.spotbugs</groupId>
418+
<artifactId>spotbugs-maven-plugin</artifactId>
419+
<version>4.8.3.1</version> <!-- {x-version-update;com.github.spotbugs:spotbugs-maven-plugin;external_dependency} -->
420+
<dependencies>
421+
<dependency>
422+
<groupId>com.azure</groupId>
423+
<artifactId>sdk-build-tools</artifactId>
424+
<version>1.0.0</version> <!-- {x-version-update;com.azure:sdk-build-tools;external_dependency} -->
425+
</dependency>
426+
<dependency>
427+
<groupId>com.github.spotbugs</groupId>
428+
<artifactId>spotbugs</artifactId>
429+
<version>4.8.3</version> <!-- {x-version-update;com.github.spotbugs:spotbugs;external_dependency} -->
430+
</dependency>
431+
<!-- Needed as the version of Spotbugs being used isn't compatible is Java 18+ without this. -->
432+
<dependency>
433+
<groupId>org.ow2.asm</groupId>
434+
<artifactId>asm</artifactId>
435+
<version>9.8</version> <!-- {x-version-update;org.ow2.asm:asm;external_dependency} -->
436+
</dependency>
437+
</dependencies>
438+
<configuration>
439+
<effort>max</effort>
440+
<threshold>Low</threshold>
441+
<xmlOutput>true</xmlOutput>
442+
<spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs</spotbugsXmlOutputDirectory>
443+
<excludeFilterFile>${project.basedir}/../../../eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml</excludeFilterFile>
444+
<fork>true</fork>
445+
</configuration>
446+
</plugin>
384447

385448
<plugin>
386449
<groupId>com.azure.tools</groupId>

0 commit comments

Comments
 (0)