Jetty 9.4.x optimize parser warning from logs and add spotbug (#5735)

* enable spotbugs in CI

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

record issues

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

use warning new generation

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

activate errorprone

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

fix Jenkinsfile

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

do not run spotbugs for jetty-runner as we do not want to fix all dependencies bugs :)

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

junit should allow empty results

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

maven console can be use only once...

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

one liner

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

recordissues only once

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

force id

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

aggregate results

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

configure a name for aggregated reports

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

mo more -T3 no need anymore of remote session test profile

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

I want to see what failing tests look like with new report.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

skip spotbugs for jetty-jmh

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

get rid of findbugs as we now have spotbugs

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

Revert "I want to see what failing tests look like with new report."

This reverts commit df0d13e4c53d7461872e1f925ec06bd36e4a66c9.

activate errorProne parser

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

make pmd quiet for CI

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

remove -fae flag and do not display transfer progress

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

try junitParser() to see what it does

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

junit parser is a bad idea...

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

increase timeout

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

no -T2 for javadoc

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

fix skip spotbugs and pmd verbose

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* remove -T options

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
Olivier Lamy 2020-12-11 11:47:26 +10:00 committed by GitHub
parent ea621cea9b
commit 639cad63fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 106 additions and 338 deletions

29
Jenkinsfile vendored
View File

@ -12,8 +12,7 @@ pipeline {
steps {
container('jetty-build') {
timeout( time: 240, unit: 'MINUTES' ) {
mavenBuild( "jdk8", "clean install", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
mavenBuild( "jdk8", "clean install", "maven3")
// Collect up the jacoco execution results (only on main build)
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
exclusionPattern: '' +
@ -32,6 +31,7 @@ pipeline {
execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes',
sourcePattern: '**/src/main/java'
recordIssues id: "jdk8", name: "Static Analysis jdk8", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]
}
}
}
@ -42,8 +42,8 @@ pipeline {
steps {
container( 'jetty-build' ) {
timeout( time: 240, unit: 'MINUTES' ) {
mavenBuild( "jdk11", "clean install -Djacoco.skip=true", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
mavenBuild( "jdk11", "clean install -Djacoco.skip=true -Perrorprone", "maven3")
recordIssues id: "jdk11", name: "Static Analysis jdk11", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser(), errorProne()]
}
}
}
@ -54,8 +54,8 @@ pipeline {
steps {
container( 'jetty-build' ) {
timeout( time: 240, unit: 'MINUTES' ) {
mavenBuild( "jdk15", "clean install -Djacoco.skip=true", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
mavenBuild( "jdk15", "clean install -Djacoco.skip=true", "maven3")
recordIssues id: "jdk15", name: "Static Analysis jdk15", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]
}
}
}
@ -65,10 +65,11 @@ pipeline {
agent { node { label 'linux' } }
steps {
container( 'jetty-build' ) {
timeout( time: 60, unit: 'MINUTES' ) {
timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk11",
"install javadoc:javadoc javadoc:aggregate-jar -DskipTests -Dpmd.skip=true -Dcheckstyle.skip=true",
"maven3", [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']])
"maven3")
recordIssues id: "javadoc", enabledForFailure: true, tools: [javaDoc()]
}
}
}
@ -78,9 +79,8 @@ pipeline {
agent { node { label 'linux' } }
steps {
container( 'jetty-build' ) {
timeout( time: 60, unit: 'MINUTES' ) {
mavenBuild( "jdk8", "-Pcompact3 clean install -DskipTests", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk8", "-Pcompact3 clean install -DskipTests", "maven3")
}
}
}
@ -130,7 +130,7 @@ def slackNotif() {
* @param cmdline the command line in "<profiles> <goals> <properties>"`format.
* @param consoleParsers array of console parsers to run
*/
def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
def mavenBuild(jdk, cmdline, mvnName) {
script {
try {
withEnv(["JAVA_HOME=${ tool "$jdk" }",
@ -138,16 +138,13 @@ def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
configFileProvider(
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
sh "mvn -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=/tmp/unixsocket"
sh "mvn --no-transfer-progress -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=/tmp/unixsocket"
}
}
}
finally
{
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true
if(consoleParsers!=null){
warnings consoleParsers: consoleParsers
}
}
}
}

View File

@ -14,6 +14,7 @@
<properties>
<sonar.skip>true</sonar.skip>
<spotbugs.skip>true</spotbugs.skip>
</properties>
<build>
@ -26,14 +27,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<!-- No Point running Findbugs on example projects -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -9,6 +9,7 @@
<name>Jetty :: ALPN :: Client</name>
<properties>
<bundle-symbolic-name>${project.groupId}.alpn.client</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.alpn.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -36,13 +37,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.alpn.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -9,6 +9,7 @@
<name>Jetty :: ALPN :: Server</name>
<properties>
<bundle-symbolic-name>${project.groupId}.alpn.server</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.alpn.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -18,13 +19,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.alpn.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>

View File

@ -10,6 +10,7 @@
<description>Annotation support for deploying servlets in jetty.</description>
<properties>
<bundle-symbolic-name>${project.groupId}.annotations</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.annotations.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -24,13 +25,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.annotations.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -11,16 +11,10 @@
<properties>
<bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
<jetty.test.policy.loc>target/test-policy</jetty.test.policy.loc>
<spotbugs.onlyAnalyze>org.eclipse.client.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.client.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>

View File

@ -10,16 +10,10 @@
<description>Asynchronous API</description>
<properties>
<bundle-symbolic-name>${project.groupId}.continuation</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.continuation.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.continuation.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -10,18 +10,8 @@
<description>Jetty deployers</description>
<properties>
<bundle-symbolic-name>${project.groupId}.deploy</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.deploy.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.deploy.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>

View File

@ -12,6 +12,7 @@
<properties>
<assembly-directory>${basedir}/target/distribution</assembly-directory>
<home-directory>${basedir}/target/home</home-directory>
<spotbugs.skip>true</spotbugs.skip>
</properties>
<build>
@ -384,14 +385,6 @@
<skip>true</skip>
</configuration>
</plugin>
<!-- No point performing Findbugs in assembly project -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -14,6 +14,7 @@
<assembly-directory>${basedir}/target/jetty-home</assembly-directory>
<source-assembly-directory>${basedir}/target/jetty-home-sources</source-assembly-directory>
<jetty-setuid-version>1.0.4</jetty-setuid-version>
<spotbugs.skip>true</spotbugs.skip>
</properties>
<build>
@ -538,14 +539,6 @@
<skip>true</skip>
</configuration>
</plugin>
<!-- No point performing Findbugs in assembly project -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -9,6 +9,7 @@
<name>Jetty :: Http Service Provider Interface</name>
<properties>
<bundle-symbolic-name>${project.groupId}.http.spi</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.http.spi.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -37,13 +38,6 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.http.spi.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

View File

@ -10,6 +10,7 @@
<name>Jetty :: Http Utility</name>
<properties>
<bundle-symbolic-name>${project.groupId}.http</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.http.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -58,13 +59,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.http.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>

View File

@ -10,6 +10,7 @@
<name>Jetty :: IO Utility</name>
<properties>
<bundle-symbolic-name>${project.groupId}.io</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.io.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -23,15 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.io.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -12,6 +12,7 @@
<bundle-symbolic-name>${project.groupId}.jaas</bundle-symbolic-name>
<!-- 2.0.0.AM25 is breaking surefire -->
<apacheds.version>2.0.0-M24</apacheds.version>
<spotbugs.onlyAnalyze>org.eclipse.jetty.jaas.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -21,13 +22,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.jaas.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -12,17 +12,11 @@
<properties>
<bundle-symbolic-name>${project.groupId}.security.jaspi</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.jaspi.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.jaspi.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>

View File

@ -12,17 +12,11 @@
<properties>
<bundle-symbolic-name>${project.groupId}.jmh</bundle-symbolic-name>
<spotbugs.skip>true</spotbugs.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>

View File

@ -10,18 +10,8 @@
<description>JMX management artifact for jetty.</description>
<properties>
<bundle-symbolic-name>${project.groupId}.jmx</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.jmx.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.jmx.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>

View File

@ -10,6 +10,7 @@
<description>JNDI spi impl for java namespace.</description>
<properties>
<bundle-symbolic-name>${project.groupId}.jndi</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.jndi.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -40,13 +41,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.jndi.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -12,17 +12,11 @@
<properties>
<bundle-symbolic-name>${project.groupId}.openid</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.security.openid.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.security.openid.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>

View File

@ -10,6 +10,7 @@
<description>Jetty OSGi Boot JSP bundle</description>
<properties>
<bundle-symbolic-name>${project.groupId}.boot.jsp</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.osgi.boot.jasper.*,org.eclipse.jetty.osgi.boot.jsp.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -125,13 +126,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.osgi.boot.jasper.*,org.eclipse.jetty.osgi.boot.jsp.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -11,6 +11,7 @@
<description>Jetty OSGi Boot-Warurl bundle</description>
<properties>
<bundle-symbolic-name>${project.groupId}.boot.warurl</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.osgi.boot.warurl.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -36,13 +37,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.osgi.boot.warurl.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -10,6 +10,7 @@
<description>Jetty OSGi Boot bundle</description>
<properties>
<bundle-symbolic-name>${project.groupId}.boot</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.osgi.boot.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -99,13 +100,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.osgi.boot.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -10,6 +10,7 @@
<description>Jetty OSGi HttpService bundle</description>
<properties>
<bundle-symbolic-name>${project.groupId}.httpservice</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.osgi.httpservice.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -70,13 +71,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.osgi.httpservice.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -10,6 +10,7 @@
<description>Jetty JavaEE style services</description>
<properties>
<bundle-symbolic-name>${project.groupId}.plus</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.plus.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -46,13 +47,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.plus.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -10,18 +10,8 @@
<description>Jetty Proxy</description>
<properties>
<bundle-symbolic-name>${project.groupId}.proxy</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.proxy.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.proxy.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>

View File

@ -10,18 +10,8 @@
<description>Jetty Rewrite Handler</description>
<properties>
<bundle-symbolic-name>${project.groupId}.rewrite</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.rewrite.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.rewrite.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>

View File

@ -11,6 +11,8 @@
<properties>
<assembly-directory>target/distribution</assembly-directory>
<bundle-symbolic-name>${project.groupId}.runner</bundle-symbolic-name>
<!-- too many external dependencies to fix... :) -->
<spotbugs.skip>true</spotbugs.skip>
</properties>
<build>

View File

@ -10,16 +10,10 @@
<description>Jetty security infrastructure</description>
<properties>
<bundle-symbolic-name>${project.groupId}.security</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.security.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.security.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>

View File

@ -10,6 +10,7 @@
<description>The core jetty server artifact.</description>
<properties>
<bundle-symbolic-name>${project.groupId}.server</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.server.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -25,13 +26,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.server.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -11,6 +11,7 @@
<description>Jetty Servlet Container</description>
<properties>
<bundle-symbolic-name>${project.groupId}.servlet</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -26,13 +27,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.servlet.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -11,18 +11,8 @@
<description>Utility Servlets from Jetty</description>
<properties>
<bundle-symbolic-name>${project.groupId}.servlets</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.servlets.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.servlets.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>

View File

@ -10,6 +10,7 @@
<description>The start utility</description>
<properties>
<bundle-symbolic-name>${project.groupId}.start</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.start.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
@ -23,13 +24,6 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.start.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>

View File

@ -10,6 +10,7 @@
<description>Jetty UnixSocket</description>
<properties>
<bundle-symbolic-name>${project.groupId}.unixsocket</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.unixsocket.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
@ -41,13 +42,6 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.unixsocket.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>

View File

@ -10,18 +10,8 @@
<description>JSON/Ajax Utility classes for Jetty</description>
<properties>
<bundle-symbolic-name>${project.groupId}.util.ajax</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.util.ajax.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.util.ajax.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>

View File

@ -10,6 +10,7 @@
<description>Utility classes for Jetty</description>
<properties>
<bundle-symbolic-name>${project.groupId}.util</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.util.*</spotbugs.onlyAnalyze>
</properties>
<build>
<resources>
@ -19,13 +20,6 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.util.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>

View File

@ -10,6 +10,7 @@
<description>Jetty web application support</description>
<properties>
<bundle-symbolic-name>${project.groupId}.webapp</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.webapp.*</spotbugs.onlyAnalyze>
</properties>
<build>
<resources>
@ -26,13 +27,6 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.webapp.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

View File

@ -21,15 +21,11 @@
<module>javax-websocket-client-impl</module>
<module>javax-websocket-server-impl</module>
</modules>
<properties>
<spotbugs.onlyAnalyze>org.eclipse.jetty.websocket.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.websocket.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>

View File

@ -10,16 +10,10 @@
<description>The jetty xml utilities.</description>
<properties>
<bundle-symbolic-name>${project.groupId}.xml</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.xml.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.xml.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>

81
pom.xml
View File

@ -58,6 +58,8 @@
<maven.install.plugin.version>3.0.0-M1</maven.install.plugin.version>
<maven.deploy.plugin.version>3.0.0-M1</maven.deploy.plugin.version>
<pmd.verbose>true</pmd.verbose>
<!-- testing -->
<it.debug>false</it.debug>
<jetty.test.version>5.5</jetty.test.version>
@ -262,7 +264,8 @@
<goal>check</goal>
</goals>
<configuration>
<verbose>true</verbose>
<verbose>${pmd.verbose}</verbose>
<printFailingErrors>${pmd.verbose}</printFailingErrors>
</configuration>
</execution>
</executions>
@ -790,17 +793,6 @@
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<xmlOutput>true</xmlOutput>
<effort>Max</effort>
<onlyAnalyze>org.eclipse.jetty.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
@ -1208,27 +1200,18 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showWarnings>true</showWarnings>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs>
<arg>-XepAllErrorsAsWarnings</arg>
<arg>-Xep:OperatorPrecedence:OFF</arg>
<compilerArgs combine.children="append">
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne -XepAllErrorsAsWarnings</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.4.0</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8.8</version>
</dependency>
<!-- override plexus-compiler-javac-errorprone's dependency on
Error Prone with the latest version -->
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.4.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
@ -1393,6 +1376,14 @@
<properties>
<settingsPath>${env.GLOBAL_MVN_SETTINGS}</settingsPath>
<surefire.rerunFailingTestsCount>3</surefire.rerunFailingTestsCount>
<spotbugs.failOnError>false</spotbugs.failOnError>
<!-- Defines a SpotBugs threshold. Use "Low" to discover low-priority bugs -->
<spotbugs.threshold>Medium</spotbugs.threshold>
<!-- Defines a SpotBugs effort. Use "Max" to maximize the scan depth -->
<spotbugs.effort>Default</spotbugs.effort>
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.onlyAnalyze>org.eclipse.jetty.*</spotbugs.onlyAnalyze>
<pmd.verbose>false</pmd.verbose>
</properties>
<modules>
<module>aggregates/jetty-all</module>
@ -1400,6 +1391,11 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@ -1410,6 +1406,29 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<executions>
<execution>
<id>spotbugs</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
<skip>${spotbugs.skip}</skip>
<failOnError>${spotbugs.failOnError}</failOnError>
<xmlOutput>true</xmlOutput>
<spotbugsXmlOutput>false</spotbugsXmlOutput>
<effort>${spotbugs.effort}</effort>
<threshold>${spotbugs.threshold}</threshold>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>

View File

@ -11,6 +11,9 @@
<artifactId>tests-parent</artifactId>
<name>Jetty Tests :: Parent</name>
<packaging>pom</packaging>
<properties>
<spotbugs.skip>true</spotbugs.skip>
</properties>
<build>
<pluginManagement>
<plugins>
@ -38,14 +41,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<!-- No Point running Findbugs on testing projects -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>