You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2017/02/24 21:56:43 UTC
[1/2] maven git commit: [MNG-6177] The --file command line option of
the Windows and Unix launchers does not work for directory names like "Spaces
& Special Char" [Forced Update!]
Repository: maven
Updated Branches:
refs/heads/MNG-6170 4b94c048f -> 62c12ec29 (forced update)
[MNG-6177] The --file command line option of the Windows and Unix launchers does not work for directory names like "Spaces & Special Char"
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/0b9a30f3
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/0b9a30f3
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/0b9a30f3
Branch: refs/heads/MNG-6170
Commit: 0b9a30f350f159a190e87c78e520ba7a7ae0642b
Parents: 0db5e32
Author: Christian Schulte <sc...@apache.org>
Authored: Thu Feb 23 03:14:21 2017 +0100
Committer: Christian Schulte <sc...@apache.org>
Committed: Fri Feb 24 00:55:29 2017 +0100
----------------------------------------------------------------------
apache-maven/src/bin/mvn | 6 +++---
apache-maven/src/bin/mvn.cmd | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/0b9a30f3/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 95a407d..cfb39b0 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -141,9 +141,9 @@ find_file_argument_basedir() {
found_file_switch=0
for arg in "$@"; do
if [ ${found_file_switch} -eq 1 ]; then
- if [ -f ${arg} ]; then
- basedir=$(dirname $(readlink -f "${arg}"))
- if [ ! -d ${basedir} ]; then
+ if [ -f "${arg}" ]; then
+ basedir=$(dirname "$(readlink -f "${arg}")")
+ if [ ! -d "${basedir}" ]; then
echo "Directory ${basedir} extracted from the -f/--file command-line argument ${arg} does not exist" >&2
exit 1
fi
http://git-wip-us.apache.org/repos/asf/maven/blob/0b9a30f3/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index e527188..c86662b 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -120,7 +120,7 @@ if not exist "%FILE_ARG%" (
echo POM file %FILE_ARG% specified the -f/--file command-line argument does not exist >&2
goto error
)
-call :get_directory_from_file %FILE_ARG%
+call :get_directory_from_file "%FILE_ARG%"
if not exist "%POM_DIR%" (
echo Directory %POM_DIR% extracted from the -f/--file command-line argument %FILE_ARG% does not exist >&2
goto error
[2/2] maven git commit: [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.
Posted by kh...@apache.org.
[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.
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/62c12ec2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/62c12ec2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/62c12ec2
Branch: refs/heads/MNG-6170
Commit: 62c12ec29000aa57652fe6b2cb12571b88440c0c
Parents: 0b9a30f
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Sun Feb 12 12:59:25 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Fri Feb 24 22:56:28 2017 +0100
----------------------------------------------------------------------
.../multithreaded/MultiThreadedBuilder.java | 29 +++++++++++---------
1 file changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/62c12ec2/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
index f0fa2ac..880410e 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
@@ -51,8 +51,7 @@ import org.codehaus.plexus.logging.Logger;
* will always result in a sequential build, regardless of the thread count.
*
* @since 3.0
- * @author Kristian Rosenvold
- * Builds one or more lifecycles for a full module
+ * @author Kristian Rosenvold Builds one or more lifecycles for a full module
* <p/>
* NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
*/
@@ -67,7 +66,6 @@ public class MultiThreadedBuilder
@Requirement
private LifecycleModuleBuilder lifecycleModuleBuilder;
-
public MultiThreadedBuilder()
{
}
@@ -142,15 +140,20 @@ public class MultiThreadedBuilder
{
break;
}
- final List<MavenProject> newItemsThatCanBeBuilt =
- analyzer.markAsFinished( projectBuild.getProject() );
- for ( MavenProject mavenProject : newItemsThatCanBeBuilt )
+
+ // MNG-6170: Only schedule other modules from reactor if we have more modules to build than one.
+ if ( analyzer.getNumberOfBuilds() > 1 )
{
- ProjectSegment scheduledDependent = projectBuildList.get( mavenProject );
- logger.debug( "Scheduling: " + scheduledDependent );
- Callable<ProjectSegment> cb =
- createBuildCallable( rootSession, scheduledDependent, reactorContext, taskSegment, muxer );
- service.submit( cb );
+ final List<MavenProject> newItemsThatCanBeBuilt =
+ analyzer.markAsFinished( projectBuild.getProject() );
+ for ( MavenProject mavenProject : newItemsThatCanBeBuilt )
+ {
+ ProjectSegment scheduledDependent = projectBuildList.get( mavenProject );
+ logger.debug( "Scheduling: " + scheduledDependent );
+ Callable<ProjectSegment> cb =
+ createBuildCallable( rootSession, scheduledDependent, reactorContext, taskSegment, muxer );
+ service.submit( cb );
+ }
}
}
catch ( InterruptedException e )
@@ -160,13 +163,13 @@ public class MultiThreadedBuilder
}
catch ( ExecutionException e )
{
- // TODO MNG-5766 changes likely made this redundant
+ // TODO MNG-5766 changes likely made this redundant
rootSession.getResult().addException( e );
break;
}
}
- // cancel outstanding builds (if any) - this can happen if an exception is thrown in above block
+ // cancel outstanding builds (if any) - this can happen if an exception is thrown in above block
Future<ProjectSegment> unprocessed;
while ( ( unprocessed = service.poll() ) != null )