Establish library compliance for powermock and its dependencies

There are no significant differences between 1.6.4 and 1.6.1 [0] so it
is easy for us to downgrade. Google has a one version policy for all
libraries. I've tried to upgrade the internal version of
powermock/easymock, but unfortunately it is used very widely and
1.6.4 has made some API changes that break a lot of builds. As there is
no real difference in those version for the use within Gerrit, it is
easier to downgrade to 1.6.1 as there are no real drawbacks for us.

[0] https://github.com/jayway/powermock/blob/master/changelog.txt

Change-Id: I1c16ff474b5730389ab20bad47eae781841369d6
This commit is contained in:
Patrick Hiesel
2016-09-15 15:13:11 -04:00
parent 1e1a37670c
commit 3ef6bc7f99
5 changed files with 41 additions and 42 deletions

View File

@@ -577,58 +577,58 @@ maven_jar(
maven_jar(
name = 'easymock',
artifact = 'org.easymock:easymock:3.4', # When bumping the version
sha1 = '9fdeea183a399f25c2469497612cad131e920fa3',
artifact = 'org.easymock:easymock:3.1', # When bumping the version
sha1 = '3e127311a86fc2e8f550ef8ee4abe094bbcf7e7e',
)
maven_jar(
name = 'cglib_2_2',
artifact = 'cglib:cglib-nodep:2.2.2',
sha1 = '00d456bb230c70c0b95c76fb28e429d42f275941',
name = 'cglib_3_2',
artifact = 'cglib:cglib-nodep:3.2.0',
sha1 = 'cf1ca207c15b04ace918270b6cb3f5601160cdfd',
)
maven_jar(
name = 'objenesis',
artifact = 'org.objenesis:objenesis:2.2',
sha1 = '3fb533efdaa50a768c394aa4624144cf8df17845',
artifact = 'org.objenesis:objenesis:1.3',
sha1 = 'dc13ae4faca6df981fc7aeb5a522d9db446d5d50',
)
POWERM_VERS = '1.6.4'
POWERM_VERS = '1.6.1'
maven_jar(
name = 'powermock_module_junit4',
artifact = 'org.powermock:powermock-module-junit4:' + POWERM_VERS,
sha1 = '8692eb1d9bb8eb1310ffe8a20c2da7ee6d1b5994',
sha1 = 'ea8530b2848542624f110a393513af397b37b9cf',
)
maven_jar(
name = 'powermock_module_junit4_common',
artifact = 'org.powermock:powermock-module-junit4-common:' + POWERM_VERS,
sha1 = 'b0b578da443794ceb8224bd5f5f852aaf40f1b81',
sha1 = '7222ced54dabc310895d02e45c5428ca05193cda',
)
maven_jar(
name = 'powermock_reflect',
artifact = 'org.powermock:powermock-reflect:' + POWERM_VERS,
sha1 = '5532f4e7c42db4bca4778bc9f1afcd4b0ee0b893',
sha1 = '97d25eda8275c11161bcddda6ef8beabd534c878',
)
maven_jar(
name = 'powermock_api_easymock',
artifact = 'org.powermock:powermock-api-easymock:' + POWERM_VERS,
sha1 = '5c385a0d8c13f84b731b75c6e90319c532f80b45',
sha1 = 'aa740ecf89a2f64d410b3d93ef8cd6833009ef00',
)
maven_jar(
name = 'powermock_api_support',
artifact = 'org.powermock:powermock-api-support:' + POWERM_VERS,
sha1 = '314daafb761541293595630e10a3699ebc07881d',
sha1 = '592ee6d929c324109d3469501222e0c76ccf0869',
)
maven_jar(
name = 'powermock_core',
artifact = 'org.powermock:powermock-core:' + POWERM_VERS,
sha1 = '85fb32e9ccba748d569fc36aef92e0b9e7f40b87',
sha1 = '5afc1efce8d44ed76b30af939657bd598e45d962',
)
maven_jar(

View File

@@ -17,7 +17,6 @@ package com.google.gerrit.httpd;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.capture;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.newCapture;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.gerrit.extensions.registration.ReloadableRegistrationHandle;
@@ -145,7 +144,7 @@ public class AllRequestFilterFilterProxyTest {
IMocksControl mockControl = ems.createStrictControl();
FilterChain chain = mockControl.createMock(FilterChain.class);
Capture<FilterChain> capturedChain = newCapture();
Capture<FilterChain> capturedChain = new Capture();
AllRequestFilter filter = mockControl.createMock(AllRequestFilter.class);
filter.init(config);
@@ -210,8 +209,8 @@ public class AllRequestFilterFilterProxyTest {
IMocksControl mockControl = ems.createStrictControl();
FilterChain chain = mockControl.createMock(FilterChain.class);
Capture<FilterChain> capturedChainA = newCapture();
Capture<FilterChain> capturedChainB = newCapture();
Capture<FilterChain> capturedChainA = new Capture();
Capture<FilterChain> capturedChainB = new Capture();
AllRequestFilter filterA = mockControl.createMock(AllRequestFilter.class);
AllRequestFilter filterB = mockControl.createMock(AllRequestFilter.class);
@@ -252,9 +251,9 @@ public class AllRequestFilterFilterProxyTest {
IMocksControl mockControl = ems.createStrictControl();
FilterChain chain = mockControl.createMock("chain", FilterChain.class);
Capture<FilterChain> capturedChainA1 = newCapture();
Capture<FilterChain> capturedChainA2 = newCapture();
Capture<FilterChain> capturedChainB = newCapture();
Capture<FilterChain> capturedChainA1 = new Capture();
Capture<FilterChain> capturedChainA2 = new Capture();
Capture<FilterChain> capturedChainB = new Capture();
AllRequestFilter filterA = mockControl.createMock("filterA", AllRequestFilter.class);
AllRequestFilter filterB = mockControl.createMock("filterB", AllRequestFilter.class);
@@ -308,9 +307,9 @@ public class AllRequestFilterFilterProxyTest {
IMocksControl mockControl = ems.createStrictControl();
FilterChain chain = mockControl.createMock("chain", FilterChain.class);
Capture<FilterChain> capturedChainA1 = newCapture();
Capture<FilterChain> capturedChainB1 = newCapture();
Capture<FilterChain> capturedChainB2 = newCapture();
Capture<FilterChain> capturedChainA1 = new Capture();
Capture<FilterChain> capturedChainB1 = new Capture();
Capture<FilterChain> capturedChainB2 = new Capture();
AllRequestFilter filterA = mockControl.createMock("filterA", AllRequestFilter.class);
AllRequestFilter filterB = mockControl.createMock("filterB", AllRequestFilter.class);

View File

@@ -2,28 +2,28 @@ include_defs('//lib/maven.defs')
maven_jar(
name = 'easymock',
id = 'org.easymock:easymock:3.4', # When bumping the version
id = 'org.easymock:easymock:3.1', # When bumping the version
# number, make sure to also move powermock to a compatible version
sha1 = '9fdeea183a399f25c2469497612cad131e920fa3',
sha1 = '3e127311a86fc2e8f550ef8ee4abe094bbcf7e7e',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':cglib-2_2',
':cglib-3_2',
':objenesis',
],
)
maven_jar(
name = 'cglib-2_2',
id = 'cglib:cglib-nodep:2.2.2',
sha1 = '00d456bb230c70c0b95c76fb28e429d42f275941',
name = 'cglib-3_2',
id = 'cglib:cglib-nodep:3.2.0',
sha1 = 'cf1ca207c15b04ace918270b6cb3f5601160cdfd',
license = 'DO_NOT_DISTRIBUTE',
attach_source = False,
)
maven_jar(
name = 'objenesis',
id = 'org.objenesis:objenesis:2.2',
sha1 = '3fb533efdaa50a768c394aa4624144cf8df17845',
id = 'org.objenesis:objenesis:1.3',
sha1 = 'dc13ae4faca6df981fc7aeb5a522d9db446d5d50',
license = 'DO_NOT_DISTRIBUTE',
visibility = ['//lib/powermock:powermock-reflect'],
attach_source = False,

View File

@@ -2,15 +2,15 @@ java_library(
name = 'easymock',
exports = ['@easymock//jar'],
runtime_deps = [
':cglib-2_2',
':cglib-3_2',
':objenesis',
],
visibility = ['//visibility:public'],
)
java_library(
name = 'cglib-2_2',
exports = ['@cglib_2_2//jar'],
name = 'cglib-3_2',
exports = ['@cglib_3_2//jar'],
visibility = ['//visibility:public'],
)

View File

@@ -1,12 +1,12 @@
include_defs('//lib/maven.defs')
VERSION = '1.6.4' # When bumping VERSION, make sure to also move
VERSION = '1.6.1' # When bumping VERSION, make sure to also move
# easymock to a compatible version
maven_jar(
name = 'powermock-module-junit4',
id = 'org.powermock:powermock-module-junit4:' + VERSION,
sha1 = '8692eb1d9bb8eb1310ffe8a20c2da7ee6d1b5994',
sha1 = 'ea8530b2848542624f110a393513af397b37b9cf',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-module-junit4-common',
@@ -17,7 +17,7 @@ maven_jar(
maven_jar(
name = 'powermock-module-junit4-common',
id = 'org.powermock:powermock-module-junit4-common:' + VERSION,
sha1 = 'b0b578da443794ceb8224bd5f5f852aaf40f1b81',
sha1 = '7222ced54dabc310895d02e45c5428ca05193cda',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-reflect',
@@ -28,7 +28,7 @@ maven_jar(
maven_jar(
name = 'powermock-reflect',
id = 'org.powermock:powermock-reflect:' + VERSION,
sha1 = '5532f4e7c42db4bca4778bc9f1afcd4b0ee0b893',
sha1 = '97d25eda8275c11161bcddda6ef8beabd534c878',
license = 'DO_NOT_DISTRIBUTE',
deps = [
'//lib:junit',
@@ -39,7 +39,7 @@ maven_jar(
maven_jar(
name = 'powermock-api-easymock',
id = 'org.powermock:powermock-api-easymock:' + VERSION,
sha1 = '5c385a0d8c13f84b731b75c6e90319c532f80b45',
sha1 = 'aa740ecf89a2f64d410b3d93ef8cd6833009ef00',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-api-support',
@@ -50,7 +50,7 @@ maven_jar(
maven_jar(
name = 'powermock-api-support',
id = 'org.powermock:powermock-api-support:' + VERSION,
sha1 = '314daafb761541293595630e10a3699ebc07881d',
sha1 = '592ee6d929c324109d3469501222e0c76ccf0869',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-core',
@@ -62,7 +62,7 @@ maven_jar(
maven_jar(
name = 'powermock-core',
id = 'org.powermock:powermock-core:' + VERSION,
sha1 = '85fb32e9ccba748d569fc36aef92e0b9e7f40b87',
sha1 = '5afc1efce8d44ed76b30af939657bd598e45d962',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-reflect',