clojure - lobos.migrations not found in Maven-style project layout -
i'm having problem getting lobos database migrations library clojure play maven-clojure-plugin , maven-style project structure. lobos looks database migrations in lobos.migrations namespace. if layout project leiningen style:
src/ lobos/ migrations.clj lobos correctly finds lobos.migrations @ run time, when run via lein. however, if lay out project maven-style:
src/ main/ clojure/ lobos/ migrations.clj and utilize maven-clojure-plugin run same tests, lobos no longer finds lobos.migrations. thought issue clojure-maven-plugin, have same issue (lobos not finding lobos.migrations) if run via leon, setting source paths in project.clj appropriately:
:source-paths ["src/main/clojure"] if move lobos/ under src/ , add together src/ source path:
:source-paths ["src" "src/main/clojure"] then lobos correctly finds lobos.migrations again.
i utilize maven-style project layout (and maven-clojure-plugin). how can help lobos find lobos.migrations? have gone wrong?
the lobos.migration/*src-directory* variable indicates source root finding source *migrations-namespace*. if lobos.migration/*reload-migrations* true (the default), lobos.migrations looks migrations namespace in source directory. default src/, needs rebound src/main/clojure in order utilize maven-style directory structure.
one other notable issue: when running jar (i.e. not source), must disable reloading of migrations namespace well:
(binding [lobos.migration/*reload-migrations* false] ;; run migration ) maven clojure leiningen
No comments:
Post a Comment