Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 35994 invoked from network); 8 Apr 2011 19:54:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Apr 2011 19:54:59 -0000 Received: (qmail 89925 invoked by uid 500); 8 Apr 2011 19:54:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 89880 invoked by uid 500); 8 Apr 2011 19:54:58 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 89872 invoked by uid 99); 8 Apr 2011 19:54:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:54:58 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.212.169] (HELO mail-px0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:54:52 +0000 Received: by pxi9 with SMTP id 9so2024707pxi.14 for ; Fri, 08 Apr 2011 12:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=steelezone.net; s=google; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=cIWUl1ULPObPjYEV80BEce38suGX2CnDnsbNy0zac5U=; b=34Asoc4MA8lUK6Xv2yJnPR4CRhxUjh0lP0r3GH+X+0SGBZ0gXMYWWxXh2xalSwXwHn fA9fgKtWz/qsI6xS6XEM0Y99n+U+qTaYKR0vvbhEocIFOXTZrhuxt/c2masOtn9S1pvW kaPO2WX94AK3WxWdaJVNC4fQLgmrWoGfrmQwg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=steelezone.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=y+7cXz/4J3s4L+nhzrGKMR9bMcRi6ee3rBJg4JTl4lNDWy93QnxxkzpL34nVp9o703 lpU7Jw14UO8jRM1N9GhkvAwW+5hZjzVB5NWYE8dX6NJOyWelDTzC45OA2JttDeISKEQj eoFvHmJzO+s89fQ6u4j6O4bLkrcaaO6LJ2ca0= MIME-Version: 1.0 Received: by 10.142.131.11 with SMTP id e11mr2026313wfd.51.1302292469985; Fri, 08 Apr 2011 12:54:29 -0700 (PDT) Received: by 10.68.52.230 with HTTP; Fri, 8 Apr 2011 12:54:29 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 Apr 2011 15:54:29 -0400 Message-ID: Subject: Re: Loading resource or property files embedded in jar file that distributes shared build files? From: "Steele, Richard" To: Ant Users List , gudnabrsam@gmail.com Content-Type: multipart/alternative; boundary=00151758afb811317f04a06d980d X-Virus-Checked: Checked by ClamAV on apache.org --00151758afb811317f04a06d980d Content-Type: text/plain; charset=ISO-8859-1 Thanks, actually your suggestion led me to find that I can use a resource using a baseResource of ${ant.file.project-name} with a relative path of "/foo", and this works well. I too had to create a variation that could load the same resource using a resource, but it wasn't too hard. I'll probably refactor to use a macrodef or scriptdef, but I think it's working the way I want. I still wonder, though, if there's a difference between how is looking for resources on the default classpath and how and work. I'd prefer they were consistent so that I could use those tasks and have them work the same way does. Rich On Fri, Apr 8, 2011 at 10:59 AM, Matt Benson wrote: > > Rich: > My approach to this is a little different than yours as I > import/include resources rather than using Antlibs for my > compartmentalized build, in a manner similar to Joe Scmetzer's [1]. > This allows me to make use of the ant.file.projectname and > ant.file.type.projectname properties, which I query, ultimately, in a > macrodef that uses the file vs. url information exposed therein to > understand how to obtain a relative resource. For good measure I also > provide macrodefs to include-relative and import-relative which > themselves delegate back to the all-important macro that actually > determines what a relative resource looks like. It might be possible > for similar properties to be added to Ant for Antlibs, but from what I > can tell so far it would indeed be a good bit trickier than the > approach I describe. > > HTH, > Matt > [1] http://www.exubero.com/asl/ > > > Thanks, > > Rich > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --00151758afb811317f04a06d980d--