Even though what Aaron said is correct, I'll just add that with lein2
you can get away with not "installing" your jar in ~/.m2/. Just use the
:resource-paths key in your project.clj and point to a folder with
'orphan' jars...something like this:
:resource-paths ["orphan-jars/*"] ;;all jars under directory
orphan-jars (temporary hack)
this tells lein2 to include this directory in your classpath...all that
is left is to import the classes you want from your own namespaces...If
you've got bare classes instead of a jar use the :java-source-paths key
instead...
HTH, :-)
Jim
On 17/02/13 00:18, Aaron Cohen wrote:
Also, reading further on the blog, for lein2 you need to change
mvninstall:install-file-Dfile=jaad-0.8.3.jar-DartifactId=jaad-Dversion=0.8.3-DgroupId=jaad-Dpackaging=jar-DlocalRepositoryPath=maven_repository
to
|mvn deploy:deploy-file| -Dfile=jaad-0.8.3.jar -DartifactId=jaad
-Dversion=0.8.3 -DgroupId=jaad -Dpackaging=jar -Durl=file:maven_repository
On Sat, Feb 16, 2013 at 7:13 PM, Aaron Cohen <aa...@assonance.org
<mailto:aa...@assonance.org>> wrote:
I'm not sure if this is your problem, but a newbie might not
realize one thing from that blog post.
After doing all the steps there, you still have to add the
dependency for that artifact in your project.clj
I don't know how you named your local jar, but for their example
you would need to add
:dependencies [
....
[jaad/jaad "0.8.3"]]
On Sat, Feb 16, 2013 at 6:00 PM, Jarod <jaaroddeerfi...@yahoo.com
<mailto:jaaroddeerfi...@yahoo.com>> wrote:
Hi. This is a really basic question, as I'm new to Clojure
and Java. I'm trying to use a jar file for Stanford's NLP
software that isn't available on Maven. I successfully ran
the commands from this website:
www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/
<http://www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/>
to create a local maven repository, but how do I access the
methods in the jar now? I created a project using leiningen
with eclipse and counterclockwise and I add the following to
core.clj in the src directory to import the jar:
(import 'stanford-corenlp)
where stanford-corenlp is the name of the directory in the
local maven repository. However, I get the error:
ClassNotFoundException stanford-corenlp
java.net.URLClassLoader$1.run (URLClassLoader.java:217)
Thanks in advance for your help.
--
--
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
<mailto: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
<mailto:clojure%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the
Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to clojure+unsubscr...@googlegroups.com
<mailto:clojure%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
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
---
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.