Return-Path: X-Original-To: apmail-ant-ivy-user-archive@www.apache.org Delivered-To: apmail-ant-ivy-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 97B1B86BE for ; Thu, 18 Aug 2011 17:32:40 +0000 (UTC) Received: (qmail 59765 invoked by uid 500); 18 Aug 2011 17:32:40 -0000 Delivered-To: apmail-ant-ivy-user-archive@ant.apache.org Received: (qmail 59615 invoked by uid 500); 18 Aug 2011 17:32:39 -0000 Mailing-List: contact ivy-user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@ant.apache.org Delivered-To: mailing list ivy-user@ant.apache.org Received: (qmail 59606 invoked by uid 99); 18 Aug 2011 17:32:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 17:32:38 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 17:32:33 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Qu6Rw-0003Uc-NR for ivy-user@ant.apache.org; Thu, 18 Aug 2011 10:32:12 -0700 Message-ID: <32289373.post@talk.nabble.com> Date: Thu, 18 Aug 2011 10:32:12 -0700 (PDT) From: groovinfingers To: ivy-user@ant.apache.org Subject: Re: Using IvyDE with Android and Eclipse 3.6.1 and Mac 10.6.8 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: caldwellshine@gmail.com References: <32273911.post@talk.nabble.com> Thanks for your reply. =20 I ended up removing Ivy and IvyDE (which made me sad). I decided instead t= o go with a pure Ant approach which ended up taking me a few hours to create. With my solution, I can tell my developers to place their unit tests in package A and integration tests in package B. =20 When code changes are checked in to svn, our CI environment builds the Android app. If the build is successful, the CI environment then calls a new ant target that I added to our build.xml file called run-tests. =20 This target calls two other targets which represent our suites of unit and integration tests. Here's what the new build.xml file looks like. =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09 =09=09 =09=09 =09 =09 =09 =09=09 =09 =09 =09 =09=09 =09=09 =09=09 =09=09 =09=09 =09=09 =09=09 =09=09 =09 =09=09 =09=09 =09 With this approach, developers use any name they like for their test classes. As long as they place their classes in the one of the two aforementioned packages, the ant script will execute the tests. Since we are using junit4, annotations are honored meaning that developers have the option to use @Ignore for tests that the CI environment shouldn't execute. Finally, all of our dependencies continue to remain in the /libs and /testinglibs folders. The contents of these folders are consumed by both Eclipse (i.e. when the developer launches tests via a launch configuration) and via Ant (i.e. when the CI environment launches the tests). =20 One down side is that I don't have as much control over the order of the classpath. However, I've noticed that ant may honor the order via the orde= r of the and elements that are contained in the element representing the classpath being used. Again, thank you for your reply. I would love to re-explore ivy in the future. I'm sorry that I didn't have enough time to figure out how to use it with Android. Perhaps someone could post the source code of a working Android project to git hub which demonstrates how to use ivy. gv Nicolas Lalev=C3=A9e wrote: >=20 >=20 > Le 16 ao=C3=BBt 2011 =C3=A0 20:02, groovinfingers a =C3=A9crit : >=20 >>=20 >> Hello. >>=20 >> I've been trying to use IvyDE to replace my .classpath entries with >> ivy.xml.=20 >> My goal is to reference ivy.xml from both our ant scripts and our launch >> configuration files while our dependencies remain in one place (i.e. in >> ivy.xml). >>=20 >> To begin, I figured I'd limit my complexity by attempting to achieve one >> goal - build an Android project in Eclipse while the project references >> ivy.xml. Since Eclipse will auto-build a project anytime the contents o= f >> a >> file change, a successful build in my mind is one that contains no build >> errors in Eclipse. Note that I am not attempting to build this Android >> project using ant. I am solely building it using Eclipse. >>=20 >> I began by installing IvyDE using the Eclipse plugin installation URL >> that >> is declared in the documentation. Then, I restarted Eclipse. Upon >> viewing >> the Eclipse preferences menu, I can now see a menu entry for Ivy. I mad= e >> no >> changes to this. >>=20 >> Next, I created a new Android project. The project contains one activit= y >> and shows Hello World on the screen. I verified that I was able to >> install >> the app on to my phone and that the app works. >>=20 >> Next step was to create a dependency on a jar. I choose Google's gson >> product. I added the jar to our /lib folder and then added the jar to >> the >> project's build path. In our single Activity class, I then created an >> instance of a class that is contained in the jar file. I did this to >> ensure >> that the project will recognize that it has a dependency on this jar.=20 >> The >> project still builds successfully and the app runs fine on the phone. >>=20 >> OK - time to create a new ivy.xml file. I did this by right-clicking th= e >> project and selecting the create new file option. I selected the option >> for >> ivy file, followed the wizard, and then selected finish. I made no >> changes >> to any of the options in the wizard. =20 >> I did manually add the reference to gson. Here is the file. >>=20 >>=20 >> > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" >>=20 >> xsi:noNamespaceSchemaLocation=3D"http://ant.apache.org/ivy/schemas/ivy.x= sd"> >> > organisation=3D"test" >> module=3D"test-iv" >> status=3D"integration"> >> =09 >> =09 >> =09=09 >> =09 >> >>=20 >>=20 >> Next, I followed the steps in the doc to essentially remove all >> dependencies >> from the build path and instead add ivy.xml to the project's build path.= =20 >> This is where I started having problems. >>=20 >> After removing the reference to gson from the build path and then adding >> a >> reference to ivy.xml to the build path, my build failed. This is where = I >> am >> stuck. Here is the error. >>=20 >>=20 >> Description=09Resource=09Path=09Location=09Type >> Impossible to resolve dependencies of >> mm#test-iv;working@[removedForSecurity].local=09ivy.xml=09/testAndroid >> Unknown >> Problem >>=20 >> As a side note, I also attempted to use the Resolve feature so that the >> ivy.xml file would be populated with an entry for gson. This feature di= d >> not work for me. >>=20 >> Does anyone have some advice to offer me? >>=20 >> Thanks for your time and for reading this far. >=20 > quite long indeed, but very detailed and this helps understanding what yo= u > are trying to do :) >=20 > When you launch an ivy resolve, do you have any popup which says it faile= d > ? In such case look at the "details" of the pop up to know what is going > on. >=20 > To diagnose resolve issues, you can also look in the Ivy Console: > http://ant.apache.org/ivy/ivyde/history/latest-milestone/console.html >=20 > Nicolas >=20 >=20 >=20 --=20 View this message in context: http://old.nabble.com/Using-IvyDE-with-Androi= d-and-Eclipse-3.6.1-and-Mac-10.6.8-tp32273911p32289373.html Sent from the ivy-user mailing list archive at Nabble.com.