James, Aaron and Jim: thanks for your help, but it still get the old error
message and another: "Leiningen managed dependencies issue: problem
resolving following dependencies: [jaad/jaad "0.8.4"]". If anyone has
time, my lein version is 1.7.1 and maven version is 2.2.1 and I used the
following steps:
1) I created a new Leningen project that I called "project1".
2) Within the project1 directory, I create sub-directory: "maven_repository"
3) I place the jaad jar file into maven_repository, go to maven_repository
and run the following:
mvn install:install-file -Dfile=jaad-0.8.4.jar -DartifactId=jaad
-Dversion=0.8.4 -DgroupId=jaad -Dpackaging=jar -DlocalRepositoryPath=.
Output looks like this:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [install:install-file] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [install:install-file {execution: default-cli}]
[INFO] Installing
/home/abc/software/eclipse/workspace/project1/maven_repository/jaad-0.8.4.jar
to
/home/abc/software/eclipse/workspace/project1/maven_repository/jaad/jaad/0.8.4/jaad-0.8.4.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Sun Feb 17 14:48:24 EST 2013
[INFO] Final Memory: 4M/74M
[INFO]
------------------------------------------------------------------------
4) I modify project.clj by adding the repository and dependency line.
(defproject project1 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"local" ~(str (.toURI (java.io.File. "maven_repository")))}
:dependencies [[org.clojure/clojure "1.4.0"]
[jaad/jaad "0.8.4"]])
5) I look in maven_repository/jaad/jaad and see a subdirectory "0.8.4" and
a file called "maven-metadata-local.xml".
6) I run "lein deps" using leiningen version 1.7.1 and get:
Downloading: jaad/jaad/0.8.4/jaad-0.8.4.pom from repository central at
http://repo1.maven.org/maven2
Unable to locate resource in repository
[INFO] Unable to find resource 'jaad:jaad:pom:0.8.4' in repository central
(http://repo1.maven.org/maven2)
Downloading: jaad/jaad/0.8.4/jaad-0.8.4.pom from repository clojars at
http://clojars.org/repo/
Unable to locate resource in repository
[INFO] Unable to find resource 'jaad:jaad:pom:0.8.4' in repository clojars
(http://clojars.org/repo/)
Downloading: jaad/jaad/0.8.4/jaad-0.8.4.pom from repository local at
file:/home/abc/software/eclipse/workspace/project1/maven_repository/
Transferring 0K from local
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for
jaad/jaad/0.8.4/jaad-0.8.4.pom - IGNORING
Downloading: jaad/jaad/0.8.4/jaad-0.8.4.jar from repository central at
http://repo1.maven.org/maven2
Unable to locate resource in repository
[INFO] Unable to find resource 'jaad:jaad:jar:0.8.4' in repository central
(http://repo1.maven.org/maven2)
Downloading: jaad/jaad/0.8.4/jaad-0.8.4.jar from repository clojars at
http://clojars.org/repo/
Unable to locate resource in repository
[INFO] Unable to find resource 'jaad:jaad:jar:0.8.4' in repository clojars
(http://clojars.org/repo/)
Downloading: jaad/jaad/0.8.4/jaad-0.8.4.jar from repository local at
file:/home/abc/software/eclipse/workspace/project1/maven_repository/
Transferring 653K from local
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for
jaad/jaad/0.8.4/jaad-0.8.4.jar - IGNORING
Copying 2 files to /home/abc/software/eclipse/workspace/project1/lib
7) I look in "lib" directory and see clojure-1.4.0.jar and jaad-0.8.4.jar
8) I open up core.clj and try to run it and get the same error message.
9) When I look at project.clj in eclipse/counterclockwise, I see a red x at
the top saying:
Leiningen managed dependencies issue: problem resolving following
dependencies: [jaad/jaad "0.8.4"]
Thanks for any advice.
On Saturday, February 16, 2013 7:13:38 PM UTC-5, Aaron Cohen 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 <[email protected] <javascript:>
> > 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/
>>
>> 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 [email protected]<javascript:>
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> 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 [email protected] <javascript:>.
>> 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 [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.