[ https://jira.codehaus.org/browse/MNG-5680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=358646#comment-358646 ]
Shaun commented on MNG-5680: ---------------------------- I had a colleague who was having this same issue, MNG-5368 was definitely the cause. It would be an improvement for maven to give some sensible error rather than it manifesting in this way. FWIW, it was not environmental issues, but here was his settings: {noformat} username-mbp112:bin username$ mvn --version Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T13:58:10-07:00) Maven home: /usr/share/java/apache-maven-3.2.3 Java version: 1.7.0_45, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.10.1", arch: "x86_64", family: "mac" {noformat} > java.lang.UnsupportedOperationException on DefaultProjectBuilder.build > ---------------------------------------------------------------------- > > Key: MNG-5680 > URL: https://jira.codehaus.org/browse/MNG-5680 > Project: Maven > Issue Type: Bug > Components: Bootstrap & Build > Affects Versions: 3.2.3 > Reporter: George Gastaldi > Priority: Critical > Attachments: pom.xml > > > {code} > ProjectBuildingRequest request = ... > ProjectBuilder builder = plexus.lookup(ProjectBuilder.class); > builder.build(file, request); > {code} > When the build method is called, the following exception is thrown: > {code} > java.lang.UnsupportedOperationException > at java.util.AbstractMap.put(AbstractMap.java:209) > at > org.apache.maven.project.DefaultProjectBuilder.initProject(DefaultProjectBuilder.java:815) > at > org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:174) > at > org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:118) > {code} > The code should be reviewed. This is the offending code inside > DefaultProjectBuilder: > {code} > Artifact artifact = > repositorySystem.createDependencyArtifact( d ); > if ( artifact == null ) > { > map = Collections.emptyMap(); > } > map.put( d.getManagementKey(), artifact ); > {code} -- This message was sent by Atlassian JIRA (v6.1.6#6162)