Which tool to use to generate releases in Java?

Asked

Viewed 321 times

7

I am developing my first project in Java, the application is an API using several libraries, among them: Jetty, Hibernate, Httpclient, Jasperreport...

In this project I use the Maven framework, I would like to know which tools to use to generate releases in Java?

  • 2

    As it is, the question is hard to answer. What exactly do you call gerar releases? What kind of functionality/behavior do you expect?

2 answers

13


Generating a release is something very broad and involves many things. But the most basic can be achieved with Maven itself, via "release:prepare" and "release:perform". More details about the "release" plugin can be found in official documentation.

Based on the comments of these answers: with Maven, you specify the type of project you have (jar, War, Ear), and Maven automatically generates the artifact via "mvn package". The package is in the "target" directory. Libraries that are defined as "normal" dependencies (Scope=Compile, or no defined scope), are placed in the final package, whether War or Ear. If it is a jar, you need to use a plugin like the "Assembly", that will end up generating a great jar with all the dependencies included.

  • I believe his doubt is how to package the jars Maven creates, what the convection used to deploy java, if it’s just the jar, if you should join the jars in one, if you should take the jvm, if you create an installer. Even these are my doubts.

  • I ended up leaving very broad the question, these questions that the leogaldioli asked enters the context of my doubt.

  • Okay, I changed the answer a little to include something else, but it would be interesting to specify the problem you’re having, otherwise it’s hard to know what you’ve done and what you already know :-)

2

Alternatively to Maven, you can use the Gradle. It’s a tool that automates Builds and Tests, and it’s very simple to work with, and it uses the vast repository of Maven itself. I started messing with her two days ago, and I’m really enjoying it. The project definition file, "Gradle.build" is much easier to work with and read than "pom.xml"

According to Gradle’s homepage definition: "... combines the power and flexibility of Ant with Maven’s dependency and convention management..."

More info: http://www.gradle.org/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.