0

I want to use RestEasy in my Java server project, but I don't want to use Gradle or any other dependency management tool.

Instead, I want to get the jar files for RestEasy, as well as anything else that they depend upon, and install them in my project.

I can't figure out a straightforward way to do this. All documentation I can find either ignores the dependencies or assumes you're using Gradle.

I also don't want to manually guess and hunt down the dependencies myself since that seems error-prone.

I'm willing to use Gradle as a one-time process if there is a way I can get it to download all of the dependencies for me and put them in a place where I can extract them.

What's the best solution to this problem?

Frank LaRosa
  • 3,533
  • 6
  • 26
  • 32
  • 1
    "I can't figure out a straightforward way to do this." that's the point of using a package manager. – Federico klez Culloca Jan 22 '20 at 22:13
  • typically you would get the jars and add them to the classpath. A common way is to set a env var CLASSPATH=$JAR1:$JAR2... more here https://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html – Nigel Savage Jan 22 '20 at 22:20
  • @NigelSavage I think the main question here is "how do I know which JARs to get" – Federico klez Culloca Jan 22 '20 at 22:20
  • You probably need to use a transitive dependency manager like gradle some good ans here https://stackoverflow.com/questions/21814652/how-to-download-dependencies-in-gradle – Nigel Savage Jan 22 '20 at 22:27
  • Can I ask why you are so against gradle? – RobOhRob Jan 22 '20 at 22:42
  • Hi Rob, our customer's corporate policy requires that any and all dependencies that we use be bundled with the source code for the project. They are a medical company so I assume they have various legal reasons for wanting to be 100% sure that their application is built the same way each time from known code. – Frank LaRosa Jan 27 '20 at 19:09
  • @FrankLaRosa, can you expand your post with a bit more detail? E.g. What application server? (If it's Wildfly, it comes bundled with RESTeasy and you don't need to include the JARs in the deploy, only depend on them for local development via classpath - simplest right from the Wildfly installation.) How do you plan to deploy your project? (I assume a WAR, which may include JARs - google WAR structure.) How are you building this deploy file if not via gradle or maven? What IDE or development environment are you using? (Might help answerers to suggest specific shortcuts.) – frIT Jan 28 '20 at 18:05

1 Answers1

0

For using gradle as a "one-time process" you could use

gradle app:dependencies

For details look into the answers to this question: Using gradle to find dependency tree

Also, with maven (if you'd prefer that) it would be

mvn dependency:tree
martinw
  • 364
  • 2
  • 7