I deployed a project to Clojars the other day in order to be able to effortlessly use it as a dependency in other projects. Today I tried to use it and it broke saying it wasn't able to find a file (let's call it grammar.ebnf). This is a file describing a grammar that is then slurped up in one of my Clojure modules. I made it as a separate file just to separate the grammar from the logic using the grammar. I located it in the same directory as the other source files
Clearly it's not being included in the deployment to Clojars. How do I make sure that this file gets included alongside the .clj files when I deploy using lein deploy clojars?
EDIT: See comments below
Please see this template project. What you need is to make a
./resourcesdirectory, and place files inside of it. These files will be included on the classpath of your project, running either locally or after creating a JAR file.For example, we can make a file
resources/stuff.txtand access it like:
with result