Unverified Commit 5618dad7 authored by Ingo Bauersachs's avatar Ingo Bauersachs Committed by GitHub
Browse files

Build improvements (#60)

* Fix order of expected vs. actual

* Fix decimal formatting

* Replace deprecated method

Directly use null/empty, we don't want to pull in an Apache
commons lib here.

* Fix generics usage

* Update dependencies, add GH actions build

* Set pom indent to 4 spaces
parent 31c18c54
[pom.xml]
indent_style = space
indent_size = 4
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '1.8', '11' ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache Maven dependencies
uses: actions/cache@v1
with:
path: ~/.m2
key: m2
- name: Build with Maven
run: mvn -B install
......@@ -3,9 +3,9 @@ This project contains a set of basic Java utilities used in Jitsi
projects.
The aim is to reduce the interdependency between the different Jitsi
projects. For example we used to place code which needed to be shared
projects. For example, we used to place code which needed to be shared
between ice4j, libjitsi and jitsi-media-transform in ice4j. This was
not great, because neither libjitsi not jitsi-media-transform need
not great, because neither libjitsi nor jitsi-media-transform need
to depend on ice4j.
This project's external dependencies should be kept to a minimum, and
......
<?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">
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>
......@@ -72,76 +72,31 @@
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
<jvmTarget>${java.version}</jvmTarget>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>1.4.2</version>
<executions>
<execution>
<id>attach-sources</id>
<id>check</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
</configuration>
<dependencies>
<dependency>
<groupId>com.pinterest</groupId>
<artifactId>ktlint</artifactId>
<version>0.36.0</version>
</dependency>
<!-- additional 3rd party ruleset(s) can be specified here -->
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>ktlint</id>
<phase>verify</phase>
<configuration>
<target name="ktlint">
<java taskname="ktlint" dir="${basedir}" fork="true" failonerror="true"
classpathref="maven.plugin.classpath" classname="com.pinterest.ktlint.Main">
<arg value="src/**/*.kt"/>
<!-- to generate report in checkstyle format prepend following args: -->
<!--
<arg value="[dash][dash]reporter=plain"/>
<arg value="[dash][dash]reporter=checkstyle,output=${project.build.directory}/ktlint.xml"/>
-->
<!-- see https://github.com/shyiko/ktlint#usage for more -->
</java>
</target>
</configuration>
<goals><goal>run</goal></goals>
</execution>
<execution>
<id>ktlint-format</id>
<configuration>
<target name="ktlint">
<java taskname="ktlint" dir="${basedir}" fork="true" failonerror="true"
classpathref="maven.plugin.classpath" classname="com.pinterest.ktlint.Main">
<arg value="-F"/>
<arg value="src/**/*.kt"/>
</java>
</target>
</configuration>
<goals><goal>run</goal></goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.pinterest</groupId>
<artifactId>ktlint</artifactId>
<version>0.36.0</version>
</dependency>
<!-- additional 3rd party ruleset(s) can be specified here -->
</dependencies>
</plugin>
</plugins>
</build>
......
<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>
<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>org.jitsi</groupId>
<artifactId>jitsi-utils-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<parent>
<groupId>org.jitsi</groupId>
<artifactId>jitsi-utils-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>jitsi-utils</artifactId>
<packaging>bundle</packaging>
<artifactId>jitsi-utils</artifactId>
<packaging>bundle</packaging>
<name>jitsi-utils</name>
<url>https://github.com/jitsi/jitsi-utils</url>
<scm>
<url>https://github.com/jitsi/jitsi-utils</url>
<connection>scm:git:https://github.com/jitsi/jitsi-utils.git</connection>
<developerConnection>scm:git:https://github.com/jitsi/jitsi-utils.git</developerConnection>
<tag>HEAD</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<!-- json-simple 1.1.1 incorrectly listed junit as a compile dependency rather than a test dependency.
This has been fixed in its github repo but a new release hasn't been pushed to maven. -->
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.11</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<optional>true</optional>
</dependency>
<dependencies>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<!-- json-simple 1.1.1 incorrectly listed junit as a compile dependency rather than a test dependency.
This has been fixed in its github repo but a new release hasn't been pushed to maven. -->
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>15.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.2-jre</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.spotbugs/spotbugs-annotations -->
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>${spotbugs.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<_removeheaders>Bnd-*, Tool, Require-Capability, Include-Resource
</_removeheaders>
<!--
Prevent importing a specific version. Some libraries
like Guava rapidly change major versions, which is a pain for
downstream consumers wanting a different/newer version than
used here.
-->
<Import-Package>*;version=!</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -44,12 +44,12 @@ public final class JNIUtils
loadLibrary(libname, null, classLoader);
}
public static void loadLibrary(String libname, Class clazz)
public static <T> void loadLibrary(String libname, Class<T> clazz)
{
loadLibrary(libname, clazz, clazz.getClassLoader());
}
private static void loadLibrary(String libname, Class clazz,
private static <T> void loadLibrary(String libname, Class<T> clazz,
ClassLoader classLoader)
{
try
......@@ -129,8 +129,8 @@ public final class JNIUtils
* @param clazz The class where to load it.
* @param isAbsolute Whether the library is name or path.
*/
private static void loadNativeInClassloader(
String lib, Class clazz, boolean isAbsolute)
private static <T> void loadNativeInClassloader(
String lib, Class<T> clazz, boolean isAbsolute)
{
try
{
......
......@@ -71,7 +71,7 @@ public class PasswordUtil
{
for (String passArg : passwordArgs)
{
if (StringUtils.isNullOrEmpty(passArg))
if (passArg == null || passArg.trim().isEmpty())
continue;
string = replacePassword(string, passArg);
......
......@@ -16,6 +16,7 @@
package org.jitsi.utils;
import java.text.*;
import java.util.*;
/**
* Provides utility methods for converting between different time formats.
......@@ -179,9 +180,23 @@ public class TimeUtils
}
/** Format string for formatTimeAsFullMillis to print milliseconds-per-second */
private static DecimalFormat trailingMilliFormat = new DecimalFormat("000");
private static final ThreadLocal<DecimalFormat> trailingMilliFormat;
/** Format string for formatTimeAsFullMillis to print nanoseconds-per-millisecond */
private static DecimalFormat nanosPerMilliFormat = new DecimalFormat(".######");
private static final ThreadLocal<DecimalFormat> nanosPerMilliFormat;
static
{
// DecimalFormat is NOT thread safe!
trailingMilliFormat =
ThreadLocal.withInitial(() -> new DecimalFormat("000"));
nanosPerMilliFormat = ThreadLocal.withInitial(() -> {
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
dfs.setDecimalSeparator('.');
return new DecimalFormat(".######", dfs);
});
}
/**
* Formats a time -- represented by (long seconds, int nanos) -- as
......@@ -211,7 +226,7 @@ public class TimeUtils
if (secs != 0)
{
builder.append(secs);
builder.append(trailingMilliFormat.format(millis));
builder.append(trailingMilliFormat.get().format(millis));
}
else
{
......@@ -219,7 +234,7 @@ public class TimeUtils
}
if (nanosPerMilli != 0)
{
builder.append(nanosPerMilliFormat.format(nanosPerMilli / 1e6));
builder.append(nanosPerMilliFormat.get().format(nanosPerMilli / 1e6));
}
return builder.toString();
......
......@@ -9,31 +9,31 @@ public class TimeUtilsTest
@Test
public void testTimestampFormats()
{
assertEquals(TimeUtils.formatTimeAsFullMillis(0, 0), "0");
assertEquals(TimeUtils.formatTimeAsFullMillis(0, 1), "0.000001");
assertEquals(TimeUtils.formatTimeAsFullMillis(0, 1_000), "0.001");
assertEquals(TimeUtils.formatTimeAsFullMillis(0, 1_000_000), "1");
assertEquals(TimeUtils.formatTimeAsFullMillis(0, 1_001_000), "1.001");
assertEquals(TimeUtils.formatTimeAsFullMillis(1, 0), "1000");
assertEquals(TimeUtils.formatTimeAsFullMillis(1, 1), "1000.000001");
assertEquals(TimeUtils.formatTimeAsFullMillis(1, 1_000), "1000.001");
assertEquals(TimeUtils.formatTimeAsFullMillis(1, 1_000_000), "1001");
assertEquals(TimeUtils.formatTimeAsFullMillis(1570545261,0), "1570545261000");
assertEquals(TimeUtils.formatTimeAsFullMillis(1570545261,234000000), "1570545261234");
assertEquals(TimeUtils.formatTimeAsFullMillis(1570545261,234770582), "1570545261234.770582");
assertEquals(TimeUtils.formatTimeAsFullMillis(-1, 0), "-1000");
assertEquals(TimeUtils.formatTimeAsFullMillis(-1, 1), "-999.999999");
assertEquals(TimeUtils.formatTimeAsFullMillis(-1, 999_999_999), "-0.000001");
assertEquals(TimeUtils.formatTimeAsFullMillis(-2, 1), "-1999.999999");
assertEquals(TimeUtils.formatTimeAsFullMillis(Long.MAX_VALUE, 0), "9223372036854775807000");
assertEquals(TimeUtils.formatTimeAsFullMillis(Long.MAX_VALUE, 999_999_999), "9223372036854775807999.999999");
assertEquals(TimeUtils.formatTimeAsFullMillis(Long.MIN_VALUE, 0), "-9223372036854775808000");
assertEquals(TimeUtils.formatTimeAsFullMillis(Long.MIN_VALUE, 1), "-9223372036854775807999.999999");
assertEquals("0", TimeUtils.formatTimeAsFullMillis(0, 0));
assertEquals("0.000001", TimeUtils.formatTimeAsFullMillis(0, 1));
assertEquals("0.001", TimeUtils.formatTimeAsFullMillis(0, 1_000));
assertEquals("1", TimeUtils.formatTimeAsFullMillis(0, 1_000_000));
assertEquals("1.001", TimeUtils.formatTimeAsFullMillis(0, 1_001_000));
assertEquals("1000", TimeUtils.formatTimeAsFullMillis(1, 0));
assertEquals("1000.000001", TimeUtils.formatTimeAsFullMillis(1, 1));
assertEquals("1000.001", TimeUtils.formatTimeAsFullMillis(1, 1_000));
assertEquals("1001", TimeUtils.formatTimeAsFullMillis(1, 1_000_000));
assertEquals("1570545261000", TimeUtils.formatTimeAsFullMillis(1570545261,0));
assertEquals("1570545261234", TimeUtils.formatTimeAsFullMillis(1570545261,234000000));
assertEquals("1570545261234.770582", TimeUtils.formatTimeAsFullMillis(1570545261,234770582));
assertEquals("-1000", TimeUtils.formatTimeAsFullMillis(-1, 0));
assertEquals("-999.999999", TimeUtils.formatTimeAsFullMillis(-1, 1));
assertEquals("-0.000001", TimeUtils.formatTimeAsFullMillis(-1, 999_999_999));
assertEquals("-1999.999999", TimeUtils.formatTimeAsFullMillis(-2, 1));
assertEquals("9223372036854775807000", TimeUtils.formatTimeAsFullMillis(Long.MAX_VALUE, 0));
assertEquals("9223372036854775807999.999999", TimeUtils.formatTimeAsFullMillis(Long.MAX_VALUE, 999_999_999));
assertEquals("-9223372036854775808000", TimeUtils.formatTimeAsFullMillis(Long.MIN_VALUE, 0));
assertEquals("-9223372036854775807999.999999", TimeUtils.formatTimeAsFullMillis(Long.MIN_VALUE, 1));
}
}
......@@ -42,14 +42,14 @@ public class JMapTest
@Test
public void test1ArgMapOf()
{
java.util.Map data = JMap.of("one", "1");
java.util.Map<String, String> data = JMap.of("one", "1");
assertEquals(1, data.size());
assertEquals("1", data.get("one"));
}
@Test
public void test2ArgsMapOf()
{
java.util.Map data = JMap.of("one", "1", "two", "2");
java.util.Map<String, String> data = JMap.of("one", "1", "two", "2");
assertEquals(2, data.size());
assertEquals("1", data.get("one"));
assertEquals("2", data.get("two"));
......@@ -58,7 +58,7 @@ public class JMapTest
@Test
public void test3ArgsMapOf()
{
java.util.Map data = JMap.of("one", "1", "two", "2", "three", "3");
java.util.Map<String, String> data = JMap.of("one", "1", "two", "2", "three", "3");
assertEquals(3, data.size());
assertEquals("1", data.get("one"));
assertEquals("2", data.get("two"));
......
<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>
<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>org.jitsi</groupId>
<artifactId>jitsi-utils-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<groupId>org.jitsi</groupId>
<artifactId>jitsi-utils-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>jitsi-utils-parent</name>
<url>https://github.com/jitsi/jitsi-utils</url>
<scm>
<name>jitsi-utils-parent</name>
<url>https://github.com/jitsi/jitsi-utils</url>
<connection>scm:git:https://github.com/jitsi/jitsi-utils.git</connection>
<developerConnection>scm:git:https://github.com/jitsi/jitsi-utils.git</developerConnection>
<tag>HEAD</tag>
</scm>
<scm>
<url>https://github.com/jitsi/jitsi-utils</url>
<connection>scm:git:https://github.com/jitsi/jitsi-utils.git</connection>
<developerConnection>scm:git:https://github.com/jitsi/jitsi-utils.git</developerConnection>
<tag>HEAD</tag>
</scm>
<modules>
<module>jitsi-utils</module>
<module>jitsi-utils-kotlin</module>
</modules>
<modules>
<module>jitsi-utils</module>
<module>jitsi-utils-kotlin</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotbugs.version>4.0.0-RC1</spotbugs.version>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotbugs.version>4.0.3</spotbugs.version>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.12.2</version>
<configuration>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
<includeTests>true</includeTests>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals><goal>check</goal></goals>
</execution>
</executions>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotbugs.version}</version>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>${spotbugs.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>19.0.0</version>
<optional>true</optional>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.0.0</version>
<configuration>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
<includeTests>true</includeTests>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotbugs.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment