It might be sufficient to scan for files containing "(ns" and then
determine the namespace name from the file name ("." becomes "/" and
"-" becomes "_").  Otherwise, you might need to depend directly on
Clojure and use its reader.

I don't think it will work for the plugin, but I wrote a lib in
Clojure that searches classpath for namespace forms.  It's at
clojure.contrib.find-namespaces.

Thanks, I appreciate it.
-SS


On Mon, Sep 7, 2009 at 8:00 PM, Mark Derricutt<m...@talios.com> wrote:
> Doh - I suspected I'd have something that might trip me up on that namespace
> discovery :(  Metadata is something I've not used too much yet..
> I'll take a look at it tonight...
> --
> Pull me down under...
>
> On Tue, Sep 8, 2009 at 11:10 AM, Stuart Sierra <the.stuart.sie...@gmail.com>
> wrote:
>>
>> Hi Mark,
>>
>> I like your clojure-maven-plugin, but I discovered a problem with 1.0.
>>
>> If a namespace declaration has metadata, like this:
>>    (ns #^{:doc "This is my namespace."}
>>       my.namespace)
>>
>> The the plugin fails to read the ns name.  You get an error message
>> like "Cannot find file __init.class or .clj"
>>
>> :doc and :author metadata on namespaces is common practice in contrib.
>>
>> -SS
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to