mirror of https://github.com/apache/maven.git
Resolving issue: MNG-480
o Added support for -Dmaven.repo.local command line override of the local repo o Propagating local repository location (either maven.repo.local, or from settings.xml) to ITs in Verifier o Re-enabled it0023 and it0026 o Removed warning in README.txt for maven-core-it. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
98b00e8004
commit
1a89a7b751
|
@ -499,6 +499,8 @@ public class Verifier
|
|||
String key = (String) i.next();
|
||||
cli.createArgument().setLine( "-D" + key + "=" + properties.getProperty( key ) );
|
||||
}
|
||||
|
||||
cli.createArgument().setLine( "-Dmaven.repo.local=" + localRepo );
|
||||
|
||||
for ( Iterator i = allGoals.iterator(); i.hasNext(); )
|
||||
{
|
||||
|
|
|
@ -85,17 +85,6 @@ it0026: Test merging of global- and user-level settings.xml files.
|
|||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
==============================
|
||||
NOTE: About it0023 and it0026
|
||||
==============================
|
||||
I am disabling these for now, because they depend on locally-supplied settings
|
||||
files, and need to know the location of the local repository where the plugin
|
||||
builds were deposited in order to work. This is why they will result in
|
||||
ArtifactResolutionException's...they literally cannot find the plugins in the
|
||||
local repository, because they wind up using the default local repository.
|
||||
=============================
|
||||
|
||||
|
||||
- generated sources
|
||||
- generated resources from sources
|
||||
- generated resources from generated sources
|
||||
|
|
|
@ -21,7 +21,7 @@ it0019
|
|||
it0020
|
||||
it0021
|
||||
it0022
|
||||
#it0023
|
||||
it0023
|
||||
it0024
|
||||
it0025
|
||||
#it0026
|
||||
it0026
|
||||
|
|
|
@ -115,7 +115,17 @@ public class DefaultMavenSettingsBuilder
|
|||
|
||||
SettingsUtils.merge( userSettings, globalSettings, TrackableBase.GLOBAL_LEVEL );
|
||||
|
||||
if ( userSettings.getLocalRepository() == null || userSettings.getLocalRepository().length() < 1 )
|
||||
// try using the local repository specified on the command line...
|
||||
String localRepository = System.getProperty( MavenSettingsBuilder.ALT_LOCAL_REPOSITORY_LOCATION );
|
||||
|
||||
// otherwise, use the one in settings.xml
|
||||
if ( localRepository == null || localRepository.length() < 1 )
|
||||
{
|
||||
localRepository = userSettings.getLocalRepository();
|
||||
}
|
||||
|
||||
// if both are missing, default to ~/.m2/repository.
|
||||
if ( localRepository == null || localRepository.length() < 1 )
|
||||
{
|
||||
File mavenUserConfigurationDirectory = new File( userHome, ".m2" );
|
||||
if ( !mavenUserConfigurationDirectory.exists() )
|
||||
|
@ -126,11 +136,11 @@ public class DefaultMavenSettingsBuilder
|
|||
}
|
||||
}
|
||||
|
||||
String localRepository = new File( mavenUserConfigurationDirectory, "repository" ).getAbsolutePath();
|
||||
|
||||
userSettings.setLocalRepository( localRepository );
|
||||
localRepository = new File( mavenUserConfigurationDirectory, "repository" ).getAbsolutePath();
|
||||
}
|
||||
|
||||
userSettings.setLocalRepository( localRepository );
|
||||
|
||||
return userSettings;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ public interface MavenSettingsBuilder
|
|||
|
||||
String ALT_USER_SETTINGS_XML_LOCATION = "org.apache.maven.user-settings";
|
||||
String ALT_GLOBAL_SETTINGS_XML_LOCATION = "org.apache.maven.global-settings";
|
||||
String ALT_LOCAL_REPOSITORY_LOCATION = "maven.repo.local";
|
||||
|
||||
Settings buildSettings()
|
||||
throws IOException, XmlPullParserException;
|
||||
|
|
Loading…
Reference in New Issue