Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
3.2.3
-
None
Description
ProjectBuildingRequest request = ... ProjectBuilder builder = plexus.lookup(ProjectBuilder.class); builder.build(file, request);
When the build method is called, the following exception is thrown:
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)
The code should be reviewed. This is the offending code inside DefaultProjectBuilder:
Artifact artifact = repositorySystem.createDependencyArtifact( d ); if ( artifact == null ) { map = Collections.emptyMap(); } map.put( d.getManagementKey(), artifact );
Raising the priority, since DefaultProjectBuilder is unusable without fixing this