-1

Please help me i'm new to github and maven, currently i'm working on a project and i would like to use this library(jsprit) , but the problem is that the library is in the form of folders with some examples given in.

First i've tried to download the maven dependencies from https://jar-download.com/online-maven-download-tool.php, got the dependencies jar files. I've tried to use it in some example it has given me errors like invalid imports etc..

second i've watched how to import github project to eclispe, all work fine but the problem is how to integrate this library in my current project without messing up the program? Please help me i'm desperate, i haven't slept for one day... Don't get me wrong if i dont know how to do this i just need help !

1 Answers1

0

jsprit is (also) distributed via Maven Central Repository:

http://repo1.maven.org/maven2/com/graphhopper/jsprit-core/

So you should just include a dependency like:

<dependency>
    <groupId>com.graphhopper</groupId>
    <artifactId>jsprit-core</artifactId>
    <version>1.7.2</version>
</dependency>

(You may need other/further dependencies as well.)

lexicore
  • 42,748
  • 17
  • 132
  • 221
  • please help me how to use this depedency ? i don't know how to use maven, without asking too much please help me – Mclareen Rochester Feb 25 '18 at 15:17
  • 1
    @MclareenRochester Sorry, "how to use Maven" is a way too broad question. I do not have resources to guide your through this. – lexicore Feb 25 '18 at 15:18
  • can i make a jar file from this library ? – Mclareen Rochester Feb 25 '18 at 15:20
  • @MclareenRochester Well, you can build it yourself and get JAR files locally. But why would you want to do it? JAR files are [available from the Maven Central](http://repo1.maven.org/maven2/com/graphhopper/jsprit-core/1.7.2/). Just include dependencies in your `pom.xml` file. Maven will do the downloading and dependency management for you. – lexicore Feb 25 '18 at 15:22
  • :'( the project that i'm working is not a maven project, I've tried to download the jar files from the maven repository, it downloaded fine. But when i placed the jar file in the library and tried to compile it, it gave me some import errors (import not found) – Mclareen Rochester Feb 25 '18 at 15:26
  • @MclareenRochester If you don't use build tools like Maven or Gradle (or whatever) then you have to "manage" your dependencies manually. This means finding out, downloading and importing correct and required JAR files. Which can be very daunting. – lexicore Feb 25 '18 at 15:31