o remove standalone property

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@726579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2008-12-14 23:49:30 +00:00
parent f3d2285e2e
commit f5c4a25c9c
3 changed files with 19 additions and 70 deletions

View File

@ -19,13 +19,6 @@ package org.apache.maven.cli;
* under the License.
*/
import org.apache.commons.cli.CommandLine;
import org.apache.maven.MavenTransferListener;
import org.apache.maven.embedder.MavenEmbedder;
import org.apache.maven.execution.DefaultMavenExecutionRequest;
import org.apache.maven.execution.MavenExecutionRequest;
import org.codehaus.plexus.util.cli.CommandLineUtils;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
@ -35,6 +28,12 @@ import java.util.Properties;
import java.util.StringTokenizer;
import java.util.Map.Entry;
import org.apache.commons.cli.CommandLine;
import org.apache.maven.MavenTransferListener;
import org.apache.maven.execution.DefaultMavenExecutionRequest;
import org.apache.maven.execution.MavenExecutionRequest;
import org.codehaus.plexus.util.cli.CommandLineUtils;
public final class CLIRequestUtils
{
@ -258,9 +257,6 @@ public final class CLIRequestUtils
static void populateProperties( CommandLine commandLine, Properties executionProperties, Properties userProperties )
{
System.setProperty( MavenEmbedder.STANDALONE_MODE, "true" );
executionProperties.setProperty( MavenEmbedder.STANDALONE_MODE, "true" );
// add the env vars to the property set, with the "env." prefix
// XXX support for env vars should probably be removed from the ModelInterpolator
try

View File

@ -122,9 +122,6 @@ public class MavenEmbedder
public static final File DEFAULT_GLOBAL_SETTINGS_FILE =
new File( System.getProperty( "maven.home", System.getProperty( "user.dir", "" ) ), "conf/settings.xml" );
public static final String STANDALONE_MODE = "maven.mode.standalone";
// ----------------------------------------------------------------------------
//
// ----------------------------------------------------------------------------

View File

@ -155,13 +155,6 @@ public class DefaultMavenExecutionRequestPopulator
request.setProperties( requestProperties );
}
if ( requestProperties.getProperty( MavenEmbedder.STANDALONE_MODE ) == null )
{
// TODO: Remove this!
System.setProperty( MavenEmbedder.STANDALONE_MODE, "true" );
requestProperties.setProperty( MavenEmbedder.STANDALONE_MODE, "true" );
}
Properties userProperties = request.getUserProperties();
if ( userProperties != null )
{
@ -176,8 +169,7 @@ public class DefaultMavenExecutionRequestPopulator
}
}
private void realmManager( MavenExecutionRequest request,
Configuration configuration )
private void realmManager( MavenExecutionRequest request, Configuration configuration )
{
if ( request.getRealmManager() == null )
{
@ -192,8 +184,7 @@ public class DefaultMavenExecutionRequestPopulator
}
}
private void processSettings( MavenExecutionRequest request,
Configuration configuration )
private void processSettings( MavenExecutionRequest request, Configuration configuration )
{
ProfileManager profileManager = request.getProfileManager();
@ -263,8 +254,7 @@ public class DefaultMavenExecutionRequestPopulator
// POM
// ------------------------------------------------------------------------
private void pom( MavenExecutionRequest request,
Configuration configuration )
private void pom( MavenExecutionRequest request, Configuration configuration )
{
// ------------------------------------------------------------------------
// POM
@ -301,8 +291,7 @@ public class DefaultMavenExecutionRequestPopulator
// Settings
// ------------------------------------------------------------------------
private void settings( MavenExecutionRequest request,
Configuration configuration )
private void settings( MavenExecutionRequest request, Configuration configuration )
{
// ------------------------------------------------------------------------
// Settings
@ -397,12 +386,6 @@ public class DefaultMavenExecutionRequestPopulator
private void checksumPolicy( MavenExecutionRequest request,
Configuration configuration )
{
// ------------------------------------------------------------------------
// Repository Checksum Policies
//
// We take the checksum passed in via the request.
// ------------------------------------------------------------------------
mavenTools.setGlobalChecksumPolicy( request.getGlobalChecksumPolicy() );
}
@ -410,14 +393,11 @@ public class DefaultMavenExecutionRequestPopulator
// Artifact Transfer Mechanism
// ------------------------------------------------------------------------
private void artifactTransferMechanism( MavenExecutionRequest request,
Configuration configuration )
private void artifactTransferMechanism( MavenExecutionRequest request, Configuration configuration )
throws MavenEmbedderException
{
// ------------------------------------------------------------------------
// Artifact Transfer Mechanism
//
//
// ------------------------------------------------------------------------
if ( request.isOffline() )
@ -445,9 +425,7 @@ public class DefaultMavenExecutionRequestPopulator
}
catch ( Exception e )
{
throw new MavenEmbedderException(
"Unable to configure Maven for execution",
e );
throw new MavenEmbedderException( "Unable to configure Maven for execution", e );
}
}
@ -467,36 +445,20 @@ public class DefaultMavenExecutionRequestPopulator
throw new SettingsConfigurationException( "Proxy in settings.xml has no host" );
}
wagonManager.addProxy(
proxy.getProtocol(),
proxy.getHost(),
proxy.getPort(),
proxy.getUsername(),
proxy.getPassword(),
proxy.getNonProxyHosts() );
wagonManager.addProxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), proxy.getUsername(), proxy.getPassword(), proxy.getNonProxyHosts() );
}
for ( Iterator i = settings.getServers().iterator(); i.hasNext(); )
{
Server server = (Server) i.next();
wagonManager.addAuthenticationInfo(
server.getId(),
server.getUsername(),
server.getPassword(),
server.getPrivateKey(),
server.getPassphrase() );
wagonManager.addAuthenticationInfo( server.getId(), server.getUsername(), server.getPassword(), server.getPrivateKey(), server.getPassphrase() );
wagonManager.addPermissionInfo(
server.getId(),
server.getFilePermissions(),
server.getDirectoryPermissions() );
wagonManager.addPermissionInfo( server.getId(), server.getFilePermissions(), server.getDirectoryPermissions() );
if ( server.getConfiguration() != null )
{
wagonManager.addConfiguration(
server.getId(),
(Xpp3Dom) server.getConfiguration() );
wagonManager.addConfiguration( server.getId(), (Xpp3Dom) server.getConfiguration() );
}
}
@ -512,10 +474,7 @@ public class DefaultMavenExecutionRequestPopulator
{
Mirror mirror = (Mirror) i.next();
wagonManager.addMirror(
mirror.getId(),
mirror.getMirrorOf(),
mirror.getUrl() );
wagonManager.addMirror( mirror.getId(), mirror.getMirrorOf(), mirror.getUrl() );
}
}
finally
@ -524,9 +483,7 @@ public class DefaultMavenExecutionRequestPopulator
}
}
public ArtifactRepository createLocalRepository( MavenExecutionRequest request,
Settings settings,
Configuration configuration )
public ArtifactRepository createLocalRepository( MavenExecutionRequest request, Settings settings, Configuration configuration )
throws MavenEmbedderException
{
String localRepositoryPath = null;
@ -596,8 +553,7 @@ public class DefaultMavenExecutionRequestPopulator
// Profile Manager
// ------------------------------------------------------------------------
private void profileManager( MavenExecutionRequest request,
Configuration configuration )
private void profileManager( MavenExecutionRequest request, Configuration configuration )
{
// ------------------------------------------------------------------------
// Profile Manager