* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.odlparent;
import java.io.File;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
-import javax.annotation.RegEx;
import org.apache.karaf.features.BundleInfo;
import org.apache.karaf.features.Conditional;
import org.apache.karaf.features.internal.model.Bundle;
import org.apache.karaf.features.internal.model.Features;
import org.apache.karaf.features.internal.model.JaxbUtil;
import org.apache.maven.plugin.MojoExecutionException;
+import org.checkerframework.checker.regex.qual.Regex;
import org.eclipse.aether.artifact.Artifact;
import org.ops4j.pax.url.mvn.internal.Parser;
import org.slf4j.Logger;
private static final Pattern MVN_PATTERN = Pattern.compile("mvn:", Pattern.LITERAL);
private static final Pattern WRAP_PATTERN = Pattern.compile("wrap:", Pattern.LITERAL);
- @RegEx
+ @Regex
private static final String VERSION_STRIP_PATTERN_STR = "\\$.*$";
private static final Pattern VERSION_STRIP_PATTERN = Pattern.compile(VERSION_STRIP_PATTERN_STR);
<version>25.1-jre</version>
<exclusions>
<exclusion>
+ <!-- Do not leak JSR305 onto the classpath by default -->
<groupId>com.google.code.findbugs</groupId>
- <!-- Use com.google.code.findbugs:annotations instead of jsr305 -->
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
<exclusions>
<exclusion>
+ <!-- Do not leak JSR305 onto the classpath by default -->
<groupId>com.google.code.findbugs</groupId>
- <!-- Use com.google.code.findbugs:annotations instead of jsr305 -->
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>annotations</artifactId>
- <version>3.0.0</version>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-annotations</artifactId>
+ <version>3.1.9</version>
+ <scope>provided</scope>
+ <!-- Contains retention=RUNTIME annotations, which are not really needed -->
+ <optional>true</optional>
<exclusions>
- <!-- We'd like (have) to eventually exclude :jsr305 here as well, because
- the types of this artifact are already shaded inside the :annotations artifact.
- This state is a temporary solution to allow all projects to gradually switch over
- switch their <dependency><groupId>com.google.code.findbugs from
- <artifactId>jsr305 to <artifactId>annotations in all pom.xml.
- The target solution is https://git.opendaylight.org/gerrit/#/c/47337/
- -->
<exclusion>
- <groupId>net.jcip</groupId>
- <!-- The types of this artifact are already shaded inside the :annotations artifact -->
- <artifactId>jcip-annotations</artifactId>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
</dependency>
+
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
+ <scope>provided</scope>
+ <!-- Contains retention=RUNTIME annotations, which are not really needed -->
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
are not required at runtime.
-->
<dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>annotations</artifactId>
+ <groupId>org.eclipse.jdt</groupId>
+ <artifactId>org.eclipse.jdt.annotation</artifactId>
<scope>provided</scope>
- <!-- Contains retention=RUNTIME annotations, which are not really needed -->
- <optional>true</optional>
</dependency>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
- <artifactId>org.eclipse.jdt.annotation</artifactId>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-annotations</artifactId>
<scope>provided</scope>
+ <optional>true</optional>
</dependency>
<!--
<configuration>
<rules>
<bannedDependencies>
- <message>Please always use mockito-core instead of mockito-all, and findbugs:annotations instead of findbugs:jsr305 (see https://bugs.opendaylight.org/show_bug.cgi?id=7662 & https://bugs.opendaylight.org/show_bug.cgi?id=7663)</message>
+ <message>Please always use mockito-core instead of mockito-all (see https://bugs.opendaylight.org/show_bug.cgi?id=7662), and spotbugs:annotations instead of findbugs:annotations</message>
<excludes>
<exclude>org.mockito:mockito-all</exclude>
- <!-- https://github.com/facebook/facebook-oss-pom/blob/master/pom.xml#L331-L336 -->
- <!-- Clashes with com.google.code.findbugs:annotations and having both jars -->
- <!-- as a dependency then clashes with the dependency checker (because it -->
- <!-- is not very good at handling annotations). Use the annotations jar -->
- <!-- instead which has all jsr305 annotations and the additional findbugs -->
- <!-- stuff. -->
- <exclude>com.google.code.findbugs:jsr305</exclude>
- <exclude>net.jcip:jcip-annotations</exclude>
+ <exclude>com.google.code.findbugs:annotations</exclude>
</excludes>
</bannedDependencies>
</rules>