mirror of https://github.com/apache/maven.git
o update the scripts for maven for the change in the location of classworlds,
which reflects the location that the plexus runtime builder places classworlds o change the internal configuration to match some of the changes made to plexus to account for elimination of xstream as a dependency. We're not all the way there because xstream is still required in the plugin tools. o a little exception handler stub which I'm going to use to clean up the huge stack traces that comes out. Going to map specific exceptions to specific errors messages and to specific entries in a FAQ to help users learn about commons errors. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163202 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0c72d1fb06
commit
f50f1b610e
|
@ -3,9 +3,7 @@ main is org.apache.maven.MavenCli from plexus.core.maven
|
||||||
set maven.home default ${user.home}/m2
|
set maven.home default ${user.home}/m2
|
||||||
|
|
||||||
[plexus.core]
|
[plexus.core]
|
||||||
load ${maven.home}/core/plexus-0.17-SNAPSHOT.jar
|
load ${maven.home}/core/*.jar
|
||||||
load ${maven.home}/core/xstream-1.0-SNAPSHOT.jar
|
|
||||||
load ${maven.home}/core/xpp3-1.1.3.3.jar
|
|
||||||
|
|
||||||
[plexus.core.maven]
|
[plexus.core.maven]
|
||||||
load ${maven.home}/lib/*.jar
|
load ${maven.home}/lib/*.jar
|
||||||
|
|
|
@ -66,8 +66,7 @@ if [ -z "$M2_HOME" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CLASSWORLDS_CONF="${M2_HOME}/bin/classworlds.conf"
|
CLASSWORLDS_CONF="${M2_HOME}/bin/classworlds.conf"
|
||||||
CP=${M2_HOME}/core/classworlds-${CLASSWORLDS_VERSION}.jar
|
CP=${M2_HOME}/core/boot/classworlds-${CLASSWORLDS_VERSION}.jar
|
||||||
#CP=${M2_HOME}/lib/classworlds-${CLASSWORLDS_VERSION}.jar
|
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
if $cygwin; then
|
if $cygwin; then
|
||||||
|
|
|
@ -121,7 +121,7 @@ goto Win9xApp
|
||||||
:endInit
|
:endInit
|
||||||
if "%MAVEN_OPTS%"=="" SET MAVEN_OPTS="-Xmx256m"
|
if "%MAVEN_OPTS%"=="" SET MAVEN_OPTS="-Xmx256m"
|
||||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
SET MAVEN_CLASSPATH="%M2_HOME%\core\classworlds-%CLASSWORLDS_VERSION%.jar"
|
SET MAVEN_CLASSPATH="%M2_HOME%\core\boot\classworlds-%CLASSWORLDS_VERSION%.jar"
|
||||||
SET MAVEN_MAIN_CLASS=org.codehaus.classworlds.Launcher
|
SET MAVEN_MAIN_CLASS=org.codehaus.classworlds.Launcher
|
||||||
SET CLASSWORLDS_CONF="%M2_HOME%\bin\classworlds.conf"
|
SET CLASSWORLDS_CONF="%M2_HOME%\bin\classworlds.conf"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package org.apache.maven;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 2001-2004 The Apache Software Foundation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This will be the place where we track anything that can possibly go wrong with a
|
||||||
|
* Maven build and try to provide as much help to the user as possible when
|
||||||
|
* something does go wrong. This will force us to get specific with exception
|
||||||
|
* handling because we should be able to point a user to a spot in the documentation
|
||||||
|
* which explains why a particular exception happened.
|
||||||
|
*
|
||||||
|
* o poorly formed XML POMs (make an error handler for xpp3)
|
||||||
|
* o missing artifacts
|
||||||
|
* o non existent goals
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class MavenExceptionHandler
|
||||||
|
{
|
||||||
|
}
|
|
@ -24,6 +24,7 @@ import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
||||||
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
|
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
|
||||||
import org.codehaus.plexus.ArtifactEnabledContainer;
|
import org.codehaus.plexus.ArtifactEnabledContainer;
|
||||||
import org.codehaus.plexus.PlexusConstants;
|
import org.codehaus.plexus.PlexusConstants;
|
||||||
|
import org.codehaus.plexus.PlexusContainer;
|
||||||
import org.codehaus.plexus.component.discovery.ComponentDiscoveryEvent;
|
import org.codehaus.plexus.component.discovery.ComponentDiscoveryEvent;
|
||||||
import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener;
|
import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener;
|
||||||
import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
|
import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
|
||||||
|
@ -55,7 +56,7 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
protected ArtifactHandlerManager artifactHandlerManager;
|
protected ArtifactHandlerManager artifactHandlerManager;
|
||||||
|
|
||||||
protected ArtifactEnabledContainer container;
|
protected PlexusContainer container;
|
||||||
|
|
||||||
protected PluginDescriptorBuilder pluginDescriptorBuilder;
|
protected PluginDescriptorBuilder pluginDescriptorBuilder;
|
||||||
|
|
||||||
|
@ -201,9 +202,16 @@ public class DefaultPluginManager
|
||||||
{
|
{
|
||||||
artifactResolver = (ArtifactResolver) container.lookup( ArtifactResolver.ROLE );
|
artifactResolver = (ArtifactResolver) container.lookup( ArtifactResolver.ROLE );
|
||||||
|
|
||||||
MavenMetadataSource sr = new MavenMetadataSource( remotePluginRepositories, localRepository, artifactResolver );
|
MavenMetadataSource metadataSource = new MavenMetadataSource( remotePluginRepositories,
|
||||||
|
localRepository,
|
||||||
|
artifactResolver );
|
||||||
|
|
||||||
container.addComponent( pluginArtifact, artifactResolver, remotePluginRepositories, localRepository, sr, artifactFilter );
|
( (ArtifactEnabledContainer) container ).addComponent( pluginArtifact,
|
||||||
|
artifactResolver,
|
||||||
|
remotePluginRepositories,
|
||||||
|
localRepository,
|
||||||
|
metadataSource,
|
||||||
|
artifactFilter );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void contextualize( Context context )
|
public void contextualize( Context context )
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<plexus>
|
<plexus>
|
||||||
<component-discoverer-manager implementation="org.codehaus.plexus.component.discovery.DefaultComponentDiscovererManager">
|
<component-discoverer-manager implementation="org.codehaus.plexus.component.discovery.DefaultComponentDiscovererManager">
|
||||||
<listeners>
|
<listeners>
|
||||||
<listener>
|
<listener implementation="org.codehaus.plexus.component.discovery.DiscoveryListenerDescriptor">
|
||||||
<role>org.apache.maven.plugin.PluginManager</role>
|
<role>org.apache.maven.plugin.PluginManager</role>
|
||||||
</listener>
|
</listener>
|
||||||
</listeners>
|
</listeners>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
-----
|
||||||
|
Maven2
|
||||||
|
-----
|
||||||
|
Jason van Zyl
|
||||||
|
-----
|
||||||
|
|
||||||
|
Maven2
|
||||||
|
|
||||||
|
This is maven2. Dig it.
|
Loading…
Reference in New Issue