Resolving: MNG-881. This had to do with resource-list merging when the performRelease profile was activated. See MNG-895 for full resolution (this is a stop-gap solution for now).

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@289599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-09-16 16:27:33 +00:00
parent 38d4a61e39
commit 66dddfc944
7 changed files with 56 additions and 7 deletions

View File

@ -7,8 +7,21 @@
<dependencies>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.0.2-SNAPSHOT</version>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0-beta-1</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -2,6 +2,8 @@ package org.apache.maven.it2002;
public class Thing
{
public static final String ROLE = Thing.class.getName();
private String type;
}

View File

@ -0,0 +1,8 @@
<component-set>
<components>
<component>
<role>org.apache.maven.it2002.Thing</role>
<implementation>org.apache.maven.it2002.Thing</implementation>
</component>
</components>
</component-set>

View File

@ -0,0 +1,20 @@
package org.apache.maven.it2002;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.codehaus.plexus.PlexusTestCase;
public class ContainerDependentTest extends PlexusTestCase
{
public void testOne() throws Exception
{
ArtifactResolver resolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE );
assertNotNull( resolver );
Thing thing = (Thing) lookup( Thing.ROLE );
assertNotNull( thing );
}
}

View File

@ -7,8 +7,6 @@ mkdir target
svnadmin create --fs-type fsfs target/svnroot
rm -Rf `find project -type d -name .svn`
dir=`readlink -f ${PWD}`
svn import project file://${dir}/target/svnroot/project/trunk -m "import."
@ -22,6 +20,9 @@ rm -Rf target
#. ~/shell-switches/m2-debug-on
#echo "Enabling debugging options. Please attach the debugger."
export MAVEN_OPTS=
m2 -e release:prepare
m2 -e release:perform

View File

@ -108,7 +108,12 @@ public class PerformReleaseMojo
try
{
CommandLineUtils.executeCommandLine( cl, consumer, consumer );
int result = CommandLineUtils.executeCommandLine( cl, consumer, consumer );
if ( result != 0 )
{
throw new MojoExecutionException("Result of m2 execution is: \'" + result + "\'. Release failed." );
}
}
catch ( CommandLineException e )
{

View File

@ -101,7 +101,7 @@ public class DefaultProfileInjector
List profileResources = profileBuild.getResources();
if ( profileResources != null )
if ( profileResources != null && !profileResources.isEmpty() )
{
modelBuild.setResources( profileResources );
}