mirror of https://github.com/apache/maven.git
[MNG-6170] NPE in cases using Multithreaded -T X versions:set
-DnewVersion=1.0-SNAPSHOT o In some cases the code will return a null which should not be scheduled.
This commit is contained in:
parent
587317b009
commit
7cdff43aba
|
@ -55,6 +55,7 @@ import org.codehaus.plexus.logging.Logger;
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Kristian Rosenvold
|
* @author Kristian Rosenvold
|
||||||
* Builds one or more lifecycles for a full module
|
* Builds one or more lifecycles for a full module
|
||||||
|
* NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
*/
|
*/
|
||||||
@Component( role = Builder.class, hint = "multithreaded" )
|
@Component( role = Builder.class, hint = "multithreaded" )
|
||||||
public class MultiThreadedBuilder
|
public class MultiThreadedBuilder
|
||||||
|
@ -67,7 +68,6 @@ public class MultiThreadedBuilder
|
||||||
@Requirement
|
@Requirement
|
||||||
private LifecycleModuleBuilder lifecycleModuleBuilder;
|
private LifecycleModuleBuilder lifecycleModuleBuilder;
|
||||||
|
|
||||||
|
|
||||||
public MultiThreadedBuilder()
|
public MultiThreadedBuilder()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,10 @@ public class MultiThreadedBuilder
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MNG-6170: Only schedule other modules from reactor if we have more modules to build than one.
|
||||||
|
if ( analyzer.getNumberOfBuilds() > 1 )
|
||||||
|
{
|
||||||
final List<MavenProject> newItemsThatCanBeBuilt =
|
final List<MavenProject> newItemsThatCanBeBuilt =
|
||||||
analyzer.markAsFinished( projectBuild.getProject() );
|
analyzer.markAsFinished( projectBuild.getProject() );
|
||||||
for ( MavenProject mavenProject : newItemsThatCanBeBuilt )
|
for ( MavenProject mavenProject : newItemsThatCanBeBuilt )
|
||||||
|
@ -153,6 +157,7 @@ public class MultiThreadedBuilder
|
||||||
service.submit( cb );
|
service.submit( cb );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch ( InterruptedException e )
|
catch ( InterruptedException e )
|
||||||
{
|
{
|
||||||
rootSession.getResult().addException( e );
|
rootSession.getResult().addException( e );
|
||||||
|
|
Loading…
Reference in New Issue