Author: jdcasey
Date: Tue Aug  9 09:11:40 2005
New Revision: 231058

URL: http://svn.apache.org/viewcvs?rev=231058&view=rev
Log:
Resolving: MNG-592 (again)

o Modified the PluginMappingDeployMojo in maven-plugin-plugin to always deploy 
the plugins.xml regardless. This may be a bit heavy, but it avoids the snag 
with the plugins.xml being detected in the local repository after the install 
phase runs...plugin mappings weren't making it to the repository during deploy.

o Added a new series of IT: it2xxx which will be tests that require more than a 
single maven invocation, and will be run via shell script, at least for now. 
This one builds and deploys a plugin, then attempts to use the plugin by 
referencing the prefix mapping in the (non-central) remote repository.


Added:
    maven/components/trunk/maven-core-it/it2000/
    maven/components/trunk/maven-core-it/it2000/plugin/
    maven/components/trunk/maven-core-it/it2000/plugin/pom.xml   (with props)
    maven/components/trunk/maven-core-it/it2000/plugin/src/
    maven/components/trunk/maven-core-it/it2000/plugin/src/main/
    maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/
    maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/
    maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/
    
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/
    
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/
    
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/
    
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/TestMojo.java
   (with props)
    maven/components/trunk/maven-core-it/it2000/project/
    maven/components/trunk/maven-core-it/it2000/project/pom.xml   (with props)
    maven/components/trunk/maven-core-it/it2000/project/settings.xml   (with 
props)
    maven/components/trunk/maven-core-it/it2000/test.sh   (with props)
Modified:
    maven/components/trunk/maven-core-it/README.txt
    
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java

Modified: maven/components/trunk/maven-core-it/README.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/README.txt?rev=231058&r1=231057&r2=231058&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/README.txt (original)
+++ maven/components/trunk/maven-core-it/README.txt Tue Aug  9 09:11:40 2005
@@ -189,3 +189,19 @@
         should also run but not fail. End result should be failure of the 
build.
 -------------------------------------------------------------------------------
 
+-------------------------------------------------------------------------------
+These are a set of builds that are more complex than single-project or reactor
+invocations. They follow a process external to maven itself, invoking
+different lifecycle phases and/or goals on multiple projects within each test
+directory in order to accomplish their aims. 
+
+NOTE: Currently, there is no verification process...
+-------------------------------------------------------------------------------
+it2000: Test resolution of plugin by prefix from the first plugin repository
+        in a list. This is accomplished by creating a local "remote" repo, and
+        deploying a plugin there. Then, in another project, that plugin's goal
+        is invoked directly with the plugin's groupId being included in the
+        pluginGroups for the build. This second build should pickup the
+        plugins.xml for the aforementioned plugin from the first repository
+        and execute. This should resolve MNG-592.
+-------------------------------------------------------------------------------

Added: maven/components/trunk/maven-core-it/it2000/plugin/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it2000/plugin/pom.xml?rev=231058&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it2000/plugin/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it2000/plugin/pom.xml Tue Aug  9 
09:11:40 2005
@@ -0,0 +1,22 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.it2000</groupId>
+  <artifactId>maven-it2000-plugin</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0-beta-1-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+  <distributionManagement>
+    <snapshotRepository>
+      <id>local</id>
+      <url>file:../test-repo</url>
+    </snapshotRepository>
+  </distributionManagement>
+</project>

Propchange: maven/components/trunk/maven-core-it/it2000/plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it2000/plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/TestMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/TestMojo.java?rev=231058&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/TestMojo.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/TestMojo.java
 Tue Aug  9 09:11:40 2005
@@ -0,0 +1,11 @@
+package org.apache.maven.plugins.it;
+
+import org.apache.maven.plugin.AbstractMojo;
+
+/**
+ * @goal test
+ */
+public class TestMojo extends AbstractMojo
+{
+    public void execute(){}
+}

Propchange: 
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/TestMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it2000/plugin/src/main/java/org/apache/maven/plugins/it/TestMojo.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it2000/project/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it2000/project/pom.xml?rev=231058&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it2000/project/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it2000/project/pom.xml Tue Aug  9 
09:11:40 2005
@@ -0,0 +1,13 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.it</groupId>
+  <artifactId>maven-it2000</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>test</id>
+      <url>file:../test-repo</url>
+    </pluginRepository>
+  </pluginRepositories>
+</project>

Propchange: maven/components/trunk/maven-core-it/it2000/project/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it2000/project/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it2000/project/settings.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it2000/project/settings.xml?rev=231058&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it2000/project/settings.xml (added)
+++ maven/components/trunk/maven-core-it/it2000/project/settings.xml Tue Aug  9 
09:11:40 2005
@@ -0,0 +1,5 @@
+<settings>
+  <pluginGroups>
+    <pluginGroup>org.apache.maven.plugins.it2000</pluginGroup>
+  </pluginGroups>
+</settings>

Propchange: maven/components/trunk/maven-core-it/it2000/project/settings.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it2000/project/settings.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it2000/test.sh
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it2000/test.sh?rev=231058&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it2000/test.sh (added)
+++ maven/components/trunk/maven-core-it/it2000/test.sh Tue Aug  9 09:11:40 2005
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo "Cleaning Test Repository"
+
+rm -Rf test-repo
+
+echo "Building Plugin"
+
+cd plugin
+
+m2 -DupdateReleaseInfo=true clean:clean deploy
+
+echo "Building Project"
+
+cd ../project
+
+m2 --settings ./settings.xml --no-plugin-registry --check-plugin-latest 
it2000:test

Propchange: maven/components/trunk/maven-core-it/it2000/test.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it2000/test.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: maven/components/trunk/maven-core-it/it2000/test.sh
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: 
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java?rev=231058&r1=231057&r2=231058&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java
 Tue Aug  9 09:11:40 2005
@@ -47,12 +47,9 @@
         {
             getRepositoryMetadataManager().resolve( metadata, 
distributionRepository, getLocalRepository() );
 
-            boolean shouldUpdate = updatePluginMap( metadata );
+            updatePluginMap( metadata );
 
-            if ( shouldUpdate )
-            {
-                getRepositoryMetadataManager().deploy( metadata, 
distributionRepository );
-            }
+            getRepositoryMetadataManager().deploy( metadata, 
distributionRepository );
         }
         catch ( RepositoryMetadataManagementException e )
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to