Re: Running Clojure scripts in Maven

2010-05-28 Thread Jason Smith
Yeah, I might still eventually move it over. I decided to keep it separate for several reasons: * I need to work out some classloader issues that might affect other mojos in the same plugin. Clojure maintains lexical scope for everything run in the same classloader, and I think this can bleed bet

Re: Running Clojure scripts in Maven

2010-05-24 Thread Jason Smith
As a follow-up, the classloading feature talked about in this thread, along with a few extra features and improved documentation with examples is available in version 1.1.0.2. http://code.google.com/p/sandflea/wiki/MavenClojurePlugin The maven- clojure-plugin wiki page. I had been using GMaven:ex

Re: Running Clojure scripts in Maven

2010-05-20 Thread Jason Smith
Now that I've had more time to think about it, I think your original idea should be the default, and only, behavior. Scripts should be able to access dependencies of the project, and, if possible, the compiled project classes as well (available after they are compiled). The code I checked into /tr

Re: Running Clojure scripts in Maven

2010-05-20 Thread Geoff
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 co

Re: Running Clojure scripts in Maven

2010-05-20 Thread Jason Smith
Tracking this issue at http://code.google.com/p/sandflea/issues/detail?id=2 -- 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 patien

Re: Running Clojure scripts in Maven

2010-05-20 Thread Jason Smith
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

Re: Running Clojure scripts in Maven

2010-05-19 Thread Mark Derricutt
Ahh is this where your contrib. ended up? I was waiting for you to post it to github or somewhere to merge into the master repo of clojure-maven-plugin. Would be good to keep things to one mojo imho. -- Pull me down under... On Sun, May 16, 2010 at 1:54 PM, Jason Smith wrote: > > http://san

Re: Running Clojure scripts in Maven

2010-05-19 Thread Jason Smith
As a follow-up, I have released a version of this plugin with support for ANT and a Clojure library that lets you to attach artifacts to your Maven project manually. I've added examples of (1) how to create complex assemblies easily, using Clojure ANT, and Maven, and (2) how to add Clojure documen

Re: Running Clojure scripts in Maven

2010-05-19 Thread Jason Smith
Yes, Geoff, you have come up with an interesting scenario. It is definitely possible to do this if you compile libraries in a different project and then reference them from the plugin, or in the project. I'm not sure how to approach this for adding newly compiled classes from the current project.

Re: Running Clojure scripts in Maven

2010-05-19 Thread Hugo Duncan
On Wed, 19 May 2010 11:14:15 -0400, Geoff wrote: This is cool. What I'd really like to do though is run some of the clojure code belonging to the project during the build. I'm toying with a webapp that runs on google appengine and I'd like to "bake" some pages to produce static html/css/js file

Re: Running Clojure scripts in Maven

2010-05-19 Thread Geoff
This is cool. What I'd really like to do though is run some of the clojure code belonging to the project during the build. I'm toying with a webapp that runs on google appengine and I'd like to "bake" some pages to produce static html/css/js files at build time using the same templates and everythi

Re: Running Clojure scripts in Maven

2010-05-16 Thread Jason Smith
On May 16, 7:22 am, "Hugo Duncan" wrote: >> ... > > In case you are interested, I recently implemented some of the   > infrastructure to allow you to write maven plugins in clojure. A simple   > example that just logs basedir is here: > > http://github.com/hugoduncan/clojure-mojo-example/blob/mast

Re: Running Clojure scripts in Maven

2010-05-16 Thread Hugo Duncan
On Sat, 15 May 2010 21:54:55 -0400, Jason Smith wrote: http://sandflea.googlecode.com/svn/site/SNAPSHOT/maven-clojure-plugin/example-execute-simple.html I was originally going to try to put this into *clojure-maven-plugin*, but realized that there are lots of subtleties to cover that would b

Running Clojure scripts in Maven

2010-05-16 Thread Jason Smith
http://sandflea.googlecode.com/svn/site/SNAPSHOT/maven-clojure-plugin/example-execute-simple.html I was originally going to try to put this into *clojure-maven-plugin*, but realized that there are lots of subtleties to cover that would be difficult as a sub-contributor. So I have created sandflea