You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/05/29 19:14:10 UTC
[maven-resolver-ant-tasks] 01/01: Fix build errors
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch fixed-stuff
in repository https://gitbox.apache.org/repos/asf/maven-resolver-ant-tasks.git
commit e8138e1cfdf9875402b455361f259fa3d328bebd
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Jan 28 22:44:16 2020 +0100
Fix build errors
---
pom.xml | 6 +++---
.../internal/ant/AntSettingsDecryptorFactory.java | 19 +++----------------
2 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/pom.xml b/pom.xml
index ed2339d..184afc9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,10 +61,10 @@
</distributionManagement>
<properties>
- <mavenVersion>3.5.0</mavenVersion>
- <resolverVersion>1.3.3</resolverVersion>
+ <mavenVersion>3.7.0-SNAPSHOT</mavenVersion>
+ <resolverVersion>1.4.2-SNAPSHOT</resolverVersion>
<antVersion>1.8.4</antVersion>
- <javaVersion>7</javaVersion>
+ <javaVersion>8</javaVersion>
<maven.site.path>resolver-archives/resolver-ant-tasks-LATEST</maven.site.path>
<checkstyle.violation.ignore>LineLength,MagicNumber</checkstyle.violation.ignore>
<project.build.outputTimestamp>2020-04-07T21:04:00Z</project.build.outputTimestamp>
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
index 39ef960..e9bfe6a 100644
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
+++ b/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,8 +19,6 @@ package org.apache.maven.resolver.internal.ant;
* under the License.
*/
-import java.lang.reflect.Field;
-
import org.apache.maven.settings.crypto.DefaultSettingsDecrypter;
/**
@@ -32,18 +30,7 @@ class AntSettingsDecryptorFactory
{
AntSecDispatcher secDispatcher = new AntSecDispatcher();
- DefaultSettingsDecrypter decrypter = new DefaultSettingsDecrypter();
-
- try
- {
- Field field = decrypter.getClass().getDeclaredField( "securityDispatcher" );
- field.setAccessible( true );
- field.set( decrypter, secDispatcher );
- }
- catch ( Exception e )
- {
- throw new IllegalStateException( e );
- }
+ DefaultSettingsDecrypter decrypter = new DefaultSettingsDecrypter( secDispatcher );
return decrypter;
}