Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is anyone else out there sick of the state of current build systems in the Java space?

Why shouldn't I just write my next project's build scripts in Python, Ruby or another fully feature scripting language and get back some of that control?

Does anyone have any experience in putting something like this together? If so did it work out well or was it a disaster?

share|improve this question

closed as primarily opinion-based by Michael K, GlenH7, gnat, Giorgio, MichaelT Mar 15 at 0:37

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

    
You need IDE integration - an mutual understanding of your code and your IDE - or you will very rapidly tire of having to maintain everything in several places. –  user1249 Jun 28 '11 at 13:16
1  
I have worked on a team once where the build engineers utilized Ant to create the build artifacts, but then wrote a Perl application to invoke Ant, and deploy the disparate pieces to the appropriate environments. It seems Perl is much better suited for deployment aspects. –  maple_shaft Jun 28 '11 at 14:10
    
You could always use make, couldn't you? –  FrustratedWithFormsDesigner Jun 28 '11 at 14:33
    
@FrustratedWithFormsDesigner I could, couldn't I? –  Fergal Jun 29 '11 at 15:10
add comment

4 Answers 4

up vote 9 down vote accepted

I was getting really frustrated with Ant and Maven, and not being able to just write a script snippet to do something not covered by a plugin. Then I discovered Gradle and haven't looked back.

It's based off Groovy, and is really flexible and powerful. You can also include Maven and Ant plugins, grab thing from Maven repos, and much more. It's quickly become my favorite build system for pretty much everything, not just Java and Groovy.

share|improve this answer
    
I do like Groovy –  Fergal Jun 28 '11 at 13:08
1  
+1: With Gradle you don't feel like you are fighting the build system any more. –  Paul Cager Jun 28 '11 at 13:41
    
@Jo-Herman Haugholt - but gradle is still slooooooow. –  shabunc Nov 27 '11 at 23:08
    
@shabunc Well, yeah, it's not Greased Lightning. But as of writing, it's still a few milestones, betas and release candidates away of version 1.0. It's still a young project, so give them time (also the Groovy guys are working hard on performance tuning as well, which should trickle down to Gradle in time). In the meanwhile, the overhead is worth it for me at least. –  Jo-Herman Haugholt Nov 29 '11 at 9:53
add comment

I like Maven a lot. Prior to Maven, I used Ant for several years to build and package my Java applications. The Ant projects usually had the dependencies checked into the project directory in the source-control system (SCS). For example, you'd have 10 projects created by 10 developers who each downloaded a separate copy of Log4j and checked it into their project's location in the SCS. That's a lot of duplicated effort...

Maven makes managing dependencies in a large organization much easier. In the case of my current company, there's a central Maven repository containing all of the build dependencies. All of the projects at the company must pull their dependencies from the central repo. Anyone can submit new modules to the Maven repository using a Web form. It's very democratic. This enables projects to contain only the source-code & resources particular to the project.

I also find the integration between Eclipse and Maven to be very good. The standardized build process imposed by Maven makes it possible for Eclipse to configure projects with little or no customization needed.

share|improve this answer
1  
Maven isn't just for dependencies, it is for release engineering, project management, building, testing, etc. and coupled with something like Archiva is a very powerful way to manage projects where everyone only has to learn one tool instead of whatever developer X decided to write on a particular day. –  Jarrod Roberson Jul 1 '11 at 0:54
add comment

Exactly what would throwing a scripting language in the mix help? It would only complicate things and prevent much IDE integration.

Being a heavy Maven user, Maven works great most of the time. A basic POM with a few dependencies is very easy to create. It also is an almost universal system. You can make your project in Maven and know that it will perform the exact same way in any IDE.

I will admit that more complex tasks do take a fair amount of googling. But for almost any problem, there's a maven plugin for it. If no Maven plugin exists for your problem, then I think your doing it wrong.

Maven provides structure and order. Scripting languages would just complicate things.

Remember though, with the maven exec plugin you can run any command you want, like invoking your python script.

share|improve this answer
1  
Plus you can run java from the maven exec plugin, so you can write your 'scripts' in a decent language that you're already familiar with, if there's no maven plugin already. –  artbristol Jul 1 '11 at 10:00
1  
I hope you didn't intend to suggest that Python and Ruby aren't "decent languages." –  syrion Jul 1 '11 at 11:11
add comment

From what I heard at Java One last year, the new Module System will make classpaths obsolete, and make build/deploy systems pretty simple ( compared to now)

share|improve this answer
    
Sounds interesting, but it hasn't shipped yet... –  user1249 Jul 1 '11 at 6:52
    
Be patient now. Java's only been around for like 20 years. –  Erik Reppen Jul 3 '13 at 15:06
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.