maven2/maven2-2.2.1-default-resolver-pool-size.patch

33 lines
1.3 KiB
Diff

From 9c7b1812cbca35f8bd9997e6b5e3ce93f3191840 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 28 Jun 2010 15:39:30 +0200
Subject: [PATCH] change default resolver pool size in jpp mode
---
.../artifact/resolver/DefaultArtifactResolver.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index d8c3629..0c40881 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -61,7 +61,14 @@ public class DefaultArtifactResolver
// Components
// ----------------------------------------------------------------------
- private static final int DEFAULT_POOL_SIZE = 5;
+ private static final int DEFAULT_POOL_SIZE;
+ static {
+ if (System.getProperty("maven2.jpp.mode") == null) {
+ DEFAULT_POOL_SIZE = 5;
+ } else {
+ DEFAULT_POOL_SIZE = 1;
+ }
+ }
private WagonManager wagonManager;
--
1.7.0.1