You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2009/12/29 06:16:55 UTC

[jira] Closed: (MNG-4242) -DlocalRepository=file:/foo configuration lost

     [ http://jira.codehaus.org/browse/MNG-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl closed MNG-4242.
------------------------------

    Resolution: Incomplete

> -DlocalRepository=file:/foo configuration lost 
> -----------------------------------------------
>
>                 Key: MNG-4242
>                 URL: http://jira.codehaus.org/browse/MNG-4242
>             Project: Maven 2 & 3
>          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