You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by xa...@apache.org on 2008/03/10 21:49:57 UTC
svn commit: r635685 - in /ant/ivy/core/trunk/test:
java/org/apache/ivy/ant/IvyInstallTest.java
java/org/apache/ivy/core/install/InstallTest.java
repositories/ivysettings-dummydefaultresolver.xml
Author: xavier
Date: Mon Mar 10 13:49:51 2008
New Revision: 635685
URL: http://svn.apache.org/viewvc?rev=635685&view=rev
Log:
test case for IVY-732, not reproducing the problem
Added:
ant/ivy/core/trunk/test/repositories/ivysettings-dummydefaultresolver.xml (with props)
Modified:
ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java
ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java
Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java?rev=635685&r1=635684&r2=635685&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java Mon Mar 10 13:49:51 2008
@@ -61,6 +61,26 @@
FileUtil.forceDelete(new File("build/test/install"));
}
+ public void testInstallDummyDefault() {
+ project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+ install.setOrganisation("org1");
+ install.setModule("mod1.4");
+ install.setRevision("1.0.1");
+ install.setFrom("test");
+ install.setTo("install");
+ install.setTransitive(true);
+
+ install.execute();
+
+ assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());
+
+ assertTrue(new File("build/test/install/org1/mod1.1/ivy-2.0.xml").exists());
+ assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-2.0.jar").exists());
+
+ assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.2.xml").exists());
+ assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.2.jar").exists());
+ }
+
public void testInstallWithBranch() {
project.setProperty("ivy.settings.file", "test/repositories/branches/ivysettings.xml");
install.setOrganisation("foo");
Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java?rev=635685&r1=635684&r2=635685&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java Mon Mar 10 13:49:51 2008
@@ -88,6 +88,38 @@
assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
}
+ public void testLatestDependenciesNoDefaultResolver() throws Exception {
+ Ivy ivy = Ivy.newInstance();
+ ivy.configure(new File("test/repositories/ivysettings-nodefaultresolver.xml"));
+
+ ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"),
+ "test", "install", new InstallOptions());
+
+ assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());
+
+ assertTrue(new File("build/test/install/org1/mod1.1/ivy-2.0.xml").exists());
+ assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-2.0.jar").exists());
+
+ assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.2.xml").exists());
+ assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.2.jar").exists());
+ }
+
+ public void testLatestDependenciesDummyDefaultResolver() throws Exception {
+ Ivy ivy = Ivy.newInstance();
+ ivy.configure(new File("test/repositories/ivysettings-dummydefaultresolver.xml"));
+
+ ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"),
+ "test", "install", new InstallOptions());
+
+ assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());
+
+ assertTrue(new File("build/test/install/org1/mod1.1/ivy-2.0.xml").exists());
+ assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-2.0.jar").exists());
+
+ assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.2.xml").exists());
+ assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.2.jar").exists());
+ }
+
public void testNotTransitive() throws Exception {
Ivy ivy = Ivy.newInstance();
ivy.configure(new File("test/repositories/ivysettings.xml"));
Added: ant/ivy/core/trunk/test/repositories/ivysettings-dummydefaultresolver.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/ivysettings-dummydefaultresolver.xml?rev=635685&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/ivysettings-dummydefaultresolver.xml (added)
+++ ant/ivy/core/trunk/test/repositories/ivysettings-dummydefaultresolver.xml Mon Mar 10 13:49:51 2008
@@ -0,0 +1,48 @@
+<!--
+ 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.
+-->
+<ivysettings>
+ <properties file="${ivy.settings.dir}/ivysettings.properties" />
+ <settings defaultResolver="dummy" />
+ <caches defaultCacheDir="${cache.dir}" />
+ <resolvers>
+ <chain name="test">
+ <filesystem name="1">
+ <ivy pattern="${ivy.settings.dir}/1/[organisation]/[module]/ivys/ivy-[revision].xml"/>
+ <artifact pattern="${ivy.settings.dir}/1/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
+ </filesystem>
+ <dual name="2">
+ <filesystem name="2-ivy">
+ <ivy pattern="${ivy.settings.dir}/2/[module]/ivy-[revision].xml"/>
+ </filesystem>
+ <filesystem name="2-artifact">
+ <artifact pattern="${ivy.settings.dir}/2/[module]/[artifact]-[revision].[ext]"/>
+ <artifact pattern="${ivy.settings.dir}/2/[module]/[artifact].[ext]"/>
+ </filesystem>
+ </dual>
+ </chain>
+ <filesystem name="dummy">
+ <ivy pattern="dummy/[organisation]/[module]/[artifact]-[revision].[ext]"/>
+ <artifact pattern="dummy/[organisation]/[module]/[artifact]-[revision].[ext]"/>
+ </filesystem>
+ <filesystem name="install">
+ <ivy pattern="build/test/install/[organisation]/[module]/[artifact]-[revision].[ext]"/>
+ <artifact pattern="build/test/install/[organisation]/[module]/[artifact]-[revision].[ext]"/>
+ </filesystem>
+ </resolvers>
+</ivysettings>
Propchange: ant/ivy/core/trunk/test/repositories/ivysettings-dummydefaultresolver.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/core/trunk/test/repositories/ivysettings-dummydefaultresolver.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain