How about two separate maven goals? One "script" goal that does the
current behaviour and shares vars, and one "execute" goal that can run
code from the project.
I imagine the "execute" goal would usually be used to call a single
function in the clj source files. To simply support this, the goal
could optionally take an "entryFn" instead of "source". The entryFn
would be something like "my.ns/main-func" and would name a no-argument
function to be called.

- Geoff

On May 19, 11:44 pm, Jason Smith <ja...@lilypepper.com> wrote:
> Okay, yes, what you are asking is possible, and I know how to do it.
> Of course, to see the compiled artifacts on the classpath, you'll have
> to be running in a state that runs after they have been created.  :-)
>
> This shouldn't be terribly hard to do, but it's a bit arcane.  I'll
> see if I can make it happen in the next couple of days.  In the
> meantime, I need a parameter name!  Any suggestions?
>
> Mode 1:
> * Original plugin classloading.  All scripts share the same set of
> variables (defs), as if all run from a single REPL, but they don't
> share the project artifact or any project dependencies.  This mode
> runs fastest since Clojure only has to be inited once.
> * "Isolated" classloading.  The scripts are isolated from one another,
> but share artifacts with the project.  Thus not isolated at all.  So
> what do I call it??? Clojure has to be inited for each execution, so
> this will be a bit slower.
>
> The other option is that I only make the second form of classloading
> available, but I also kind of like the ability to share state between
> scripts... which you would lose if I did that...
>
> --
> 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 
> athttp://groups.google.com/group/clojure?hl=en

-- 
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