mirror of https://github.com/apache/maven.git
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:
parent
38d4a61e39
commit
66dddfc944
|
@ -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>
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.apache.maven.it2002;
|
|||
|
||||
public class Thing
|
||||
{
|
||||
public static final String ROLE = Thing.class.getName();
|
||||
|
||||
private String type;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
|
@ -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 );
|
||||
}
|
||||
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ public class DefaultProfileInjector
|
|||
|
||||
List profileResources = profileBuild.getResources();
|
||||
|
||||
if ( profileResources != null )
|
||||
if ( profileResources != null && !profileResources.isEmpty() )
|
||||
{
|
||||
modelBuild.setResources( profileResources );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue