buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damian Monogue <demon...@gmail.com>
Subject Re: Nested ant properties
Date Fri, 09 Dec 2011 19:11:02 GMT
Alright, I am attaching a buildfile and build.xml which will replicate the
issue. To see the issue, you can execute it as:

buildr rake:doloop

The following information may prove useful while troubleshooting. I am
using rvm, and due to our developers primarily working in windows, we're
using jruby for our ruby implementation to keep it consistent across the
board. This will also require the ant-contrib jar file in $ANT_HOME/lib/ .
While I know ruby handles iterators better than ant (and what doesn't?) I'm
trying to avoid rewriting all of their ant tasks for the initial pass, and
instead get it wrapped up and converted over until we're less in the weeds.
Below is some environment information you may find helpful, and thank you
in advance for even attempting to help.

[dmonogue@rv-wk-dmon-01 ~/gitbox/dummy] -> echo $ANT_HOME
/home/dmonogue/apache-ant-1.7.1
[dmonogue@rv-wk-dmon-01 ~/gitbox/dummy] -> ruby -v
jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (OpenJDK Server VM
1.6.0_22) [linux-i386-java]
[dmonogue@rv-wk-dmon-01 ~/gitbox/dummy] -> gem list

*** LOCAL GEMS ***

atoulme-Antwrap (0.7.1 java)
bouncy-castle-java (1.5.0146.1)
builder (2.1.2)
buildr (1.4.6 java)
diff-lcs (1.1.2)
grit (2.4.1)
highline (1.5.1)
hoe (2.3.3)
httpclient (2.2.3)
i18n (0.6.0)
jira4r (0.3.0)
jruby-launcher (1.0.9 java)
jruby-openssl (0.7.4)
json_pure (1.4.3)
mail (2.3.0)
mime-types (1.17.2)
minitar (0.5.3)
net-sftp (2.0.4)
net-ssh (2.0.23)
polyglot (0.3.3)
pony (1.3)
rake (0.9.2, 0.8.7)
rspec (2.1.0)
rspec-core (2.1.0)
rspec-expectations (2.1.0)
rspec-mocks (2.1.0)
rubyforge (2.0.3)
rubyzip (0.9.4)
soap4r (1.5.8)
treetop (1.4.10)
xml-simple (1.0.12)
[dmonogue@rv-wk-dmon-01 ~/gitbox/dummy] ->


On Fri, Dec 9, 2011 at 12:52 PM, Damian Monogue <demonnic@gmail.com> wrote:

> I'll work on getting a self-contained example set up shortly. In the
> meantime, I'm declaring things thusly:
>
> @ant = AntProject.new(:ant_home => ENV['ANT_HOME'])
> @ant.property(:name => "router.masterInput.dir", :value =>
> "${config.home}/properties/cpe")
>
>
> My company would frown on me sending out the actual buildfile, but I'll
> set up a similar case using dummy info and send it along shortly.
>
> On Thu, Dec 8, 2011 at 7:19 PM, Alex Boisvert <alex.boisvert@gmail.com>wrote:
>
>> Hi Damian,
>>
>> How are you setting the properties in your buildfile?   If you can send me
>> a self-contained example, I could give it a try and see how to make it
>> work.
>>
>> alex
>>
>>
>> On Wed, Dec 7, 2011 at 10:42 AM, Damian Monogue <demonnic@gmail.com>
>> wrote:
>>
>> > My appologies if there's a better place to post this, but I've run into
>> an
>> > issue again while using buildr + antwrap. In this case, I'm using it to
>> > call ant tasks defined in my build.xml. One of them is a loop, and part
>> of
>> > this loop is that it passes along a dynamically constructed ant property
>> > name as part of the next chain of tasks.
>> >
>> > For instance, there are several *.masterInput.dir properties which are
>> > defined independently of each other. When the loop executes, it may run
>> the
>> > first time and need router.masterInput.dir, and the next use
>> > cooler.masterInput.dir, etc. For example:
>> >
>> > <antcall target="runMyLoops">
>> >  <param name="executeThisTask" value ="sometasktoexecute" />
>> >  <param name="masterDir" value="${item}.masterInput.dir"/>
>> > ...
>> > </antcall>
>> >
>> >
>> > At run time, when this antcall is hit in the chain, it is throwing an
>> > error. The first time, let us say ${item} is replaced with router. The
>> > error below is thrown:
>> >
>> > Property 'router.masterInput.dir' is not defined.
>> >
>> >
>> > This is untrue, though, as I can see where I have defined it in my
>> > buildfile. Has anyone run into this before? I searched the mailing lists
>> > and hit up google, but my googlefu has failed me.
>> >
>> > Thanks in advance for any help!
>> >
>> > Damian
>> >
>>
>
>

Mime
View raw message