| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| * © 2016 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> |
| |
| <groupId>com.ibm.icu</groupId> |
| <artifactId>icu4j-root</artifactId> |
| <version>75.1</version> |
| <packaging>pom</packaging> |
| |
| <name>${proj-title} (${project.artifactId})</name> |
| <description>International Components for Unicode for Java (ICU4J) is a mature, widely used Java library |
| providing Unicode and Globalization support. |
| This is the base artifact with common settings, not intended to use directly.</description> |
| <url>https://icu.unicode.org/</url> |
| <inceptionYear>1995</inceptionYear> |
| |
| <organization> |
| <name>Unicode, Inc.</name> |
| <url>https://icu.unicode.org/</url> |
| </organization> |
| |
| <modules> |
| <module>main/framework</module> |
| <module>main/core</module> |
| <!-- For publishing to Maven Central --> |
| <module>main/charset</module> |
| <module>main/collate</module> |
| <module>main/currdata</module> |
| <module>main/langdata</module> |
| <module>main/regiondata</module> |
| <module>main/translit</module> |
| <module>main/common_tests</module> |
| <!-- Shaded jar for publishing to Maven Central --> |
| <module>main/icu4j</module> |
| <!-- For publishing to Maven Central. Not shaded, but depends on the shaded artifacts above. |
| Also contains all the project properties (developers, scm, etc) needed for maven publishing. |
| --> |
| <module>main/localespi</module> |
| |
| <module>demos</module> |
| <module>samples</module> |
| <module>tools/misc</module> |
| <module>tools/utilities-for-cldr</module> |
| <module>perf-tests</module> |
| </modules> |
| |
| <properties> |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| <maven.compiler.source>1.8</maven.compiler.source> |
| <maven.compiler.target>1.8</maven.compiler.target> |
| |
| <maven-central-repo-url>https://oss.sonatype.org</maven-central-repo-url> |
| <maven-central-releases-repo-url>${maven-central-repo-url}/service/local/staging/deploy/maven2</maven-central-releases-repo-url> |
| <maven-central-snapshots-repo-url>${maven-central-repo-url}/content/repositories/snapshots</maven-central-snapshots-repo-url> |
| |
| <junit.version>4.13.2</junit.version> |
| <junitparams.version>1.1.1</junitparams.version> |
| <gson.version>2.10.1</gson.version> |
| |
| <proj-title>International Components for Unicode for Java</proj-title> |
| <proj.displayname>${project.artifactId}</proj.displayname> |
| |
| <!-- Version update! --> |
| <icu.major.version>75</icu.major.version> |
| |
| <!-- Variables used to generate the javadoc --> |
| <!-- Version update! --> |
| <api.doc.version>${icu.major.version}</api.doc.version> |
| <icu4j.api.doc.window.title>ICU4J ${api.doc.version}</icu4j.api.doc.window.title> |
| <icu4j.api.doc.header>ICU4J ${api.doc.version}</icu4j.api.doc.header> |
| <icu4j.api.doc.copyright.footer><font size=-1>Copyright © 2016 Unicode, Inc. and others.</font></icu4j.api.doc.copyright.footer> |
| |
| <!-- Needs to be overriden in sub-modules --> |
| <icu4j.api.doc.root.dir>${project.basedir}</icu4j.api.doc.root.dir> |
| <icu4j.api.report.version>${icu.major.version}</icu4j.api.report.version> |
| |
| <!-- Used for the .jar Manifest files --> |
| <mf.Specification-Version>${icu.major.version}</mf.Specification-Version> |
| <mf.Implementation-Version>${project.version}</mf.Implementation-Version> |
| <mf.Bundle-Version>${project.version}</mf.Bundle-Version> |
| <mf.Bundle-RequiredExecutionEnvironment>JavaSE-1.8</mf.Bundle-RequiredExecutionEnvironment> |
| |
| <!-- For most modules artifactId does not have an "icu4j" prefix, so this is a good default --> |
| <module-name>${project.artifactId}</module-name> |
| |
| <!-- Manifest fields that rarely change, if ever --> |
| <mf.Specification-Title>${proj-title} (${proj.displayname})</mf.Specification-Title> |
| <mf.Implementation-Title>${proj-title} (${proj.displayname})</mf.Implementation-Title> |
| <mf.Bundle-Description>${proj-title} (${proj.displayname})</mf.Bundle-Description> |
| <mf.Bundle-SymbolicName>com.ibm.icu.${module-name}</mf.Bundle-SymbolicName> |
| <mf.Automatic-Module-Name>com.ibm.icu.${module-name}</mf.Automatic-Module-Name> |
| <mf.Bundle-Name>ICU4J ${proj.displayname}</mf.Bundle-Name> |
| |
| <mf.Specification-Vendor>Unicode, Inc.</mf.Specification-Vendor> |
| <mf.Implementation-Vendor>Unicode, Inc.</mf.Implementation-Vendor> |
| <mf.Bundle-Vendor>Unicode, Inc.</mf.Bundle-Vendor> |
| <mf.Implementation-Vendor-Id>org.unicode</mf.Implementation-Vendor-Id> |
| <mf.Manifest-Version>1.0</mf.Manifest-Version> |
| <mf.Bundle-ManifestVersion>2</mf.Bundle-ManifestVersion> |
| <mf.Bundle-Copyright>© 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html</mf.Bundle-Copyright> |
| </properties> |
| |
| <licenses> |
| <license> |
| <name>Unicode-3.0</name> |
| <url>https://raw.githubusercontent.com/unicode-org/icu/main/LICENSE</url> |
| <distribution>repo</distribution> |
| </license> |
| </licenses> |
| |
| <developers> |
| <developer> |
| <id>markusicu</id> |
| <name>Markus Scherer</name> |
| <organization>Google</organization> |
| <roles> |
| <role>Chair</role> |
| </roles> |
| </developer> |
| <developer> |
| <id>yumaoka</id> |
| <name>Yoshito Umaoka</name> |
| <organization>IBM</organization> |
| <roles> |
| <role>Vice chair</role> |
| </roles> |
| </developer> |
| </developers> |
| |
| <mailingLists> |
| <mailingList> |
| <name>icu-support</name> |
| <subscribe>https://lists.sourceforge.net/lists/listinfo/icu-support</subscribe> |
| <unsubscribe>https://lists.sourceforge.net/lists/listinfo/icu-support</unsubscribe> |
| <post>icu-support@lists.sourceforge.net</post> |
| <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=icu-support</archive> |
| </mailingList> |
| <mailingList> |
| <name>icu-announce</name> |
| <subscribe>https://lists.sourceforge.net/lists/listinfo/icu-announce</subscribe> |
| <unsubscribe>https://lists.sourceforge.net/lists/listinfo/icu-announce</unsubscribe> |
| <post>icu-announce@lists.sourceforge.net</post> |
| <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=icu-announce</archive> |
| </mailingList> |
| <mailingList> |
| <name>icu-design</name> |
| <subscribe>https://lists.sourceforge.net/lists/listinfo/icu-design</subscribe> |
| <unsubscribe>https://lists.sourceforge.net/lists/listinfo/icu-design</unsubscribe> |
| <post>icu-design@lists.sourceforge.net</post> |
| <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=icu-design</archive> |
| </mailingList> |
| </mailingLists> |
| |
| <scm> |
| <connection>scm:git:git://github.com/unicode-org/icu.git</connection> |
| <developerConnection>scm:git:git@github.com:unicode-org/icu.git</developerConnection> |
| <url>https://github.com/unicode-org/icu</url> |
| </scm> |
| |
| <issueManagement> |
| <system>JIRA</system> |
| <url>https://unicode-org.atlassian.net/projects/ICU</url> |
| </issueManagement> |
| |
| <distributionManagement> |
| <repository> |
| <id>icu4j-releases</id> |
| <name>ICU4J Central Repository</name> |
| <url>${maven-central-releases-repo-url}</url> |
| </repository> |
| <snapshotRepository> |
| <id>icu4j-snapshots</id> |
| <name>ICU4J Central Development Repository</name> |
| <url>${maven-central-snapshots-repo-url}</url> |
| </snapshotRepository> |
| </distributionManagement> |
| |
| <build> |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |
| <version>3.3.1</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-resources-plugin</artifactId> |
| <version>3.3.1</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <version>3.11.0</version> |
| <!-- Plugin bug, maven.compiler.* properties are not honored, see |
| https://issues.apache.org/jira/browse/MCOMPILER-545 |
| --> |
| <configuration> |
| <source>${maven.compiler.source}</source> |
| <target>${maven.compiler.target}</target> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <version>3.1.2</version> |
| <configuration> |
| <includes> |
| <!-- Some test files start with "IntlTest...". Many don't fit |
| the Surefire test file name default patterns. To be safe, use |
| a catchall pattern instead of the default patterns. |
| |
| FYI, the default patterns are documented on the website of the |
| testing plugin: |
| https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html |
| --> |
| <include>**/*.java</include> |
| </includes> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-failsafe-plugin</artifactId> |
| <version>3.1.2</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-install-plugin</artifactId> |
| <version>3.1.1</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-deploy-plugin</artifactId> |
| <version>3.1.1</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-site-plugin</artifactId> |
| <version>4.0.0-M9</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-source-plugin</artifactId> |
| <version>3.3.0</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-gpg-plugin</artifactId> |
| <version>3.1.0</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-project-info-reports-plugin</artifactId> |
| <version>3.4.5</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-shade-plugin</artifactId> |
| <version>3.5.0</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <version>3.6.0</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <version>3.6.0</version> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>3.4.0</version> |
| <executions> |
| <execution> |
| <!-- Workaround for Windows symlink issue: |
| https://issues.apache.org/jira/browse/MRESOURCES-237 |
| Note: The recommended fix there is to filter out the symlink files, which |
| would result in no license files in the .jar. That is not what we want. |
| Instead, this `<execution>` config copies the LICENSE file to `target` at build time. |
| --> |
| <id>add-resource</id> |
| <goals> |
| <goal>add-resource</goal> |
| </goals> |
| <configuration> |
| <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot> |
| <resources> |
| <resource> |
| <directory>${rootlocation}/..</directory> |
| <includes> |
| <include>LICENSE</include> |
| </includes> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| <execution> |
| <id>root-location</id> |
| <phase>initialize</phase> |
| <goals> |
| <goal>rootlocation</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-release-plugin</artifactId> |
| <version>3.0.1</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <version>3.3.0</version> |
| <executions> |
| <execution> |
| <id>enforce-maven</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <configuration> |
| <rules> |
| <requireMavenVersion> |
| <version>3.2.5</version> |
| </requireMavenVersion> |
| </rules> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <version>3.5.0</version> |
| <configuration> |
| <excludePackageNames>com.ibm.icu.impl,com.ibm.icu.impl.*,com.ibm.icu.dev.*,com.ibm.icu.samples,com.ibm.icu.samples.*</excludePackageNames> |
| <!-- |
| The ant project specified <doclint>reference,html</doclint>. |
| But that fails in main\core\src\main\java because maven enforces dependencies more strictly: |
| [ERROR] com\ibm\icu\text\UnicodeFilter.java:15: error: reference not found |
| [ERROR] * {@link com.ibm.icu.text.Transliterator} |
| [ERROR] com\ibm\icu\util\ULocale.java:100: error: reference not found |
| [ERROR] * {@link com.ibm.icu.text.Collator} |
| --> |
| <doclint>html</doclint> |
| <notimestamp>true</notimestamp> |
| <nodeprecatedlist>true</nodeprecatedlist> |
| <quiet>true</quiet> |
| <windowtitle>${icu4j.api.doc.window.title}</windowtitle> |
| <doctitle>${icu4j.api.doc.window.title}</doctitle> |
| <header>${icu4j.api.doc.header}</header> |
| <bottom>${icu4j.api.doc.copyright.footer}</bottom> |
| <stylesheetfile>stylesheet8.css</stylesheetfile> |
| <encoding>UTF-8</encoding> |
| <docencoding>UTF-8</docencoding> |
| <charset>UTF-8</charset> |
| <breakiterator>true</breakiterator> |
| <use>true</use> |
| <!-- <verbose>true</verbose> --> |
| <additionalJOptions> |
| <additionalJOption>-J-Djcitesourcepath=${icu4j.api.doc.root.dir}/samples/src/main/java${path.separator}${icu4j.api.doc.root.dir}/demos/src/main/java${path.separator}${icu4j.api.doc.root.dir}/main/core/src/main/java</additionalJOption> |
| <additionalJOption>-J-Dfile.encoding=UTF-8</additionalJOption> |
| <additionalJOption>-J-Djciteverbose=true</additionalJOption> |
| </additionalJOptions> |
| <taglets> |
| <taglet> |
| <tagletClass>com.ibm.icu.dev.tool.docs.ICUTaglet</tagletClass> |
| </taglet> |
| <taglet> |
| <tagletClass>ch.arrenbrecht.jcite.JCiteTaglet</tagletClass> |
| </taglet> |
| </taglets> |
| <tagletArtifacts> |
| <!-- To handle the ICU custom taglets (@icu, @draft, @stable, etc --> |
| <tagletArtifact> |
| <groupId>com.ibm.icu</groupId> |
| <artifactId>tools_build</artifactId> |
| <version>${project.version}</version> |
| </tagletArtifact> |
| <!-- Include code fragments from a .java file. --> |
| <tagletArtifact> |
| <groupId>org.mcraig</groupId> |
| <artifactId>jcite</artifactId> |
| <version>1.13.0</version> |
| </tagletArtifact> |
| <!-- Dependencies for org.mcraig:jcite --> |
| <tagletArtifact> |
| <groupId>commons-discovery</groupId> |
| <artifactId>commons-discovery</artifactId> |
| <version>0.5</version> |
| </tagletArtifact> |
| <tagletArtifact> |
| <groupId>commons-logging</groupId> |
| <artifactId>commons-logging</artifactId> |
| <version>1.2</version> |
| </tagletArtifact> |
| </tagletArtifacts> |
| <tags> |
| <tag> |
| <name>category</name> |
| <placement>a</placement> |
| <head>Category:</head> |
| </tag> |
| </tags> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-jar-plugin</artifactId> |
| <version>3.3.0</version> |
| <configuration> |
| <archive> |
| <manifest> |
| <addDefaultImplementationEntries>true</addDefaultImplementationEntries> |
| <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> |
| </manifest> |
| <manifestEntries> |
| <Automatic-Module-Name>${mf.Automatic-Module-Name}</Automatic-Module-Name> |
| <Bundle-Copyright>${mf.Bundle-Copyright}</Bundle-Copyright> |
| <Specification-Title>${mf.Specification-Title}</Specification-Title> |
| <Specification-Version>${mf.Specification-Version}</Specification-Version> |
| <Specification-Vendor>${mf.Specification-Vendor}</Specification-Vendor> |
| <Implementation-Title>${mf.Implementation-Title}</Implementation-Title> |
| <Implementation-Version>${mf.Implementation-Version}</Implementation-Version> |
| <Implementation-Vendor>${mf.Implementation-Vendor}</Implementation-Vendor> |
| <Implementation-Vendor-Id>${mf.Implementation-Vendor-Id}</Implementation-Vendor-Id> |
| <Bundle-ManifestVersion>${mf.Bundle-ManifestVersion}</Bundle-ManifestVersion> |
| <Bundle-Name>${mf.Bundle-Name}</Bundle-Name> |
| <Bundle-Description>${mf.Bundle-Description}</Bundle-Description> |
| <Bundle-SymbolicName>${mf.Bundle-SymbolicName}</Bundle-SymbolicName> |
| <Bundle-Version>${mf.Bundle-Version}</Bundle-Version> |
| <Bundle-Vendor>${mf.Bundle-Vendor}</Bundle-Vendor> |
| <Bundle-Copyright>${mf.Bundle-Copyright}</Bundle-Copyright> |
| <Bundle-RequiredExecutionEnvironment>${mf.Bundle-RequiredExecutionEnvironment}</Bundle-RequiredExecutionEnvironment> |
| </manifestEntries> |
| </archive> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>3.1.0</version> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| </plugin> |
| </plugins> |
| |
| </build> |
| |
| <profiles> |
| |
| <!-- This is used to create the *-sources.jar for individual modules --> |
| <profile> |
| <id>with_sources</id> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-source-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>attach-sources</id> |
| <goals> |
| <goal>jar-no-fork</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <excludes> |
| <exclude>/com/ibm/icu/impl/data/icudt*/**</exclude> |
| <exclude>/com/ibm/icu/impl/duration/impl/data/*.xml</exclude> |
| <exclude>/com/ibm/icu/impl/duration/impl/data/*.xml.escaped</exclude> |
| <exclude>/com/ibm/icu/impl/duration/impl/data/*.txt</exclude> |
| <exclude>/com/ibm/icu/ICUConfig.properties</exclude> |
| <exclude>/**/package.html</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <!-- This is used to create the *-javadoc.jar for individual modules --> |
| <profile> |
| <id>with_javadoc</id> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>attach-javadocs</id> |
| <goals> |
| <goal>jar</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <profile> |
| <id>with_signature</id> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-gpg-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>sign-artifacts</id> |
| <phase>verify</phase> |
| <goals> |
| <goal>sign</goal> |
| </goals> |
| <configuration> |
| <keyname>${gpg-keyname}</keyname> |
| <passphraseServerId>${gpg-keyname}</passphraseServerId> |
| <gpgArguments> |
| <arg>--pinentry-mode</arg> |
| <arg>loopback</arg> |
| </gpgArguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <!-- This is used to create "merged" javadoc for all modules combined. |
| Matches what is posted on a website (where icu4j / charset / localespi are all in one). |
| That's why you need to run this with `site`, but build the artifacts first (for the taglets): |
| mvn install -DskipTests -DskipITs |
| mvn site -DskipTests -DskipITs -P with_full_javadoc |
| --> |
| <profile> |
| <id>with_full_javadoc</id> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>aggregate</id> |
| <phase>site</phase> |
| <goals> |
| <goal>aggregate</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <!-- This is used to gather API data used to generate API reports |
| (regular, draft, deprecated, status consistency, etc.) |
| To run it: |
| mvn install -DskipITs -DskipTests |
| mvn site -DskipITs -DskipTests -P gatherapi |
| --> |
| <profile> |
| <id>gatherapi</id> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>aggregate</id> |
| <phase>site</phase> |
| <goals> |
| <goal>aggregate</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <!-- For incomplete doc tags javadoc fails with: |
| ``` |
| Error while creating javadoc report: |
| Exit code: 1 |
| Command line was: ... |
| Refer to the generated Javadoc files in '...' dir. |
| ``` |
| But in most cases these are not related to what we do here, which is API reporting. |
| We ignore them so that we can progess with what we really care. |
| --> |
| <failOnError>false</failOnError> |
| <useStandardDocletOptions>false</useStandardDocletOptions> |
| <doclet>com.ibm.icu.dev.tool.docs.GatherAPIData</doclet> |
| <docletArtifact> |
| <groupId>com.ibm.icu</groupId> |
| <artifactId>tools_build</artifactId> |
| <version>${project.version}</version> |
| </docletArtifact> |
| <additionalOptions> |
| <additionalOption>-name 'ICU4J ${mf.Implementation-Version}'</additionalOption> |
| <additionalOption>-output ${project.build.directory}/icu4j${icu4j.api.report.version}.api3</additionalOption> |
| <additionalOption>-internal</additionalOption> |
| <additionalOption>-version</additionalOption> |
| <additionalOption>-gzip</additionalOption> |
| </additionalOptions> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <!-- The tools/build module depends on the old tools.jar (jdk 1.8) |
| The com.sun.javadoc package was deprecated in Java 11, and has been removed for Java 17. |
| JDK 11 does not include tools.jar anymore. The code must be updated, see migration guide at |
| https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html#migration |
| --> |
| <profile> |
| <id>old_jdk_taglet</id> |
| <activation> |
| <jdk>[1.7,1.8]</jdk> |
| </activation> |
| <modules> |
| <module>tools/build</module> |
| </modules> |
| </profile> |
| |
| <!-- Starting with JDK 9, the Java compiler supports the −−release version. |
| Unlike source (checking the language features) and target (the version of the classes generated), |
| this option also checks that newer APIs are not used. |
| https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html |
| Would be nice if the maven-compiler-plugin would filter this out below JDK 9, but it does not. |
| So we must use an auto-activated profile for this option. |
| --> |
| <profile> |
| <id>newer_jdk</id> |
| <activation> |
| <jdk>[9,)</jdk> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <release>8</release> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <profile> |
| <!-- mvn test -ntp -DskipTests -DskipITs -P errorprone --> |
| <id>errorprone</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <source>${maven.compiler.source}</source> |
| <target>${maven.compiler.target}</target> |
| <encoding>UTF-8</encoding> |
| <!-- Use <compilerArg> to pass flags to errorprone. See https://errorprone.info/docs/flags --> |
| <showWarnings>true</showWarnings> |
| <compilerArgs> |
| <arg>-XDcompilePolicy=simple</arg> |
| <!-- |
| -XepAllErrorsAsWarnings: |
| If we let errors be errors they fail and stop the build, so we don't get a full report. |
| So we force them all to be reported as warning. |
| The drawback is that there are not errors now, they get mixed with the real warnings. |
| --> |
| <arg>-Xplugin:ErrorProne -XepAllErrorsAsWarnings</arg> |
| </compilerArgs> |
| <annotationProcessorPaths> |
| <path> |
| <groupId>com.google.errorprone</groupId> |
| <artifactId>error_prone_core</artifactId> |
| <version>2.25.0</version> |
| </path> |
| </annotationProcessorPaths> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| </profiles> |
| |
| </project> |