diff --git a/.cvsignore b/.cvsignore
index 6ea5b3b3a5..bd6de9b282 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -4,3 +4,4 @@ target
.project
bootstrap.repo
maven-component.i*
+.settings
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index fe56608a99..21bc9ff654 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -23,7 +23,7 @@
plexus
plexus
- 0.16
+ 0.17
xstream
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 80a11a1612..5c337fed60 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -15,6 +15,11 @@
org.apache.maven
/images/maven.gif
+
+ plexus
+ plexus-artifact-container
+ 1.0-alpha-1
+
maven
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
index 6b64748d5c..f87d7ab7ab 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
@@ -28,6 +28,7 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.apache.maven.project.ProjectBuildingException;
+import org.codehaus.plexus.ArtifactEnabledContainer;
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.context.Context;
@@ -50,7 +51,7 @@ public class DefaultMaven
extends AbstractLogEnabled
implements Maven, Contextualizable
{
- private PlexusContainer container;
+ private ArtifactEnabledContainer container;
private String mavenHome;
@@ -363,7 +364,7 @@ public class DefaultMaven
public void contextualize( Context context )
throws ContextException
{
- container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+ container = (ArtifactEnabledContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
// ----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/MavenCli.java b/maven-core/src/main/java/org/apache/maven/MavenCli.java
index 54a85fa812..c3a64f175b 100644
--- a/maven-core/src/main/java/org/apache/maven/MavenCli.java
+++ b/maven-core/src/main/java/org/apache/maven/MavenCli.java
@@ -25,6 +25,7 @@ import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.codehaus.classworlds.ClassWorld;
+import org.codehaus.plexus.embed.ArtifactEnabledEmbedder;
import org.codehaus.plexus.embed.Embedder;
import org.codehaus.plexus.util.StringUtils;
@@ -55,7 +56,7 @@ public class MavenCli
//---
- Embedder embedder = new Embedder();
+ ArtifactEnabledEmbedder embedder = new ArtifactEnabledEmbedder();
embedder.start( classWorld );
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalDecorationPhase.java b/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalDecorationPhase.java
index bbd50a4949..3cdfd51cc1 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalDecorationPhase.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalDecorationPhase.java
@@ -37,73 +37,10 @@ import java.io.IOException;
*/
public class GoalDecorationPhase extends AbstractMavenGoalPhase
{
- public static final String MAVEN_XML_DEFAULT_NAMESPACE = "mavenxml";
- public static final String MAVEN_SCRIPT = "decorators.xml";
- private GoalDecoratorBindings decorators;
- private boolean decoratorsInitialized = false;
-
public void execute( MavenGoalExecutionContext context )
throws GoalExecutionException
{
- synchronized ( this )
- {
- if ( !decoratorsInitialized )
- {
- try
- {
- initializeDecorators( context );
- }
- catch ( XmlPullParserException e )
- {
- throw new GoalExecutionException( "Error parsing decorators.xml: ", e );
- }
- catch ( IOException e )
- {
- throw new GoalExecutionException( "Error reading decorators.xml file: ", e );
- }
- }
- }
-
- context.setGoalDecoratorBindings( decorators );
+
}
- private void initializeDecorators( MavenGoalExecutionContext context )
- throws XmlPullParserException, IOException
- {
- MavenProject project = context.getProject();
-
- File pom = project.getFile();
-
- File dir = pom.getParentFile();
-
- File scriptFile = new File( dir, MAVEN_SCRIPT );
-
- if ( scriptFile.exists() )
- {
- BufferedReader reader = null;
-
- try
- {
- reader = new BufferedReader( new FileReader( scriptFile ) );
-
- GoalDecorationParser parser = new GoalDecorationParser();
- this.decorators = parser.parse( reader );
- }
- finally
- {
- if ( reader != null )
- {
- try
- {
- reader.close();
- }
- catch ( IOException e )
- {
- }
- }
- }
- }
-
- decoratorsInitialized = true;
- }
}
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
index eb1fa9f6df..fd6859c9a1 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
@@ -25,6 +25,7 @@ import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
+import org.codehaus.plexus.ArtifactEnabledContainer;
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.component.discovery.ComponentDiscoveryEvent;
@@ -62,7 +63,7 @@ public class DefaultPluginManager
protected ArtifactHandlerManager artifactHandlerManager;
- protected PlexusContainer container;
+ protected ArtifactEnabledContainer container;
protected PluginDescriptorBuilder pluginDescriptorBuilder;
@@ -279,7 +280,7 @@ public class DefaultPluginManager
public void contextualize( Context context )
throws ContextException
{
- container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+ container = (ArtifactEnabledContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
public void initialize()
diff --git a/maven-core/src/test/java/org/apache/maven/MavenTestCase.java b/maven-core/src/test/java/org/apache/maven/MavenTestCase.java
index 29eddf0c1f..e6363e0fe4 100644
--- a/maven-core/src/test/java/org/apache/maven/MavenTestCase.java
+++ b/maven-core/src/test/java/org/apache/maven/MavenTestCase.java
@@ -25,6 +25,7 @@ import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.codehaus.classworlds.ClassRealm;
import org.codehaus.classworlds.ClassWorld;
+import org.codehaus.plexus.ArtifactEnabledPlexusTestCase;
import org.codehaus.plexus.PlexusTestCase;
import java.io.File;
@@ -36,7 +37,7 @@ import java.util.List;
* @version $Id$
*/
public class MavenTestCase
- extends PlexusTestCase
+ extends ArtifactEnabledPlexusTestCase
{
protected PluginManager pluginManager;
diff --git a/maven-model/maven.mdo b/maven-model/maven.mdo
index c9a683426a..e5fe6e8066 100644
--- a/maven-model/maven.mdo
+++ b/maven-model/maven.mdo
@@ -324,6 +324,20 @@
Distribution information for a project.
DistributionManagement
+
+ preGoals
+ 4.0.0
+ Set of decorator(s) injected before the target goal(s).
+ java.util.List
+ new java.util.ArrayList()
+
+
+ postGoals
+ 4.0.0
+ Set of decorator(s) injected after the target goal(s).
+ java.util.List
+ new java.util.ArrayList()
+
@@ -1264,6 +1278,38 @@
+
+ GoalDecorator
+ 3.0.0+
+
+
+ name
+ 4.0.0
+ The target goal which should be decorated.
+ String
+
+
+ attain
+ 4.0.0
+
+ The goal which should be injected into the execution chain.
+
+ String
+
+
+
+
+ GoalDecorator
+ PreGoal
+ 4.0.0
+
+
+
+ GoalDecorator
+ PostGoal
+ 4.0.0
+
+
diff --git a/maven-plugins/maven-compiler-plugin/pom.xml b/maven-plugins/maven-compiler-plugin/pom.xml
index c138ae473d..839af27eac 100644
--- a/maven-plugins/maven-compiler-plugin/pom.xml
+++ b/maven-plugins/maven-compiler-plugin/pom.xml
@@ -18,7 +18,7 @@
plexus
plexus
- 0.16
+ 0.17
plexus
diff --git a/maven-plugins/maven-jar-plugin/pom.xml b/maven-plugins/maven-jar-plugin/pom.xml
index f54e2a13d1..bc24dd6dee 100644
--- a/maven-plugins/maven-jar-plugin/pom.xml
+++ b/maven-plugins/maven-jar-plugin/pom.xml
@@ -17,7 +17,7 @@
plexus
plexus
- 0.16
+ 0.17
maven
diff --git a/maven-plugins/maven-resources-plugin/pom.xml b/maven-plugins/maven-resources-plugin/pom.xml
index c6c261e931..270202211a 100644
--- a/maven-plugins/maven-resources-plugin/pom.xml
+++ b/maven-plugins/maven-resources-plugin/pom.xml
@@ -27,7 +27,7 @@
plexus
plexus
- 0.16
+ 0.17
diff --git a/pom.xml b/pom.xml
index de5219cafe..0a8967c4f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,7 @@
plexus
plexus
- 0.16
+ 0.17
xstream