[
http://jira.codehaus.org/browse/MNG-4729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed MNG-4729.
----------------------------------
Resolution: Fixed
Fix Version/s: 3.0-beta-2
Assignee: Benjamin Bentmann
Fixed in [r965101|http://svn.apache.org/viewvc?view=revision&revision=965101],
thanks for the patch!
> Mirrors and servers not accessed properly by plugin on a build
> --------------------------------------------------------------
>
> Key: MNG-4729
> URL: http://jira.codehaus.org/browse/MNG-4729
> Project: Maven 2 & 3
> Issue Type: Bug
> Affects Versions: 3.0-beta-1
> Reporter: Eric Berry
> Assignee: Benjamin Bentmann
> Fix For: 3.0-beta-2
>
> Attachments: patch.txt
>
>
> We are using the
> <groupId>org.scala-tools</groupId><artifactId>maven-scala-plugin</artifactId>
> plugin. This makes a call into
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(
> Artifact artifact, List<ArtifactRepository> remoteRepositories,
> ArtifactRepository localRepository, boolean allowStubModel ). While trying
> to download dependencies, this call was not using the username and password
> from a server when accessing a repository. Furthermore it was also not
> replacing the repository with a mirror.
> When I added the following code into that method, it fixed my problem:
> {code:java}
> if ( session != null )
> {
> --> Settings settings = session.getSettings();
> --> configuration.setServers( settings.getServers() );
> --> configuration.setMirrors( settings.getMirrors() );
> --> configuration.setProxies( settings.getProxies() );
> configuration.setSystemProperties( session.getSystemProperties()
> );
> configuration.setUserProperties( session.getUserProperties() );
> }
> {code}
> Since I don't know the purpose for this method or the reasons for why this
> code was left out, I don't know if this is an appropriate fix, but it does
> fix my problem.
--
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