mirror of https://github.com/apache/maven.git
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. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
70eadfd14d
commit
1e1efffcba
|
@ -189,3 +189,19 @@ it1011: Tests the fail-at-end reactor behavior. First module fails, and second
|
|||
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.
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
|
@ -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>
|
|
@ -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(){}
|
||||
}
|
|
@ -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>
|
|
@ -0,0 +1,5 @@
|
|||
<settings>
|
||||
<pluginGroups>
|
||||
<pluginGroup>org.apache.maven.plugins.it2000</pluginGroup>
|
||||
</pluginGroups>
|
||||
</settings>
|
|
@ -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
|
|
@ -47,12 +47,9 @@ public class PluginMappingDeployMojo
|
|||
{
|
||||
getRepositoryMetadataManager().resolve( metadata, distributionRepository, getLocalRepository() );
|
||||
|
||||
boolean shouldUpdate = updatePluginMap( metadata );
|
||||
updatePluginMap( metadata );
|
||||
|
||||
if ( shouldUpdate )
|
||||
{
|
||||
getRepositoryMetadataManager().deploy( metadata, distributionRepository );
|
||||
}
|
||||
getRepositoryMetadataManager().deploy( metadata, distributionRepository );
|
||||
}
|
||||
catch ( RepositoryMetadataManagementException e )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue