null-markeder
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>li.selman</groupId>
<artifactId>null-markeder</artifactId>
<version>1.3.0</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<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>li.selman</groupId>
<artifactId>null-markeder</artifactId>
<version>1.3.0</version>
<packaging>jar</packaging>
<name>null-markeder</name>
<description>A library and ArchUnit-based test to ensure that every package in a Java project contains a
package-info.java file annotated with JSpecify's @NullMarked annotation.</description>
<url>https://github.com/haisi/null-markeder</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>haisi</id>
<name>Hasan Selman Kara</name>
<email>hasan.selman.kara@gmail.com</email>
<url>https://github.com/haisi</url>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/haisi/null-markeder.git</connection>
<developerConnection>scm:git:ssh://git@github.com/haisi/null-markeder.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/haisi/null-markeder</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/haisi/null-markeder/issues</url>
</issueManagement>
<distributionManagement>
<repository>
<id>staging-local</id>
<name>Local Staging Repository</name>
<url>file://${project.build.directory}/staging-deploy</url>
</repository>
</distributionManagement>
<properties>
<archunit.version>1.4.2</archunit.version>
<assertj.version>3.27.7</assertj.version>
<error-prone-core.version>2.50.0</error-prone-core.version>
<!-- Properties using which additional Error Prone flags can be specified. -->
<error-prone.patch-args/>
<javaparser.version>3.28.2</javaparser.version>
<jspecify.version>1.0.0</jspecify.version>
<junit.version>6.1.2</junit.version>
<maven.compiler.release>25</maven.compiler.release>
<nullaway.version>0.13.8</nullaway.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-core</artifactId>
<version>${javaparser.version}</version>
</dependency>
<dependency>
<!-- Provides annotations such as @Var to tell error-prone something is non-constant -->
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${error-prone-core.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>${jspecify.version}</version>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>${archunit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<!-- Runs the tests themselves - kept active in every profile, including 'quick'. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
</plugin>
<plugin>
<!--
Mutation testing. Deliberately has no <executions>, so it never runs as part of the
normal build lifecycle (`mvn test`/`mvn verify`) - only when invoked directly via
`mvn org.pitest:pitest-maven:mutationCoverage`, which is what the nightly PIT
GitHub Actions workflow does (see .github/workflows/pit-mutation-testing.yml).
-->
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.25.8</version>
<configuration>
<targetClasses>
<param>li.selman.nullmarkeder.*</param>
</targetClasses>
<targetTests>
<param>li.selman.nullmarkeder.*</param>
</targetTests>
<outputFormats>
<outputFormat>HTML</outputFormat>
<outputFormat>XML</outputFormat>
</outputFormats>
<!-- Overwrite the previous report on every run instead of accumulating a new
timestamped directory each time. -->
<timestampedReports>false</timestampedReports>
<reportsDirectory>${project.build.directory}/pit-reports</reportsDirectory>
<!-- Small library, single class under test - a modest thread count is plenty
and keeps the nightly run quick. -->
<threads>4</threads>
</configuration>
<dependencies>
<dependency>
<!-- Lets PIT discover and run the project's JUnit 5 tests. -->
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!--
All quality-gate plugins live here instead of in <build><plugins>, so that running with
-Dquick (which deactivates this profile, see its activation below) skips every one of them
and falls back to a bare `javac` compile plus tests - handy while iterating locally.
Active by default; add -Dquick to disable it, e.g. `./mvnw verify -Dquick`.
-->
<id>qa</id>
<activation>
<property>
<name>!quick</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<!--
- Code formatter verifying and applying the palantir-java-format.
- Runs as part of the verify phase.
- Apart from spotless:check, the plugin can also auto format the code using 'mvn spotless:apply'
- Install the IntelliJ plugin and configure your IntelliJ JRE Config
https://plugins.jetbrains.com/plugin/13180-palantir-java-format
- IJ > Settings > "palantir java format settings" > enable
See for more infos: https://github.com/palantir/palantir-java-format
-->
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<java>
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#java -->
<palantirJavaFormat>
<style>PALANTIR</style>
</palantirJavaFormat>
<removeUnusedImports/>
<!-- self-explanatory -->
<formatAnnotations/>
<!-- fixes formatting of type annotations, see below -->
</java>
<pom>
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#maven-pom -->
<sortPom>
<!-- https://github.com/Ekryd/sortpom/wiki/Parameters -->
<nrOfIndentSpace>4</nrOfIndentSpace>
<encoding>${project.build.sourceEncoding}</encoding>
<predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
<sortDependencies>scope,groupId,artifactId</sortDependencies>
<sortDependencyExclusions>groupId,artifactId</sortDependencyExclusions>
<sortModules>true</sortModules>
<sortPlugins>groupId,artifactId</sortPlugins>
<!-- Sorts Maven pom properties alphabetically.
Affects both project/properties and project/profiles/profile/properties. -->
<sortProperties>true</sortProperties>
</sortPom>
</pom>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<checkstyleRules>
<module name="Checker">
<!-- Flags plain http:// URLs (should be https://) in every scanned file. -->
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck"/>
<!-- We only enable rules that are not enforced by
Error Prone or automatically corrected through
application of google-java-format (GJF). -->
<module name="TreeWalker">
<module name="IllegalImport">
<!-- illegalClasses takes a single comma-separated list; with regexp=true
each entry is matched as a regular expression against the import. -->
<property name="regexp" value="true"/>
<property name="illegalClasses" value=" org\.jetbrains\.annotations\.CheckReturnValue, org\.jetbrains\.annotations\.VisibleForTesting, io\.micrometer\.core\.lang\.Nullable, javax\.annotation\.Nullable, org\.springframework\.lang\.Nullable, org\.testng\.AssertJUnit(\..*?)?"/>
<!-- Instead, please use, respectively:
`com.google.errorprone.annotations.CheckReturnValue`,
`com.google.common.annotations.VisibleForTesting`,
`org.jspecify.annotations.Nullable` (x3),
`org.assertj.core.api.Assertions`. -->
</module>
</module>
</module>
</checkstyleRules>
<excludeGeneratedSources>true</excludeGeneratedSources>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<resourceIncludes>**/*</resourceIncludes>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>13.8.0</version>
</dependency>
<dependency>
<groupId>io.spring.nohttp</groupId>
<artifactId>nohttp-checkstyle</artifactId>
<version>0.0.11</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-checkstyle</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!--
Only declared here (not in the base build): with this profile inactive
(-Dquick), Maven still compiles via its default lifecycle binding, using
maven.compiler.release/project.build.sourceEncoding from <properties> - just
without Error Prone, NullAway, or -Werror slowing the compile down.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<encoding>UTF-8</encoding>
<compilerArgs combine.children="append">
<!-- https://docs.oracle.com/en/java/javase/21/docs/specs/man/javac.html -->
<!--
Enable all warnings
We turn off:
- 'serial' because we don't use Java serialization (and all it does is complain about the serialVersionUID)
- 'processing' because it complains about every annotation
-->
<arg>-Xlint:all,-serial,-processing,-varargs</arg>
<!-- Terminate compilation when *warnings* occur -->
<arg>-Werror</arg>
<!--
Error Prone Config: https://errorprone.info/docs/flags
Mainly based on: https://github.com/PicnicSupermarket/error-prone-support/blob/master/pom.xml
-->
<arg>
-Xplugin:ErrorProne -Xep:Var:ERROR -Xep:StringSplitter:OFF
<!--
NullAway Configs
https://github.com/uber/NullAway/wiki/Configuration
-->
-XepOpt:NullAway:AnnotatedPackages=li.selman.nullmarkeder
<!--
Calling .get() on an Optional value that hasn't been previously tested with Optional.isPresent(...)
will result in an error.
https://github.com/uber/NullAway/wiki/Configuration#optional-emptiness-check
-->
-XepOpt:NullAway:CheckOptionalEmptiness=true
-XepOpt:IdentifierName:AllowInitialismsInTypeName=true
-XepOpt:InlineMe:SkipInliningsWithComments=false
<!-- https://github.com/google/error-prone/issues/2910 -->
-XepOpt:Nullness:Conservative=false
<!-- We don't target JDK 8. -->
-Xep:Java8ApiChecker:OFF
<!-- We don't target Android. -->
-Xep:StaticOrDefaultInterfaceMethod:OFF
<!-- We generally discourage `var` use. -->
-Xep:Varifier:OFF
<!-- Yoda conditions are not always more readable than the alternative. -->
-Xep:YodaCondition:OFF
-XepOpt:CheckReturnValue:CheckAllConstructors=true
<!-- Append additional custom arguments. -->
${error-prone.patch-args}
</arg>
<!--
The Error Prone plugin makes certain
assumptions about the state of the AST at the
moment it is invoked. Those assumptions require
the `simple` compile policy. This flag may be
dropped after resolution of
https://bugs.openjdk.java.net/browse/JDK-8155674.
-->
<arg>-XDcompilePolicy=simple</arg>
<!--
Similarly, Error Prone requires that flow
analysis has been performed, e.g. to determine
whether variables are effectively final. This
flag may be dropped if it ever becomes the
default. See
https://bugs.openjdk.org/browse/JDK-8134117.
-->
<arg>--should-stop=ifError=FLOW</arg>
</compilerArgs>
<annotationProcessorPaths>
<!--
- Analyses AST to spot bugs: https://errorprone.info/bugpatterns
- Can be extended with custom or third-party bug patterns: https://error-prone.picnic.tech/
- Can automatically patch code not matching a patter
- Can be extended with custom or third-part patchers
- Install IJ plugin: https://plugins.jetbrains.com/plugin/7349-error-prone-compiler
- Configure Settings | Compiler | Java Compiler | Use compiler: Javac with error-prone
- make sure Settings | Compiler | Use external build is NOT selected.
-->
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error-prone-core.version}</version>
</path>
<!--
- Helps eliminate NullPointerExceptions
- Requires error prone
See for more: https://github.com/uber/NullAway/wiki
-->
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<doclint>none</doclint>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!--
Renders the surefire-reports XML (already written by the `test` phase) as a browsable
HTML test report at target/site/tests/index.html, published to the website by
.github/workflows/pages.yml.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.5.6</version>
<executions>
<execution>
<id>generate-test-report</id>
<goals>
<goal>report-only</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<outputDirectory>${project.build.directory}/site/tests</outputDirectory>
<outputName>index</outputName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.15</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<phase>test</phase>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<minimum>1.00</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<minimum>1.00</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>