Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E74B7491A for ; Wed, 15 Jun 2011 12:40:11 +0000 (UTC) Received: (qmail 70787 invoked by uid 500); 15 Jun 2011 12:40:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 70770 invoked by uid 500); 15 Jun 2011 12:40:11 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 70763 invoked by uid 99); 15 Jun 2011 12:40:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 12:40:11 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [148.87.113.121] (HELO rcsinet10.oracle.com) (148.87.113.121) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 12:40:01 +0000 Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p5FCdbqp019908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 Jun 2011 12:39:39 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p5FCdacI028687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 15 Jun 2011 12:39:37 GMT Received: from abhmt014.oracle.com (abhmt014.oracle.com [141.146.116.23]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p5FCdULd010458 for ; Wed, 15 Jun 2011 07:39:31 -0500 Received: from [192.168.0.20] (/84.215.154.106) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 15 Jun 2011 05:39:30 -0700 Message-ID: <4DF8A819.705@oracle.com> Date: Wed, 15 Jun 2011 14:39:53 +0200 From: Kristian Waagan User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.15) Gecko/20110412 Thunderbird/3.1.9 MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Refactoring ant junit target to automatically set classpath References: <4DF0BCED.7000700@oracle.com> In-Reply-To: <4DF0BCED.7000700@oracle.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090204.4DF8A80C.0034:SCFSTAT5015188,ss=1,fgs=0 X-Virus-Checked: Checked by ClamAV on apache.org On 09.06.11 14:30, Kristian Waagan wrote: > Hi all, > > I just uploaded patch with a possible solution for the issue DERBY-4089 > [1], where it is suggested that it should be possible to run the junit > targets without manually setting the classpath after 'ant all' has been > run. This suggestion got some pushback by a claim that it would be more > reasonable to run against the production jars instead of the > classes-directory. > > Since the patch may affect some people using the junit targets, I'd like > to get some feedback before I make any changes. > > I committed the change on trunk with revision 1136011. -- Kristian > --> CHANGE > The classpath for the junit targets will be set automatically, with the > following preferences: > o if derby.junit.classpath is specified by the user, don't do anything > o if derby.junit.classpath is unspecified > o look for insane jars > o look for sane jars > o if either of them are found, set derby.junit.classpath to the empty > string > o if no jars are located [2], set derby.junit.classpath to the > classes-directory > o additionally, ant will append the user's CLASSPATH environment > variable to the junit classpath > > > --> WHO WILL BE AFFECTED > Users who have set the CLASSPATH environment variable when running the > junit-tasks. > With the changes mentioned, it is likely that what's on the CLASSPATH > variable will be shadowed by either the jars or the classes-directory. > To get the same behavior as earlier, you would have to set > derby.junit.classpath="" when invoking ant. > > > --> PROBLEM? > ant clobber doesn't clean the jars directory ([2]) > If a developer has built the jars, then runs 'ant clobber', modifies the > code, runs 'ant all', followed by for instance 'ant junit-all', the bits > tested will be the now outdated jar files. > > I did find this from Dan: > "I think some of it is history with the product. The Cloudscape jars, > when it was a closed source product, took a long time to build and the > process needed a machine with a lot of memeory. This was due to the > obfuscation process. Thus developers typically did not build the jars, > only the classes, and the build scripts were set up to reflect that." > Are there other reasons why 'ant clobber' doesn't delete the jars? > Can we make 'ant clobber' delete the jars? > > > Finally, if the patch is committed, the following targets are basically > rendered redundant: > junit-all-codeline-jars > junit-system-codeline-jars > junit-single-codeline-jars > > Is anyone using these? > If not, I'd say we remove them. > >