Skip to content

Commit

Permalink
ivy to 2.0.0
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.codehaus.org/groovy/branches/GROOVY_1_6_0@15300 a5544e8c-8a19-0410-ba12-f9af4593a198
  • Loading branch information
paulk-asert committed Feb 8, 2009
1 parent 7c5c159 commit aaffe72
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.0.0-rc2</version>
<version>2.0.0</version>
<scope>compile</scope>
<optional>true</optional>
<exclusions>
Expand Down
2 changes: 1 addition & 1 deletion src/main/groovy/grape/Grape.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static void grab(Map args, Map... dependencies) {
if (enableGrapes) {
GrapeEngine instance = getInstance();
if (instance != null) {
if (!args.containsKey("autoDoanload")) {
if (!args.containsKey("autoDownload")) {
args.put("autoDownload" , Boolean.valueOf(enableAutoDownload));
}
instance.grab(args, dependencies);
Expand Down
18 changes: 9 additions & 9 deletions src/test/groovy/grape/GrapeIvyTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GrapeIvyTest extends GroovyTestCase {
[[groupId:'log4j', artifactId:'log4j', version:'1.1.3'],
[groupId:'org.apache.poi', artifactId:'poi', version:'3.0.1-FINAL'],
[groupId:'com.jidesoft', artifactId:'jide-oss', version:'[2.2.1,2.3)'],
[groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0-beta1', conf:['default', 'optional']]
[groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0', conf:['default', 'optional']]
].each {
Grape.resolve([autoDownload:true, classLoader:new GroovyClassLoader()], it)
}
Expand Down Expand Up @@ -191,41 +191,41 @@ class GrapeIvyTest extends GroovyTestCase {
public void testConf() {
GroovyClassLoader loader = new GroovyClassLoader()

def coreJars = ["ivy-2.0.0-beta1.jar"] as Set
def coreJars = ["ivy-2.0.0.jar"] as Set
def optionalJars = [
"ant-1.6.jar",
"ant-1.6.2.jar",
"ant-trax-1.6.2.jar",
"ant-nodeps-1.6.2.jar",
"commons-httpclient-3.0.jar",
"junit-3.8.1.jar",
"commons-codec-1.2.jar",
"commons-cli-1.0.jar",
"commons-lang-1.0.jar",
"oro-2.0.8.jar",
"commons-vfs-1.0.jar",
"commons-logging-1.0.4.jar",
"jsch-0.1.25.jar",
"jsch-0.1.31.jar",
] as Set
def testJars = [
"junit-3.8.2.jar",
"commons-lang-2.3.jar",
] as Set

Grape.grab(groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0-beta1', classLoader:loader, preserveFiles:true)
Grape.grab(groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0', classLoader:loader, preserveFiles:true)
def jars = loader.getURLs().collect {URL it -> it.getPath().split('/')[-1]} as Set
assert coreJars - jars == Collections.EMPTY_SET, "assert that all core jars are present"
assert testJars - jars == testJars, "assert that no test jars are present"
assert optionalJars - jars == optionalJars, "assert that no optional jars are present"
assert jars == coreJars, "assert that no extraneous jars are present"

loader = new GroovyClassLoader()
Grape.grab(groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0-beta1', conf:'optional', classLoader:loader)
Grape.grab(groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0', conf:'optional', classLoader:loader)
jars = loader.getURLs().collect {URL it -> it.getPath().split('/')[-1]} as Set
assert coreJars - jars == coreJars, "assert that no core jars are present"
assert testJars - jars == testJars, "assert that no test jars are present"
assert optionalJars - jars == Collections.EMPTY_SET, "assert that all optional jars are present"
assert jars == optionalJars, "assert that no extraneous jars are present"

loader = new GroovyClassLoader()
Grape.grab(groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0-beta1', conf:['default', 'optional'], classLoader:loader)
Grape.grab(groupId:'org.apache.ivy', artifactId:'ivy', version:'2.0.0', conf:['default', 'optional'], classLoader:loader)
jars = loader.getURLs().collect {URL it -> it.getPath().split('/')[-1]} as Set
assert coreJars - jars == Collections.EMPTY_SET, "assert that all core jars are present"
assert testJars - jars == testJars, "assert that no test jars are present"
Expand Down

0 comments on commit aaffe72

Please sign in to comment.