Java Light Build Tool

I am looking for a lightweight Java build tool. As best as possible. Even due to features. Any recommendations?

+4
source share
8 answers

How much light is possible? This must be javac running from a batch file or shell script.

But why?

+2
source

There are only two options: Ant or Maven.

Ant is essentially a scripting tool that you can do, but you need to write everything yourself.

Maven comes with a lot of predefined project types. This will dictate the directory structure (which some people don't like), but it will also handle the dependencies (which Ant can sort with Ivy).

Personally, I prefer Maven. A few lines of XML will provide you with tasks for running unit tests, stopping and starting a web container (like Jetty or Tomcat), etc.

+1
source

I would recommend Maven2 again - it is very rich thanks to the use of plugins, but it can also be very "light", (depending on what that means):

  • it does not need a hard installation (just unzip the directory + add the path to it in the environment variables (depending on the OS))
  • it does not require configuration - just copy the insert of a simple POM file, and your assembly is ready. You just need to follow the maven directory structure rules
  • it has a plugin for each IDE, so using it with a graphical interface makes it even easier.

Of course, an alternative to ant , but I find it less "light." And I find it less light because ant scripts become ugly and unpredictable and hard to manage, and maven scripts remain simple due to the rich functionality provided by the tool.

+1
source

As said elsewhere, your real choice is between maven or ant. To repeat other feelings, I find that ant has more settings, so I prefer maven. However, many people tend to criticize maven for the fact that although you need less configuration, it loads a lot of dependencies (and dependencies / dependencies), so it all depends on what you mean by “light” - you mean light in configuration or light depending on download / install download jer?

If you want something easy in terms of configuration and loading, you will be better off with a shell script, but it will only be the way you have time to do it!

+1
source

It really depends on your definition of light. Do you need a tool that requires very little work (light on code)? If so, Maven or Gradle might be a good option. Maven was around for a while. If you are doing something that follows their conventions, you will need to write very little in your pom.xml files. If you start to deviate from the norm, it may be difficult to do everything you need (making things less easy). Gradle is also an option. This is not as long as Maven, but allows you to better deviate from the agreement.

If you're looking for something lightweight in terms of lightweight tools, Apache ant might be the best option. It has no conventions built like Maven. If you have a custom build that is pretty simple, you might be able to create a very lightweight ant script to make your build.

+1
source

Maven is simple if you follow its directory structure. If you are using Linux or a Unix system, I would use a shell script. Or you might consider eclipse an IDE or netbeans, they will do the job for you, and dependencies are very easy to configure.

0
source

Have you tried BlueJ ( http://www.bluej.org/ ). I used it a few years ago to educate students. It is simply in the sense that you can simply copy / paste the code and run it. It was created to educate students, so it is very simple and good for Java beginners. Note that this is a complete IDE, not a command line tool like maven or ant.

0
source

If you are going to adhere to standards, Maven is the best choice. If you need flexibility, consider Groovy AntBuilder . short syntax and full power of ant and Groovy scripts.

0
source

Source: https://habr.com/ru/post/1301941/


All Articles