buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Lott <>
Subject Re: Buildr questions
Date Fri, 18 Jan 2008 15:43:30 GMT

Thanks for helping out.

With the first question why would some artifact jars resolve to the local


But then the one that my buildrfile project generates resolves to the target


Is there a way to always specify to get the jar from the repository?



On 1/17/08 11:40 PM, "Victor Hugo Borja" <> wrote:

> Neil,
> PANOPTICODE = ["org.panopticode:panopticode:jar:0.1",
>> "org.panopticode:panopticode-dom4j:jar:1.6.1",
>> "org.panopticode:panopticode-treemap:jar:0.1"]
>> I'd like to be able to
>> Which would yield a list of fully qualified paths of jars from my local
>> repository.
> # This leads to an array with full paths to PANOPTICODE jars.
> PANTOPTICODE_CLASSPATH = { |spec| artifact(spec).to_s }
> Here's my second question:
>> If I have a buildfile and define a regular ruby method that's called via a
>> rake task
>> task :neiltest do
>>  somemethod
>> end
>> def somemethod
>>   path_to("usr", "local", "bin")
>> end
>> I get this error:
>> rake aborted!
>> undefined method `path_to' for main:Object
>> Why is that?
> The 'somemethod' is being declared on the 'main' object, thus it has no
> access to the current project methods (like path_to), you either have to
> pass the project as
> an argument or define the method on the current project object:
> def self.somemethod
>   path_to("usr", "local", "bin")
> end
> If you have more than one simple method, prefer defining a module and
> extending the current project with it.
> Best Regards,

This E-mail and any of its attachments may contain Time Warner
Cable proprietary information, which is privileged, confidential,
or subject to copyright belonging to Time Warner Cable. This E-mail
is intended solely for the use of the individual or entity to which
it is addressed. If you are not the intended recipient of this
E-mail, you are hereby notified that any dissemination,
distribution, copying, or action taken in relation to the contents
of and attachments to this E-mail is strictly prohibited and may be
unlawful. If you have received this E-mail in error, please notify
the sender immediately and permanently delete the original and any
copy of this E-mail and any printout.

View raw message