简体   繁体   中英

How can I build other people's projects from github?

I suspect this is not as hard as I'm making it but I'm having trouble understanding how to build other people's source into jar files I can use for my own projects.

For example(please make the answer general so I can apply it to other sources), I'm looking at https://github.com/xetorthio/jedis and the source seems newer than the provided jars(for which I noticed a few bugs), so I wanted to try to build it so its like the provided jars(this way I can test it in my project). I know how to clone the repository but I don't feel like copying/pasting or import one file at a time into eclipse to export a jar.

Is there something easy that I can go into a folder and run a command to get the jar(my understanding jar's are just zipped files)?

Each project will provide its own way of building and packaging. There are some standard methods. The project you linked to is using a tool called Gradle .

Try running gradlew to see if that will build the project for you. If that fails, you could learn to use Gradle. Alternatively you could contact the project owner and ask for a new release.

Clone the project using git clone then build it using make , maven , ant or whatever is given there.

In your case doing a git clone https://github.com/xetorthio/jedis.git will clone the repo then you use Gradle to build the project. Since I didn't use it, see their tutorial for more

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM