Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 833
Denisa Todorut Avatar asked Dec 07 '18 19:12

Denisa Todorut


3 Answers

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>
like image 73
Alexander Samoylov Avatar answered Oct 11 '22 15:10

Alexander Samoylov


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

like image 31
yusuf Avatar answered Oct 11 '22 15:10

yusuf


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
like image 1
Todorut Daliana Avatar answered Oct 11 '22 16:10

Todorut Daliana