Whats best way to package a Java Application with lots of dependencies?

后端 未结 7 1961
醉酒成梦
醉酒成梦 2021-01-11 14:22

I\'m writing a java app using eclipse which references a few external jars and requires some config files to be user accessable.

  1. What is the best way to pac

7条回答
  •  無奈伤痛
    2021-01-11 14:26

    Ant. It's not the best thing in the world, but it's standard, it's apache, and it works. There's some good examples on the web how to make a simple build.xml for any, and it's got some features like the 'war' task that knows how to put all the basic stuff (classes, web.xml etc) in the jar file for you. You can also tell it to pick up other config files and jars and it will happily do it. It's also really smart about what to compile. You give it a directory, and it finds all the java files and builds them only if their classfile is out of date, so you get some of the traditional make functionality for free without much effort.

提交回复
热议问题