blob: 41f105fa91bb0b643ccf58fa0fa35b91787afa8b [file] [edit]
<?xml version="1.0" encoding="UTF-8"?>
<!--
* © 2023 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-root</artifactId>
<version>78.0.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>tools_build</artifactId>
<properties>
<error_prone.version>2.25.0</error_prone.version>
<!-- Arguments for the errorprone report generation -->
<logFile>/tmp/errorprone.log</logFile>
<srcBaseUrl>https://github.com/unicode-org/icu/blob/main/</srcBaseUrl>
</properties>
<dependencies>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error_prone.version}</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!--
From icu4j:
mvn clean test -ntp -DskipTests -DskipITs -l /tmp/errorprone.log -P errorprone
mvn exec:java -f tools/build/ -P errorprone_report -DlogFile=/tmp/errorprone.log
The links to the source files go to the main GitHub repo (`main` branch).
But when we work locally, or in a fork / branch, the links might point to an incorrect file / line.
You can override the URL by passing -DsrcBaseUrl in the maven command line.
For local files it would be easy to do:
mvn exec:java -f tools/build/ -P errorprone_report -DsrcBaseUrl=$PWD/..
Note: jumping to a certain line does not work on local files.
This is a limitation in how browsers work.
So opening the file in an IDE is probably more practical.
-->
<id>errorprone_report</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.ibm.icu.dev.tool.errorprone.Main</mainClass>
<arguments>
<argument>--logFile</argument>
<argument>${logFile}</argument>
<argument>--srcBaseUrl</argument>
<argument>${srcBaseUrl}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>