user3697574
user3697574

Reputation: 121

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(?)

Upvotes: 2

Views: 1182

Answers (2)

gidds
gidds

Reputation: 18597

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.

Upvotes: 1

Januson
Januson

Reputation: 4841

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.

Upvotes: 1

Related Questions