Determine versions of dependencies of library Maven

Imagine you need to determine the version of Apache commons-lang dependency in ZooKeeper 3.6.2. The easiest way to do this is to find the artifact page in the mvn repository. For ZooKeeper 3.6.2: https://mvnrepository.com/artifact/org.apache.zookeeper/zookeeper/3.6.2.  On the page, you need to find the Compile Dependencies section, and find the required dependency there. In our case, the commons-lang 2.6 dependency […]

READ MORE

Failed to deploy artifacts: Could not find artifact Maven

When you try to execute the mvn deploy command, you may encounter the error: The error could actually means (thanks to randomsimon):  That is, maven cannot find the repository at the specified url. Check, that the url of the repository is correct, and in general it exists and specified.  A repository url can be specified via […]

READ MORE

Exclude package from Maven-PMD and Findbugs

Suppose, that you need to exclude the package from the maven-pmd-plugin, or you need to exclude the package from findbugs-maven-plugin.  maven-pmd-plugin Pmd definition in project pom.xml: Pmd configuration file pmd-exclude.xml: findbugs-maven-plugin Findbugs definition in project pom.xml: Findbugs configuration file findbugs-exclude.xml:

READ MORE

Guava version compatibility issue

Spring Boot errors Pure Java exceptions Suggested solutions Method Guava version com.google.common.base.Preconditions.checkArgument 26.0-jre / 26.0-android com.google.common.base.Preconditions.checkState 21.0 com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor 18.0 / 19.0 Let me remind you that guava with maven is connected like this: If suggested verions don’t fix the problem, you can try connecting the specified versions in order: 18.0 / 19.0 / 21.0 / […]

READ MORE

Error creating shaded jar target\classes (Access is denied)

The error looks like this: Stacktrace: maven-shade-plugin tries to open classes folder as zip file. This happens when one of the dependencies is found on the local filesystem and not in the local maven repository. Before unpacking, the plugin should check whether target\classes is a directory or a zip file, but it doesn’t. One solution […]

READ MORE