Don't modify system properties during artifact resolution

This commit is contained in:
Mikolaj Izdebski 2014-05-30 18:34:55 +02:00
parent 6adc5bc8fa
commit a0cd5a35ae
4 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,4 @@
From de2dd29f853fdb39ec5916a6c388f81ced4b61a5 Mon Sep 17 00:00:00 2001 From b0e7fb7161f2260fbbeab9435da755b2fefe6570 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 29 May 2014 18:18:30 +0200 Date: Thu, 29 May 2014 18:18:30 +0200
Subject: [PATCH 1/3] Fix JAR post-processing during installation Subject: [PATCH 1/3] Fix JAR post-processing during installation

View File

@ -1,4 +1,4 @@
From f428fae1edfc860ed2bcabf920f3cba14a5a9ef5 Mon Sep 17 00:00:00 2001 From 0584b0a5bc9aacfec5d668f891b1f8b26748c3c5 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 30 May 2014 06:52:05 +0200 Date: Fri, 30 May 2014 06:52:05 +0200
Subject: [PATCH 2/3] Respect xmvn.resolver.disableEffectivePom property Subject: [PATCH 2/3] Respect xmvn.resolver.disableEffectivePom property
@ -9,12 +9,12 @@ generated. A property saying that dependencies were
omitted is added so that XMvn won't generate effective omitted is added so that XMvn won't generate effective
POMs for artfacts with no dependencies in metadata. POMs for artfacts with no dependencies in metadata.
--- ---
.../xmvn/resolver/impl/DefaultResolver.java | 22 ++++++++++++++-------- .../xmvn/resolver/impl/DefaultResolver.java | 23 ++++++++++++++--------
.../resolver/impl/depmap/DepmapBasedResolver.java | 2 +- .../resolver/impl/depmap/DepmapBasedResolver.java | 2 +-
2 files changed, 15 insertions(+), 9 deletions(-) 2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java
index 9572dc6..8c55ebe 100644 index 9572dc6..3537988 100644
--- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java --- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java
+++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java +++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java
@@ -18,6 +18,7 @@ package org.fedoraproject.xmvn.resolver.impl; @@ -18,6 +18,7 @@ package org.fedoraproject.xmvn.resolver.impl;
@ -25,16 +25,17 @@ index 9572dc6..8c55ebe 100644
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
@@ -73,6 +74,8 @@ public class DefaultResolver @@ -73,6 +74,9 @@ public class DefaultResolver
@Override @Override
public ResolutionResult resolve( ResolutionRequest request ) public ResolutionResult resolve( ResolutionRequest request )
{ {
+ Properties properties = System.getProperties(); + Properties properties = new Properties();
+ properties.putAll( System.getProperties() );
+ +
// FIXME: bisect is not used // FIXME: bisect is not used
Artifact artifact = request.getArtifact(); Artifact artifact = request.getArtifact();
logger.debug( "Trying to resolve artifact {}", artifact ); logger.debug( "Trying to resolve artifact {}", artifact );
@@ -90,9 +93,15 @@ public class DefaultResolver @@ -90,9 +94,15 @@ public class DefaultResolver
compatVersion = artifact.getVersion(); compatVersion = artifact.getVersion();
} }
@ -51,7 +52,7 @@ index 9572dc6..8c55ebe 100644
{ {
try try
{ {
@@ -122,15 +131,12 @@ public class DefaultResolver @@ -122,15 +132,12 @@ public class DefaultResolver
} }
// TODO: drop support for depmaps // TODO: drop support for depmaps

View File

@ -1,4 +1,4 @@
From 4f01aad38d63a4f70a2ac08a9264690ffc8df133 Mon Sep 17 00:00:00 2001 From ece7609ff20c64cd58a7b38fdb851b0fd69b02d1 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 30 May 2014 09:34:41 +0200 Date: Fri, 30 May 2014 09:34:41 +0200
Subject: [PATCH 3/3] Fix return code of xmvn-install Subject: [PATCH 3/3] Fix return code of xmvn-install

View File

@ -1,6 +1,6 @@
Name: xmvn Name: xmvn
Version: 2.0.0 Version: 2.0.0
Release: 3%{?dist} Release: 4%{?dist}
Summary: Local Extensions for Apache Maven Summary: Local Extensions for Apache Maven
License: ASL 2.0 License: ASL 2.0
URL: http://mizdebsk.fedorapeople.org/xmvn URL: http://mizdebsk.fedorapeople.org/xmvn
@ -287,6 +287,9 @@ end
%doc LICENSE NOTICE %doc LICENSE NOTICE
%changelog %changelog
* Fri May 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-4
- Don't modify system properties during artifact resolution
* Fri May 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-3 * Fri May 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-3
- Add patch to support xmvn.resolver.disableEffectivePom property - Add patch to support xmvn.resolver.disableEffectivePom property