[ http://jira.codehaus.org/browse/MNG-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183850#action_183850 ]
Benjamin Bentmann commented on MNG-4242: ---------------------------------------- I don't really get what you mean. For instance, what is an "an unimplemented null object"? Once the code gets into {{setLocalRepository()}}, {{this}} is definitively not null. Next, what you mean with "nothing happens here", you put this comment on an interface, there is expectedly not much to look at. Could you provide some example project and instruction on how to reproduce your issue? > -DlocalRepository=file:/foo configuration lost > ----------------------------------------------- > > Key: MNG-4242 > URL: http://jira.codehaus.org/browse/MNG-4242 > Project: Maven 2 > Issue Type: Bug > Environment: Maven 2.1 > JDK 1.6.10 > Reporter: Martin Gainty > > given org.apache.maven.project.DefaultMavenprojectBuilder has this code > {code:java} > public ProjectBuilderConfiguration setLocalRepository( ArtifactRepository > localRepository ) > { > this.localRepository = localRepository; > //this returns an unimplemented null object > return this; > } > public MavenProject buildStandaloneSuperProject( ArtifactRepository > localRepository, > ProfileManager > profileManager ) > throws ProjectBuildingException > { > return buildStandaloneSuperProject( new > DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ) > > .setGlobalProfileManager( profileManager ) ); > } > //calls to 1 arg constructor > // what is using this externally? jvz. > public MavenProject buildStandaloneSuperProject( ArtifactRepository > localRepository ) > throws ProjectBuildingException > { > //TODO mkleint - use the (Container, Properties) constructor to make > system properties embeddable > ProfileManager profileManager = new DefaultProfileManager( container > ); > return buildStandaloneSuperProject( new > DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ) > > .setGlobalProfileManager( profileManager ) ); > //the input to buildStandloneSuperProject is essentially an empty object > } > //supposedly calls here > public MavenProject buildStandaloneSuperProject( > ProjectBuilderConfiguration config ) > throws ProjectBuildingException > { > ....the real work...... > } > org.apache.maven.project.ProjectBuilderConfiguration contains this > definition > public interface ProjectBuilderConfiguration > { > ArtifactRepository getLocalRepository(); > ProfileManager getGlobalProfileManager(); > Properties getUserProperties(); > Properties getExecutionProperties(); > ProjectBuilderConfiguration setGlobalProfileManager( ProfileManager > globalProfileManager ); > //nothing happens here > ProfileManager getGlobalProfileManager(); > {code} > anything passed into these set of routines is nulled out by setLocalRepository > Martin Gainty > 15 Ju 2009 18:37 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira