20

When executing the clean maven command, the following error occurs:

Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.0:findbugs (findbugs) on Unable to parse configuration of mojo org.codehaus.mojo:findbugs-maven-plugin:3.0.0:findbugs for parameter pluginArtifacts: Cannot assign configuration entry 'pluginArtifacts' with value '${plugin.artifacts}' of type java.util.Collections.UnmodifiableRandomAccessList to property of type java.util.ArrayList.

I have version 2.6 for Apache Maven. Do you have any idea how can I solve this problem?

Steve K
  • 2,044
  • 3
  • 24
  • 37
Denisa Todorut
  • 203
  • 1
  • 2
  • 6

3 Answers3

38

I had the same issue with Maven 3.6.0 as well. The problem seems to be a bug in the plugin, because it disappears starting from the plugin version 3.0.4. So the solution for me was to specify the version in the pom.xml:

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.4</version>
          <configuration>
            <failOnError>${maven.findbugs.failure.strict}</failOnError>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
Alexander Samoylov
  • 2,358
  • 2
  • 25
  • 28
  • 2
    This one did the trick for me, simply updating the artifactId version to 3.0.4 worked perfectly. – mjuarez Apr 25 '19 at 03:38
  • 2
    That helped, Thanks!. **Reason** : 3.0.0 depends on JDK 1.7. I found this reason in hbase source tree. – Madhusoodan P Mar 01 '20 at 04:54
  • 1
    I had the same problem with findbugs `3.0.1`, and upgrading the plugin version to `3.0.4` fixed it! Just FYI though, FindBugs is deprecated (per https://gleclaire.github.io/findbugs-maven-plugin/) and you should ideally switch to spotbugs instead: https://spotbugs.readthedocs.io/en/stable/migration.html#guide-for-migration-from-findbugs-3-0-to-spotbugs-3-1 – Steve K Jun 21 '21 at 19:40
  • Specifying maven 3.1.1 for the project containing this particular error instead of maven 3.6.x fixed the issue on my system. – Pieter De Bie Jul 28 '21 at 12:36
  • had the same problem, could get out of it with this soluion.. thanks! – RusJaI Mar 24 '23 at 03:51
8

Using mvn version 3.3.x might solve this problem. I got this error with 3.6.x.

yusuf
  • 3,596
  • 5
  • 34
  • 39
1

I solved it in this way:

  • I deleted the .m2 and Apache Maven files
  • I installed Apache Maven 2.5
  • I created the .m2 folder and I added the setings.xml file to this folder