简体   繁体   中英

Installing a framework without maven or gradle

I try to install Javalin framework for creating an API on my Java project. (old java 8 project without maven, gradle, etc). I would like to install the framework with adding the jars to my build path. But If I add the main jar file then it needs another dependencies jar , then another one another one another one.. etc.

Is there any simple way to add this to my project and all it's dependencies without any build tool like Maven,etc?

I have tried adding it manually , but each jar has many dependencies that it is almost impossible(?)

Well you could create a Maven project and use it to download the dependencies for you.

Maven dependency plugin might be useful. With it you could just call:

mvn dependency:copy-dependencies

and it will download all your dependencies into target/dependency .

I don't think there's a way, I'm afraid. Dependency management is the exact problem that build tools like Maven and Gradle were created to solve!

The framework supplier could provide a 'fat' jar including all the dependencies; but I'm not aware of any that do, as everyone uses Maven or Gradle (or SBT or Ivy or Grape or Leiningen or Buildr).

I think the only real alternative is to do it manually — which, as you've discovered, can be a horrible and lengthy task if the dependency tree is big. (And would need redoing with every update.)

So I'd suggest biting the bullet and using Maven if you can.

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