Hi Gaofeng,
The JAR files are dependency artifacts that must be placed in the Maven
repository. You can specify them in the :dependencies vector as below:
: dependencies [[commons-codec "1.4"]
[commons-logging "1.1.1"]
[org.apache.httpcomponents/httpclient "4.1.2"]
....]
Find their maven coordinates of those artifacts on http://mvnrepository.com
or http://search.maven.org/ and use them in project.clj. You need not have
these JARs in resources/lib folder.
Shantanu
On Saturday, 12 October 2013 07:56:47 UTC+5:30, Gaofeng Zeng wrote:
>
>
> .
> ├── doc
> │ └── intro.md
> ├── java
> │ ├── LIBS
> │ └── NetSpider
> │ ├── bin
> │ ├── build.xml
> │ ├── invalid.src
> │ └── src
> ├── LICENSE
> ├── project.clj
> ├── project.clj.bak
> ├── README.md
> ├── resources
> │ └── lib
> │ ├── commons-codec-1.4.jar
> │ ├── commons-logging-1.1.1.jar
> │ ├── httpclient-4.1.2.jar
> │ ├── httpclient-cache-4.1.2.jar
> │ ├── httpcore-4.1.2.jar
> │ ├── httpmime-4.1.2.jar
> │ ├── jsoup-1.6.3.jar
> │ └── mongo-2.10.1.jar
> ├── src
> │ ├── clj
> │ │ └── crawler
> │ └── java
> │ ├── test
> │ └── util
> ├── target
> │ ├── classes
> │ ├── spider.jar
> │ └── stale
> │ └── extract-native.dependencies
> └── test
> └── crawler
> └── core_test.clj
>
>
> This is my dir tree of my project. Compile the java project need the jars
> that located in resources/lib, and I set this (:resource-paths
> ["resources/lib"]), but not effect.
>
> On Friday, October 11, 2013 10:20:41 PM UTC+8, John Hume wrote:
>>
>> I believe :dependencies and :resource-paths will be used for the
>> classpath at both build and run time. Does that meet your needs?
>>
>>
>> On Fri, Oct 11, 2013 at 8:00 AM, Gaofeng Zeng <[email protected]> wrote:
>>
>>> How use lein compile a Java project?
>>>
>>> I know the java-source-paths can specify the src path. But I don't know
>>> is there any option can specify the lib path that contains dependencies of
>>> Java source.
>>>
>>> (defproject crawler "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"}
>>> :dependencies [[org.clojure/clojure "1.5.1"]]
>>> :source-paths ["src/clj"]
>>> :java-source-paths ["java/NetSpider/src"])
>>>
>>> --
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> http://elhumidor.blogspot.com/
>>
>
--
--
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.