Maven clean command: java.util.Collections.UnmodifiableRandomAccessList to property of type java.util.ArrayList
Asked Answered
A

3

22

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?

Abyss answered 7/12, 2018 at 19:56 Comment(3)
How are you executing the clean maven command?Digitoxin
I executed the clean command in the Intellij IDEA terminal: mvn cleanAbyss
May I suggest that the accepted answer be changed to the one with the most upvotes? In this case, it's much better to update a plugin's version because of a bug fix in the plugin rather than downgrading the Maven version to an older one.Lidialidice
C
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
Carboxylase answered 7/12, 2018 at 20:38 Comment(2)
Why do you use such an old Maven version?Hix
Because this version is used by my colleagues on the project.Carboxylase
I
40

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>
Inestimable answered 24/4, 2019 at 16:34 Comment(5)
This one did the trick for me, simply updating the artifactId version to 3.0.4 worked perfectly.Abnormity
That helped, Thanks!. Reason : 3.0.0 depends on JDK 1.7. I found this reason in hbase source tree.Barnaba
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 gleclaire.github.io/findbugs-maven-plugin) and you should ideally switch to spotbugs instead: spotbugs.readthedocs.io/en/stable/…Aubade
Specifying maven 3.1.1 for the project containing this particular error instead of maven 3.6.x fixed the issue on my system.Bull
had the same problem, could get out of it with this soluion.. thanks!Galang
S
8

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

Sideling answered 31/7, 2019 at 16:23 Comment(1)
Downgrading to maven 3.5.4 solved my issue. ThanksGalang
C
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
Carboxylase answered 7/12, 2018 at 20:38 Comment(2)
Why do you use such an old Maven version?Hix
Because this version is used by my colleagues on the project.Carboxylase

© 2022 - 2024 — McMap. All rights reserved.