Compojure 0.6.2 released

81 views
Skip to first unread message

James Reeves

unread,
Mar 13, 2011, 6:33:40 PM3/13/11
to Compojure
This release fixes a few minor issues. Specifically:

* GET and route/resources now handle HEAD requests correctly
* Classpath resources are checked before resources from ServletContext

Nothing groundbreaking, but the resources change in this release will
be needed for compatibility with lein-ring 0.4.0 when I release it.

- James

Shree Mulay

unread,
Apr 15, 2011, 6:22:13 AM4/15/11
to Compojure
This release doesn't seem to run well with:

[org.clojure/clojure "1.3.0-alpha6"]
[org.clojure.contrib/complete "1.3.0-SNAPSHOT"]

may I get a confirmation on this?

James Reeves

unread,
Apr 15, 2011, 6:26:47 AM4/15/11
to comp...@googlegroups.com
On 15 April 2011 11:22, Shree Mulay <shree...@gmail.com> wrote:
> This release doesn't seem to run well with:
>
> [org.clojure/clojure "1.3.0-alpha6"]
> [org.clojure.contrib/complete "1.3.0-SNAPSHOT"]

No effort has yet been made to make Compojure 0.6.x work with the
Clojure 1.3.0 alpha releases, so it's likely there are
incompatibilities that need to be fixed.

- James

Aaron Bedra

unread,
Apr 15, 2011, 9:26:36 AM4/15/11
to comp...@googlegroups.com
You can make this work using leiningen exclusions. Make sure to exclude
clojure and contrib from compojure. That being said, the only things
that compojure relys on right now are

clojure.contrib.core/-?>
clojure.contrib.def/name-with-attributes

If these were pulled into compojure or those parts were rewritten to not
rely on the pieces above, then compojure would be ready to rock.

--
Cheers,

Aaron Bedra
--
Clojure/core
http://clojure.com

Shree Mulay

unread,
Apr 15, 2011, 1:38:18 PM4/15/11
to comp...@googlegroups.com
Thanks Aaron,

I got CLOSE - but I still couldn't get it to work...  :((((  The following is what my project.clj looks like:

(defproject compojure_example "1.0.0-SNAPSHOT"
;  :description "A Compojure 'Hello World' application"
;  :dependencies [[org.clojure/clojure "1.2.0"]
;                 [org.clojure/clojure-contrib "1.2.0"]
;                 [compojure "0.6.2"]]
;  :dev-dependencies [[lein-ring "0.4.0"]]
;  :ring {:handler compojure_example.core/app})
:description "A Compojure 'Hello World' application"
:dependencies [[org.clojure/clojure "1.3.0-alpha6"]
              [org.clojure.contrib/complete "1.3.0-SNAPSHOT"]
              ;[org.clojure/clojure "1.2.1"]
              ;[org.clojure/clojure-contrib "1.2.0"]
              [compojure "0.6.2" :exclusions    [clojure.contrib.core/-?>
                                                clojure.contrib.def/name-with-attributes]]
              ;[sandbar/sandbar "0.3.0"]
              ;[ring "0.3.7"]
              ]
:dev-dependencies [[lein-ring "0.4.0"]
                  [marginalia "0.5.0"]
                  [com.ashafa/clutch "0.2.4"]
                  ]
:ring {:handler compojure_example.core/app}
:main compojure_example.core
)

Any assistance is MUCH obliged!

Thanks,

shree

Aaron Bedra

unread,
Apr 15, 2011, 1:55:07 PM4/15/11
to comp...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Compojure" group.
To post to this group, send email to comp...@googlegroups.com.
To unsubscribe from this group, send email to compojure+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/compojure?hl=en.
Just pull out all of contrib and all of clojure in your exclusions.  I only mentioned the specifics as a reference to what is needed to pull compojure out of any dependencies on contrib since all of contrib is being deprecated in favor of individual projects in the clojure github org.

James Reeves

unread,
Apr 15, 2011, 1:53:33 PM4/15/11
to comp...@googlegroups.com
On 15 April 2011 18:38, Shree Mulay <shree...@gmail.com> wrote:
>> :dependencies [[org.clojure/clojure "1.3.0-alpha6"]
>>               [org.clojure.contrib/complete "1.3.0-SNAPSHOT"]
>>               ;[org.clojure/clojure "1.2.1"]
>>               ;[org.clojure/clojure-contrib "1.2.0"]
>>               [compojure "0.6.2" :exclusions    [clojure.contrib.core/-?>
>>
>>  clojure.contrib.def/name-with-attributes]]

It looks like you're using exclusions incorrectly. Exclusions exclude
dependent packages, not functions. Many packages, including Ring and
Compojure, depend on Clojure 1.2.0. You need to explicitly exclude
these dependencies.

Take a look at the Compojure project.clj file. I believe I use package
exclusions to get autodoc to work (although the latest Leiningen
breaks it anyway - *sigh*).

- James

Shree Mulay

unread,
Apr 15, 2011, 2:20:52 PM4/15/11
to comp...@googlegroups.com
THANKS A TON JAMES & AARON!,

I FINALLY got it to work!  :))))))


(defproject compojure_example "1.0.0-SNAPSHOT"
:description "A Compojure 'Hello World' application"
:dependencies [;[org.clojure/clojure "1.3.0-alpha6"]
              ;[org.clojure.contrib/complete "1.3.0-SNAPSHOT"]
              [org.clojure/clojure "1.2.1"]
              [org.clojure/clojure-contrib "1.2.0"]
              [compojure "0.6.2" :exclusions    [org.clojure/clojure
                                                org.clojure/clojure-contrib]]
              [sandbar/sandbar "0.3.0"]
              [ring "0.3.7"]
              ]
:dev-dependencies [[lein-ring "0.4.0"]
                  [marginalia "0.5.0"]
                  [com.ashafa/clutch "0.2.4"]
                  [uk.org.alienscience/leiningen-war "0.0.12"]
                  ]
:ring {:handler compojure_example.core/app}
:main compojure_example.core
)

I'm also running leiningen 1.5.2, as well.  As you can see, I'm REALLY pumped about running the latest libraries!  I know it isn't necessarily necessary, but nonetheless - why not???

Thanks again, guys!,

- shree

Aaron Bedra

unread,
Apr 15, 2011, 2:33:42 PM4/15/11
to comp...@googlegroups.com
Here is a sample project.clj that you can use

(defproject example "1.0.0-SNAPSHOT"
:description ""
:dependencies [[org.clojure/clojure "1.3.0-alpha6"]
[org.clojure.contrib/def "1.3.0-SNAPSHOT"]
[org.clojure.contrib/core "1.3.0-SNAPSHOT"]
[ring/ring-jetty-adapter "0.3.7"]
[compojure "0.6.2" :exclusions
[org.clojure/clojure

org.clojure/clojure-contrib]]])

This will allow you to use 1.3 on your compojure projects.

Reply all
Reply to author
Forward
0 new messages