Live data from Hacker News

Java Build Systems - a sad state of affairs

grok-code.com

11–20 of 45 posts

Re: Java Build Systems - a sad state of affairs

#13
post #3

"But Maven uses XML too" - since Maven 3 you can use Groovy, JRuby & Scala too.

I admit I'm entertained by your use of the word "since." Maven 3 is still beta. When it gets released and adopted I fully believe it will be great. I won't be depending on it until it is ready for prime time.

I do wonder if Maven 3's flexibility will hurt it or help it in the long run. Yes pom.xml is XML, but at least there is only one dialect. If team A likes XML and team B likes Groovy, development manager C will have a fun time getting them to work together on project D.

Re: Java Build Systems - a sad state of affairs

#14
post #12

So, the Java build systems suck? You should see the .NET ones - those make me cry. I mean that the glass is half full. I wouldn't call a full dependency resolution system like maven's "a sad state of affairs."

Amen sir. I made a switch to .NET and boy suddenly the Java ecosystem (library, builds, IDE) looks a lot better!

Re: Java Build Systems - a sad state of affairs

#15
post #2

The article makes no mention of the solutions implemented in the newer languages on the JVM: - Groovy has Gant ( http://gant.codehaus.org/ ) - Clojure has Lancet ( http://github.com/stuarthalloway/lancet ) Both of these avoid the "XML tag soup" problem.

I believe on the Clojure side, leiningen is the preferred tool of choice:

http://github.com/technomancy/leiningen

Re: Java Build Systems - a sad state of affairs

#17
Or maybe you want to loop through a set of files and perform a set of operations on them.

If you did start putting clever code into Ant files, they'd get so huge they'd be unmanageable. It's really really easy to just write your own Ant plugins in Java.

Then your build files are very straightforward and readable, and just look like a set of simple file operations and method calls.

Then Ant becomes really powerful - you can even write some plugins that take a web server out of service using telnet to Cisco LocalDirector, SCP a deployment build across and all sorts of other clever stuff.

Plugin example:

  public class MyTask extends Task {

    private String param1;
    private String param2;

    public void execute() throws BuildException {
      // do something
    }
  }
Then in the XML:

  

Re: Java Build Systems - a sad state of affairs

#18
post #16

I still use Makefiles, and I like it!

There's something to be said for relatively simple tool like make. It can be a lot easier to understand what's going on with Make because it eliminates the layers of stuff between the build script and the actual commands that are run. That's not to say that it's possible to write inscrutable Makefiles.
Post reply on HN