[1/2] incubator-groovy git commit: Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] incubator-groovy git commit: Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings:

pascalschumacher
Repository: incubator-groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 60bebe1d6 -> 2c1828829


Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings:

Also adapt STCExtensionMethodsTest and therefore move jar creation into ExtensionModuleHelperForTests


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/2c182882
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/2c182882
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/2c182882

Branch: refs/heads/GROOVY_2_4_X
Commit: 2c1828829342218f08296c582109a7b45682d396
Parents: 970d9bc9
Author: pascalschumacher <[hidden email]>
Authored: Sun Jun 14 19:58:57 2015 +0200
Committer: pascalschumacher <[hidden email]>
Committed: Sun Jun 14 20:05:29 2015 +0200

----------------------------------------------------------------------
 .../stc/STCExtensionMethodsTest.groovy          |  16 +--
 .../m12n/ExtensionModuleHelperForTests.groovy   | 129 ++++++++++++++++++-
 .../runtime/m12n/ExtensionModuleTest.groovy     | 120 +----------------
 3 files changed, 135 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/2c182882/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy b/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
index b8260c8..76d1597 100644
--- a/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
+++ b/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
@@ -37,7 +37,9 @@ class STCExtensionMethodsTest extends StaticTypeCheckingTestCase {
     }
 
     void testShouldFindExtensionMethodWithGrab() {
-        ExtensionModuleHelperForTests.doInFork('groovy.transform.stc.StaticTypeCheckingTestCase', '''
+        URL moduleTest12JarURL = ExtensionModuleHelperForTests.createModuleTest12Jar()
+
+        ExtensionModuleHelperForTests.doInFork('groovy.transform.stc.StaticTypeCheckingTestCase', """
         def impl = new MetaClassImpl(String)
         impl.initialize()
         String.metaClass = impl
@@ -45,13 +47,9 @@ class STCExtensionMethodsTest extends StaticTypeCheckingTestCase {
         // ensure that the module isn't loaded
         assert !registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
 
-        // find jar resource
-        def jarURL = this.class.getResource("/jars")
-        assert jarURL
-
-        def resolver = "@GrabResolver(name='local',root='$jarURL')"
+        def resolver = "@GrabResolver(name='local',root='$moduleTest12JarURL')"
 
-        assertScript resolver + """
+        assertScript resolver + '''
         @Grab('module-test:module-test:1.2-test')
         import org.codehaus.groovy.runtime.m12n.*
 
@@ -60,8 +58,8 @@ class STCExtensionMethodsTest extends StaticTypeCheckingTestCase {
         assert str.reverseToUpperCase2() == str.toUpperCase().reverse()
         // a static method added to String thanks to a @Grab extension
         assert String.answer2() == 42
-        """
-        ''')
+        '''
+        """)
     }
 
     void testExtensionMethodWithGenericsAndPrimitiveReceiver() {

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/2c182882/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
index 997fc50..01fb34e 100644
--- a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
+++ b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
@@ -19,15 +19,138 @@
 
 package org.codehaus.groovy.runtime.m12n
 
-import org.codehaus.groovy.tools.FileSystemCompiler;
-
 public class ExtensionModuleHelperForTests {
+
+    // Apache License does not allow jars/binaries in the source
+    private static final String moduleTest12JarContentsBase64Encoded =
+'''UEsDBBQAAAAIALSK2UBQTDGungAAAEABAAA9ABwATUVUQS1JTkYvc2VydmljZXMvb3JnLmNvZGVo
+YXVzLmdyb292eS5ydW50aW1lLkV4dGVuc2lvbk1vZHVsZVVUCQADBILoTwSC6E91eAsAAQTpAwAA
+BOkDAACdjr8OgkAMh/d7ij6AHpGdyRAnXSTuJxS4CFfT9vzz9nJRGJyMU9P2931tlkHVe4HWDwhT
+jYINKIGiKGiPgA/FIJ4CjNTEKdSyG/FOfDHvwWFqiyrF5wAx7NidP/sTcsKLjc3XyWoW43ZwIigF
+cWdrarB3UWzHRLen5RjUj2jHTR5ssh+VfejKmc1XP1F7d10QI+rU1+Wf5xP7/YQxL1BLAwQKAAAA
+AACpYaRAAAAAAAAAAAAAAAAAEgAcAE1FVEEtSU5GL3NlcnZpY2VzL1VUCQADvqujT9Wro091eAsA
+AQTpAwAABOkDAABQSwMECgAAAAAAXZ6JPwAAAAAAAAAAAAAAAAkAHABNRVRBLUlORi9VVAkAA5FY
+4k6eq6NPdXgLAAEE6QMAAATpAwAAUEsDBAoAAAAAAOxipEAAAAAAAAAAAAAAAAAhABwAb3JnL2Nv
+ZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVVQJAAMbrqNPI66jT3V4CwABBOkDAAAE6QMAAFBL
+AwQKAAAAAADhYqRAAAAAAAAAAAAAAAAAHAAcAG9yZy9jb2RlaGF1cy9ncm9vdnkvcnVudGltZS9V
+VAkAAwauo08jrqNPdXgLAAEE6QMAAATpAwAAUEsDBAoAAAAAAOFipEAAAAAAAAAAAAAAAAAUABwA
+b3JnL2NvZGVoYXVzL2dyb292eS9VVAkAAwauo08jrqNPdXgLAAEE6QMAAATpAwAAUEsDBAoAAAAA
+AOFipEAAAAAAAAAAAAAAAAANABwAb3JnL2NvZGVoYXVzL1VU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kZWhhdXMvVVQFAAP0DKBUdXgLAAEE6AMAAAToAwAAUEsBAh4DCgAA
+AAAACnicRQAAAAAAAAAAAAAAABQAGAAAAAAAAAAQAO1BEwMAAG9yZy9jb2RlaGF1cy9ncm9vdnkv
+VVQFAAP0DKBUdXgLAAEE6AMAAAToAwAAUEsBAh4DCgAAAAAACnicRQAAAAAAAAAAAAAAABwAGAAA
+AAAAAAAQAO1BYQMAAG9yZy9jb2RlaGF1cy9ncm9vdnkvcnVudGltZS9VVAUAA/QMoFR1eAsAAQTo
+AwAABOgDAABQSwECHgMKAAAAAAAmd51FAAAAAAAAAAAAAAAAIQAYAAAAAAAAABAA7UG3AwAAb3Jn
+L2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVVQFAAO3XaFUdXgLAAEE6AMAAAToAwAAUEsB
+Ah4DFAAAAAgAJnedRWoZjhBtAQAAbAIAADoAGAAAAAAAAAAAAKSBEgQAAG9yZy9jb2RlaGF1cy9n
+cm9vdnkvcnVudGltZS9tMTJuL0dyb292eTcyMjVFeHRlbnNpb24uY2xhc3NVVAUAA7ddoVR1eAsA
+AQToAwAABOgDAABQSwUGAAAAAAsACwDkAwAA8wUAAAAA'''
+
+    static URL createModuleTest12Jar(){
+        createTestJar('module-test-1.2-test', moduleTest12JarContentsBase64Encoded)
+    }
+
+    static URL createModuleTest107225Jar() {
+        createTestJar('module-test-1.0.7225-test', moduleTest107225JarContentsBase64Encoded)
+    }
+
+    private static URL createTestJar(String name, String base64Content) {
+        File tmpJar = File.createTempFile(name, 'jar')
+        tmpJar.deleteOnExit()
+        tmpJar << base64Content.decodeBase64()
+        tmpJar.toURI().toURL()
+    }
+
     static void doInFork(String code) {
         doInFork("GroovyTestCase", code)
     }
 
     static void doInFork(String baseTestClass, String code) {
-        File baseDir = FileSystemCompiler.createTempDir()
+        File baseDir = File.createTempDir()
         File source = new File(baseDir, 'Temp.groovy')
         source << """import org.codehaus.groovy.runtime.m12n.*
     class TempTest extends $baseTestClass {

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/2c182882/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
index 26e5dfb..5497e29 100644
--- a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
@@ -23,128 +23,12 @@ package org.codehaus.groovy.runtime.m12n
  */
 class ExtensionModuleTest extends GroovyTestCase {
 
-    // Apache License does not allow jars/binaries in the source
-    private static final String moduleTest12JarContentsBase64Encoded =
-'''UEsDBBQAAAAIALSK2UBQTDGungAAAEABAAA9ABwATUVUQS1JTkYvc2VydmljZXMvb3JnLmNvZGVo
-YXVzLmdyb292eS5ydW50aW1lLkV4dGVuc2lvbk1vZHVsZVVUCQADBILoTwSC6E91eAsAAQTpAwAA
-BOkDAACdjr8OgkAMh/d7ij6AHpGdyRAnXSTuJxS4CFfT9vzz9nJRGJyMU9P2931tlkHVe4HWDwhT
-jYINKIGiKGiPgA/FIJ4CjNTEKdSyG/FOfDHvwWFqiyrF5wAx7NidP/sTcsKLjc3XyWoW43ZwIigF
-cWdrarB3UWzHRLen5RjUj2jHTR5ssh+VfejKmc1XP1F7d10QI+rU1+Wf5xP7/YQxL1BLAwQKAAAA
-AACpYaRAAAAAAAAAAAAAAAAAEgAcAE1FVEEtSU5GL3NlcnZpY2VzL1VUCQADvqujT9Wro091eAsA
-AQTpAwAABOkDAABQSwMECgAAAAAAXZ6JPwAAAAAAAAAAAAAAAAkAHABNRVRBLUlORi9VVAkAA5FY
-4k6eq6NPdXgLAAEE6QMAAATpAwAAUEsDBAoAAAAAAOxipEAAAAAAAAAAAAAAAAAhABwAb3JnL2Nv
-ZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVVQJAAMbrqNP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DCgAA
-AAAA4WKkQAAAAAAAAAAAAAAAAAQAGAAAAAAAAAAQAP1B6gIAAG9yZy9VVAUAAwauo091eAsAAQTp
-AwAABOkDAABQSwECHgMUAAAACADpYqRAiSnRV58BAAAAAwAAOwAYAAAAAAAAAAAAtIEoAwAAb3Jn
-L2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVGVzdFN0cmluZ0V4dGVuc2lvbjIuY2xhc3NV
-VAUAAxWuo091eAsAAQTpAwAABOkDAABQSwECHgMUAAAACADsYqRAELcvmyMBAADqAQAAQQAYAAAA
-AAAAAAAAtIE8BQAAb3JnL2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVGVzdFN0YXRpY1N0
-cmluZ0V4dGVuc2lvbjIuY2xhc3NVVAUAAxuuo091eAsAAQTpAwAABOkDAABQSwECHgMUAAAACAB9
-itlA1rQ64y4BAADQAQAANwAYAAAAAAAAAAAAtIHaBgAAb3JnL2NvZGVoYXVzL2dyb292eS9ydW50
-aW1lL20xMm4vVGVzdE1hcEV4dGVuc2lvbi5jbGFzc1VUBQADnoHoT3V4CwABBOkDAAAE6QMAAFBL
-BQYAAAAACwALAG8EAAB5CAAAAAA='''
-
-    private static final String moduleTest107225JarContentsBase64Encoded =
-'''UEsDBAoAAAgIAAp4nEUAAAAAAgAAAAAAAAAJAAAATUVUQS1JTkYvAwBQSwMECgAACAgACnicRbJ/
-Au4bAAAAGQAAABQAAABNRVRBLUlORi9NQU5JRkVTVC5NRvNNzMtMSy0u0Q1LLSrOzM+zUjDUM+Dl
-4uUCAFBLAwQKAAAICAAKeJxFAAAAAAIAAAAAAAAAEgAAAE1FVEEtSU5GL3NlcnZpY2VzLwMAUEsD
-BAoAAAgIAAp4nEXQIC+RagAAAH8AAAA9AAAATUVUQS1JTkYvc2VydmljZXMvb3JnLmNvZGVoYXVz
-Lmdyb292eS5ydW50aW1lLkV4dGVuc2lvbk1vZHVsZcvNTynNSfVLzE21dS/Kzy+rVAhJLS5RMD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oAGAAAAAAAAQAAAKSBbQEAACBvcmcvY29kZWhhdXMvZ3Jvb3Z5
-L3J1bnRpbWUvbTEybi9Hcm9vdnk3MjI1RXh0ZW5zaW9uLmphdmFVVAUAA14boVR1eAsAAQToAwAA
-BOgDAABQSwECHgMKAAAAAAAKeJxFAAAAAAAAAAAAAAAABAAYAAAAAAAAABAA7UGOAgAAb3JnL1VU
-BQAD9AygVHV4CwABBOgDAAAE6AMAAFBLAQIeAwoAAAAAAAp4nEUAAAAAAAAAAAAAAAANABgAAAAA
-AAAAEADtQcwCAABvcmcvY29kZWhhdXMvVVQFAAP0DKBUdXgLAAEE6AMAAAToAwAAUEsBAh4DCgAA
-AAAACnicRQAAAAAAAAAAAAAAABQAGAAAAAAAAAAQAO1BEwMAAG9yZy9jb2RlaGF1cy9ncm9vdnkv
-VVQFAAP0DKBUdXgLAAEE6AMAAAToAwAAUEsBAh4DCgAAAAAACnicRQAAAAAAAAAAAAAAABwAGAAA
-AAAAAAAQAO1BYQMAAG9yZy9jb2RlaGF1cy9ncm9vdnkvcnVudGltZS9VVAUAA/QMoFR1eAsAAQTo
-AwAABOgDAABQSwECHgMKAAAAAAAmd51FAAAAAAAAAAAAAAAAIQAYAAAAAAAAABAA7UG3AwAAb3Jn
-L2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVVQFAAO3XaFUdXgLAAEE6AMAAAToAwAAUEsB
-Ah4DFAAAAAgAJnedRWoZjhBtAQAAbAIAADoAGAAAAAAAAAAAAKSBEgQAAG9yZy9jb2RlaGF1cy9n
-cm9vdnkvcnVudGltZS9tMTJuL0dyb292eTcyMjVFeHRlbnNpb24uY2xhc3NVVAUAA7ddoVR1eAsA
-AQToAwAABOgDAABQSwUGAAAAAAsACwDkAwAA8wUAAAAA'''
-
     private static final URL moduleTest12JarURL
     private static final URL moduleTest107225JarURL
 
     static {
-        File tmpJar = File.createTempFile('module-test-1.2-test', 'jar')
-        tmpJar.deleteOnExit()
-        tmpJar << moduleTest12JarContentsBase64Encoded.decodeBase64()
-        moduleTest12JarURL = tmpJar.toURI().toURL()
-
-        File tmpJar7225 = File.createTempFile('module-test-1.0.7225-test', 'jar')
-        tmpJar7225.deleteOnExit()
-        tmpJar7225 << moduleTest107225JarContentsBase64Encoded.decodeBase64()
-        moduleTest107225JarURL = tmpJar.toURI().toURL()
+        moduleTest12JarURL = ExtensionModuleHelperForTests.createModuleTest12Jar()
+        moduleTest107225JarURL = ExtensionModuleHelperForTests.createModuleTest107225Jar()
     }
 
     void testThatModuleHasBeenLoaded() {

Reply | Threaded
Open this post in threaded view
|

[2/2] incubator-groovy git commit: Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings

pascalschumacher
Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/970d9bc9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/970d9bc9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/970d9bc9

Branch: refs/heads/GROOVY_2_4_X
Commit: 970d9bc93ee9ab3f1246b5d841c40c2f1cb349bb
Parents: 60bebe1
Author: pascalschumacher <[hidden email]>
Authored: Sun Jun 14 18:22:31 2015 +0200
Committer: pascalschumacher <[hidden email]>
Committed: Sun Jun 14 20:05:29 2015 +0200

----------------------------------------------------------------------
 .../1.0.7225-test/module-test-1.0.7225-test.jar | Bin 2541 -> 0 bytes
 .../1.2-test/module-test-1.2-test.jar           | Bin 3326 -> 0 bytes
 .../runtime/m12n/ExtensionModuleTest.groovy     | 166 ++++++++++++++++---
 3 files changed, 139 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/970d9bc9/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar
----------------------------------------------------------------------
diff --git a/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar b/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar
deleted file mode 100644
index d08e03c..0000000
Binary files a/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/970d9bc9/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar
----------------------------------------------------------------------
diff --git a/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar b/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar
deleted file mode 100644
index 2678d82..0000000
Binary files a/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/970d9bc9/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
index 61c315b..26e5dfb 100644
--- a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
@@ -23,6 +23,130 @@ package org.codehaus.groovy.runtime.m12n
  */
 class ExtensionModuleTest extends GroovyTestCase {
 
+    // Apache License does not allow jars/binaries in the source
+    private static final String moduleTest12JarContentsBase64Encoded =
+'''UEsDBBQAAAAIALSK2UBQTDGungAAAEABAAA9ABwATUVUQS1JTkYvc2VydmljZXMvb3JnLmNvZGVo
+YXVzLmdyb292eS5ydW50aW1lLkV4dGVuc2lvbk1vZHVsZVVUCQADBILoTwSC6E91eAsAAQTpAwAA
+BOkDAACdjr8OgkAMh/d7ij6AHpGdyRAnXSTuJxS4CFfT9vzz9nJRGJyMU9P2931tlkHVe4HWDwhT
+jYINKIGiKGiPgA/FIJ4CjNTEKdSyG/FOfDHvwWFqiy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QTpAwAA
+BOkDAABQSwECHgMKAAAAAADhYqRAAAAAAAAAAAAAAAAAHAAYAAAAAAAAABAA/UH/AQAAb3JnL2Nv
+ZGVoYXVzL2dyb292eS9ydW50aW1lL1VUBQADBq6jT3V4CwABBOkDAAAE6QMAAFBLAQIeAwoAAAAA
+AOFipEAAAAAAAAAAAAAAAAAUABgAAAAAAAAAEAD9QVUCAABvcmcvY29kZWhhdXMvZ3Jvb3Z5L1VU
+BQADBq6jT3V4CwABBOkDAAAE6QMAAFBLAQIeAwoAAAAAAOFipEAAAAAAAAAAAAAAAAANABgAAAAA
+AAAAEAD9QaMCAABvcmcvY29kZWhhdXMvVVQFAAMGrqNPdXgLAAEE6QMAAATpAwAAUEsBAh4DCgAA
+AAAA4WKkQAAAAAAAAAAAAAAAAAQAGAAAAAAAAAAQAP1B6gIAAG9yZy9VVAUAAwauo091eAsAAQTp
+AwAABOkDAABQSwECHgMUAAAACADpYqRAiSnRV58BAAAAAwAAOwAYAAAAAAAAAAAAtIEoAwAAb3Jn
+L2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVGVzdFN0cmluZ0V4dGVuc2lvbjIuY2xhc3NV
+VAUAAxWuo091eAsAAQTpAwAABOkDAABQSwECHgMUAAAACADsYqRAELcvmyMBAADqAQAAQQAYAAAA
+AAAAAAAAtIE8BQAAb3JnL2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVGVzdFN0YXRpY1N0
+cmluZ0V4dGVuc2lvbjIuY2xhc3NVVAUAAxuuo091eAsAAQTpAwAABOkDAABQSwECHgMUAAAACAB9
+itlA1rQ64y4BAADQAQAANwAYAAAAAAAAAAAAtIHaBgAAb3JnL2NvZGVoYXVzL2dyb292eS9ydW50
+aW1lL20xMm4vVGVzdE1hcEV4dGVuc2lvbi5jbGFzc1VUBQADnoHoT3V4CwABBOkDAAAE6QMAAFBL
+BQYAAAAACwALAG8EAAB5CAAAAAA='''
+
+    private static final String moduleTest107225JarContentsBase64Encoded =
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L2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVVQFAAO3XaFUdXgLAAEE6AMAAAToAwAAUEsB
+Ah4DFAAAAAgAJnedRWoZjhBtAQAAbAIAADoAGAAAAAAAAAAAAKSBEgQAAG9yZy9jb2RlaGF1cy9n
+cm9vdnkvcnVudGltZS9tMTJuL0dyb292eTcyMjVFeHRlbnNpb24uY2xhc3NVVAUAA7ddoVR1eAsA
+AQToAwAABOgDAABQSwUGAAAAAAsACwDkAwAA8wUAAAAA'''
+
+    private static final URL moduleTest12JarURL
+    private static final URL moduleTest107225JarURL
+
+    static {
+        File tmpJar = File.createTempFile('module-test-1.2-test', 'jar')
+        tmpJar.deleteOnExit()
+        tmpJar << moduleTest12JarContentsBase64Encoded.decodeBase64()
+        moduleTest12JarURL = tmpJar.toURI().toURL()
+
+        File tmpJar7225 = File.createTempFile('module-test-1.0.7225-test', 'jar')
+        tmpJar7225.deleteOnExit()
+        tmpJar7225 << moduleTest107225JarContentsBase64Encoded.decodeBase64()
+        moduleTest107225JarURL = tmpJar.toURI().toURL()
+    }
+
     void testThatModuleHasBeenLoaded() {
         ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
@@ -38,18 +162,14 @@ class ExtensionModuleTest extends GroovyTestCase {
     }
 
     void testThatModuleCanBeLoadedWithGrab() {
-        ExtensionModuleHelperForTests.doInFork '''
+        ExtensionModuleHelperForTests.doInFork """
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
             assert !registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
 
-            // find jar resource
-            def jarURL = this.class.getResource("/jars")
-            assert jarURL
+            def resolver = "@GrabResolver('$moduleTest12JarURL')"
 
-            def resolver = "@GrabResolver('$jarURL')"
-
-            assertScript resolver + """
+            assertScript resolver + '''
             @Grab(value='module-test:module-test:1.2-test', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
@@ -61,57 +181,49 @@ class ExtensionModuleTest extends GroovyTestCase {
             def str = 'This is a string'
             assert str.reverseToUpperCase2() == str.toUpperCase().reverse()
             assert String.answer2() == 42
-            """
+            '''
 
             // the module should still be available
             assert registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
-        '''
+        """
     }
 
     void testExtensionModuleUsingGrabAndMap() {
-        ExtensionModuleHelperForTests.doInFork '''
+        ExtensionModuleHelperForTests.doInFork """
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
             assert !registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
 
-            // find jar resource
-            def jarURL = this.class.getResource("/jars")
-            assert jarURL
+            def resolver = "@GrabResolver('$moduleTest12JarURL')"
 
-            def resolver = "@GrabResolver('$jarURL')"
-
-            assertScript resolver + """
+            assertScript resolver + '''
             @Grab(value='module-test:module-test:1.2-test', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
             def map = [:]
             assert 'foo'.taille() == 3
             assert map.taille() == 0
-            """
-        '''
+            '''
+        """
     }
 
     /**
      * Test case that reproduces GROOVY-7225.
      */
     void testExtensionModuleUsingGrabAndClosure() {
-        ExtensionModuleHelperForTests.doInFork '''
+        ExtensionModuleHelperForTests.doInFork """
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
             assert !registry.modules.any { it.name == 'Groovy Test 7225' && it.version == '1.0.7225-test' }
 
-            // find jar resource
-            def jarURL = this.class.getResource("/jars")
-            assert jarURL
-
-            assertScript """
-            @GrabResolver('$jarURL')
+            assertScript '''
+            @GrabResolver('$moduleTest107225JarURL')
             @Grab(value='module-test:module-test:1.0.7225-test', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
             assert 'test'.groovy7225() == 'test: ok'
             assert {->}.groovy7225() == '{"field":"value"}'
-            """
-        '''
+            '''
+        """
     }
 }