You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by gs...@apache.org on 2007/06/08 10:51:05 UTC
svn commit: r545472 - in /incubator/ivy/core/trunk:
src/etc/checkstyle/checkstyle-config
test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
Author: gscokart
Date: Fri Jun 8 03:51:01 2007
New Revision: 545472
URL: http://svn.apache.org/viewvc?view=rev&rev=545472
Log:
code cleaning
Modified:
incubator/ivy/core/trunk/src/etc/checkstyle/checkstyle-config
incubator/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
Modified: incubator/ivy/core/trunk/src/etc/checkstyle/checkstyle-config
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/etc/checkstyle/checkstyle-config?view=diff&rev=545472&r1=545471&r2=545472
==============================================================================
--- incubator/ivy/core/trunk/src/etc/checkstyle/checkstyle-config (original)
+++ incubator/ivy/core/trunk/src/etc/checkstyle/checkstyle-config Fri Jun 8 03:51:01 2007
@@ -45,6 +45,7 @@
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
+ <property name="tabWidth" value="4"/>
</module>
<module name="MethodLength"/>
<module name="ParameterNumber"/>
Modified: incubator/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java?view=diff&rev=545472&r1=545471&r2=545472
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java (original)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java Fri Jun 8 03:51:01 2007
@@ -32,13 +32,13 @@
import org.apache.tools.ant.taskdefs.Delete;
public class RetrieveTest extends TestCase {
- private final Ivy _ivy;
+ private final Ivy ivy;
- private File _cache;
+ private File cache;
public RetrieveTest() throws Exception {
- _ivy = new Ivy();
- _ivy.configure(new File("test/repositories/ivysettings.xml"));
+ ivy = new Ivy();
+ ivy.configure(new File("test/repositories/ivysettings.xml"));
}
protected void setUp() throws Exception {
@@ -46,8 +46,8 @@
}
private void createCache() {
- _cache = new File("build/cache");
- _cache.mkdirs();
+ cache = new File("build/cache");
+ cache.mkdirs();
}
protected void tearDown() throws Exception {
@@ -61,13 +61,13 @@
private void cleanCache() {
Delete del = new Delete();
del.setProject(new Project());
- del.setDir(_cache);
+ del.setDir(cache);
del.execute();
}
public void testRetrieveSimple() throws Exception {
// mod1.1 depends on mod1.2
- ResolveReport report = _ivy.resolve(new File(
+ ResolveReport report = ivy.resolve(new File(
"test/repositories/1/org1/mod1.1/ivys/ivy-1.0.xml").toURL(),
getResolveOptions(new String[] {"*"}));
assertNotNull(report);
@@ -75,19 +75,19 @@
assertNotNull(md);
String pattern = "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]";
- _ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+ ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
assertTrue(new File(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar", "jar", "default")).exists());
pattern = "build/test/retrieve/[module]/[conf]/[type]s/[artifact]-[revision].[ext]";
- _ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+ ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
assertTrue(new File(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar", "jar", "default")).exists());
}
public void testRetrieveOverwrite() throws Exception {
// mod1.1 depends on mod1.2
- ResolveReport report = _ivy.resolve(new File(
+ ResolveReport report = ivy.resolve(new File(
"test/repositories/1/org1/mod1.1/ivys/ivy-1.0.xml").toURL(),
getResolveOptions(new String[] {"*"}));
assertNotNull(report);
@@ -102,7 +102,7 @@
file.getParentFile().mkdirs();
file.createNewFile();
file.setLastModified(10000);
- _ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+ ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
assertEquals(
new File("test/repositories/1/org1/mod1.2/jars/mod1.2-2.0.jar").lastModified(), file
.lastModified());
@@ -110,7 +110,7 @@
public void testRetrieveWithSymlinks() throws Exception {
// mod1.1 depends on mod1.2
- ResolveReport report = _ivy.resolve(new File(
+ ResolveReport report = ivy.resolve(new File(
"test/repositories/1/org1/mod1.1/ivys/ivy-1.0.xml").toURL(),
getResolveOptions(new String[] {"*"}));
assertNotNull(report);
@@ -118,14 +118,14 @@
assertNotNull(md);
String pattern = "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]";
- _ivy
+ ivy
.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions().setMakeSymlinks(
true));
assertLink(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2", "jar",
"jar", "default"));
pattern = "build/test/retrieve/[module]/[conf]/[type]s/[artifact]-[revision].[ext]";
- _ivy
+ ivy
.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions().setMakeSymlinks(
true));
assertLink(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2", "jar",
@@ -152,8 +152,8 @@
public void testRetrieveWithVariable() throws Exception {
// mod1.1 depends on mod1.2
- _ivy.setVariable("retrieve.dir", "retrieve");
- ResolveReport report = _ivy.resolve(new File(
+ ivy.setVariable("retrieve.dir", "retrieve");
+ ResolveReport report = ivy.resolve(new File(
"test/repositories/1/org1/mod1.1/ivys/ivy-1.0.xml").toURL(),
getResolveOptions(new String[] {"*"}));
assertNotNull(report);
@@ -161,25 +161,25 @@
assertNotNull(md);
String pattern = "build/test/${retrieve.dir}/[module]/[conf]/[artifact]-[revision].[ext]";
- _ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+ ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
pattern = IvyPatternHelper.substituteVariable(pattern, "retrieve.dir", "retrieve");
assertTrue(new File(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar", "jar", "default")).exists());
pattern = "build/test/${retrieve.dir}/[module]/[conf]/[type]s/[artifact]-[revision].[ext]";
- _ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+ ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
pattern = IvyPatternHelper.substituteVariable(pattern, "retrieve.dir", "retrieve");
assertTrue(new File(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar", "jar", "default")).exists());
}
private RetrieveOptions getRetrieveOptions() {
- return new RetrieveOptions().setCache(CacheManager.getInstance(_ivy.getSettings(), _cache));
+ return new RetrieveOptions().setCache(CacheManager.getInstance(ivy.getSettings(), cache));
}
private ResolveOptions getResolveOptions(String[] confs) {
return new ResolveOptions().setConfs(confs).setCache(
- CacheManager.getInstance(_ivy.getSettings(), _cache));
+ CacheManager.getInstance(ivy.getSettings(), cache));
}
}