maven/0001-MNG-5696-Remove-dependency-on-Easymock.patch

153 lines
5.2 KiB
Diff
Raw Normal View History

2014-09-29 11:07:49 +00:00
From 44bd2d20c196427c66577236ec62aaa77ecbd974 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 29 Aug 2013 10:11:48 +0200
2014-09-29 11:07:49 +00:00
Subject: [PATCH 1/3] [MNG-5696] Remove dependency on Easymock
2014-09-29 11:07:49 +00:00
Easymock is not really used for anything, so it can be removed.
---
2014-09-29 11:07:49 +00:00
maven-compat/pom.xml | 5 --
.../maven/artifact/testutils/MockManager.java | 58 ----------------------
2014-09-29 11:07:49 +00:00
.../repository/legacy/DefaultWagonManagerTest.java | 6 ---
pom.xml | 9 ----
4 files changed, 78 deletions(-)
delete mode 100644 maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
2014-09-29 11:07:49 +00:00
index 02ac0d3..28db8ba 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
2014-09-29 11:07:49 +00:00
@@ -82,11 +82,6 @@
<artifactId>aether-connector-wagon</artifactId>
<scope>test</scope>
</dependency>
2014-09-29 11:07:49 +00:00
- <dependency>
- <groupId>easymock</groupId>
2014-09-29 11:07:49 +00:00
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java b/maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java
deleted file mode 100644
index 4b6f637..0000000
--- a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.apache.maven.artifact.testutils;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * 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
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.easymock.MockControl;
-
-public class MockManager
-{
-
- private List mockControls = new ArrayList();
-
- public void add( MockControl control )
- {
- mockControls.add( control );
- }
-
- public void replayAll()
- {
- for ( Object mockControl : mockControls )
- {
- MockControl control = (MockControl) mockControl;
-
- control.replay();
- }
- }
-
- public void verifyAll()
- {
- for ( Object mockControl : mockControls )
- {
- MockControl control = (MockControl) mockControl;
-
- control.verify();
- }
- }
-
-}
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java
2014-09-29 11:07:49 +00:00
index bcda50a..068c0e0 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java
2014-09-29 11:07:49 +00:00
@@ -45,7 +45,6 @@
import org.apache.maven.wagon.observers.Debug;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.util.FileUtils;
-import org.easymock.MockControl;
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
2014-09-29 11:07:49 +00:00
@@ -162,15 +161,10 @@ public void testGetRemoteJar()
StringWagon wagon = (StringWagon) wagonManager.getWagon( "string" );
wagon.addExpectedContent( repo.getLayout().pathOf( artifact ), "expected" );
- MockControl control = MockControl.createControl( UpdateCheckManager.class );
- control.replay();
2014-09-29 11:07:49 +00:00
-
wagonManager.getArtifact( artifact, repo, null, false );
assertTrue( artifact.getFile().exists() );
assertEquals( "expected", FileUtils.fileRead( artifact.getFile(), "UTF-8" ) );
2014-09-29 11:07:49 +00:00
-
- control.verify();
}
private Artifact createTestPomArtifact( String directory )
diff --git a/pom.xml b/pom.xml
2014-09-29 11:07:49 +00:00
index 6015e4d..b4c5ebf 100644
--- a/pom.xml
+++ b/pom.xml
2014-09-29 11:07:49 +00:00
@@ -46,7 +46,6 @@
2014-06-18 16:05:08 +00:00
<maven.compiler.target>1.6</maven.compiler.target>
2013-10-07 08:45:52 +00:00
<classWorldsVersion>2.5.1</classWorldsVersion>
<commonsCliVersion>1.2</commonsCliVersion>
- <easyMockVersion>1.2_Java1.3</easyMockVersion>
<junitVersion>3.8.2</junitVersion>
<plexusVersion>1.5.5</plexusVersion>
2013-10-07 08:45:52 +00:00
<plexusInterpolationVersion>1.19</plexusInterpolationVersion>
2014-09-29 11:07:49 +00:00
@@ -342,14 +341,6 @@
<artifactId>plexus-cipher</artifactId>
<version>${cipherVersion}</version>
</dependency>
2014-09-29 11:07:49 +00:00
- <!--bootstrap-start-comment-->
- <dependency>
- <groupId>easymock</groupId>
2014-09-29 11:07:49 +00:00
- <artifactId>easymock</artifactId>
- <version>${easyMockVersion}</version>
- <scope>test</scope>
- </dependency>
- <!--bootstrap-end-comment-->
</dependencies>
<!--bootstrap-start-comment-->
</dependencyManagement>
--
2014-06-18 16:05:08 +00:00
1.9.3