Alex Collins is a enterprise Java developer and currently works in the UK. He has worked in the insurance, publishing, telecoms and supply chain. In his spare time he codes in Python, Clojure and Scala (but not at the same time) and enjoys a multitude of sports. His catchphrase is K.I.S.S! Alex has posted 20 posts at DZone. You can read more from them at their website. View Full User Profile

Removed

08.13.2010
| 4529 views |
  • submit to reddit

 

Published at DZone with permission of its author, Alex Collins.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Jilles Van Gurp replied on Fri, 2010/08/13 - 1:16pm

The notion of a build process assumes that there is something to build and that that something is somehow complicated/tedious/difficult.

This is indeed true for Java but not inherently so. Maven is a workaround, not a solution here (and hardly the best workaround I would argue)

Why do we compile? Because JVMs consume byte code. What language is the compiler written in? Well, Java of course. So why not integrate the compiler with the jvm and just treat the output as something transient and conveniently cacheable? Really, there's no reason for a Java file to be different than a jsp file (which is actually compiled to Java source at run time before being fed into a Java compiler, at run time). Have you ever heard of people pre-compiling jsp files? It's possible but most would consider that a waste of time.

Enter the play framework for Java which reduces the edit/compile/test/package/integration-test/deploy/manual test cycle to : edit, F5 (browser refresh), and run the tests (unit, integration and/or manual) in the browser. It's Java. It's still statically compiled. It just happens to be automated the way it should be. It's not for anyone but it is a nice example of how much simpler our lives could be without maven. Integrating runtime and build tools reduces the build tools to a just in time optimization. If practical you may sometimes want to do that ahead of time but not all of the time.

90% of what maven does is just moving files around. That includes downloading them or creating them, copying them from A to B, archiving them, in some cases unarchiving them, and uploading them to servers. If you are developing that is technically a waste of time that comes out of your very expensive budget of time you have reserved for coding rather than watching the maven console.

Get rid of the stupid moving files around and you no longer need rediculously complicated build tools. We need to get rid of the need for build tools. Maven is part of the problem, not the solution.

Alex Collins replied on Sat, 2010/08/14 - 4:58am in response to: Jilles Van Gurp

Thanks for reading.

 The problem with what you're saying is;

  1. You're assuming JSPs are a problem and in fact that this is entirely on the web tier. It isn't.
  2. Pre-compiling JSPs is actually a very useful integration test to ensure changes don't break what's already working. You'd only notice this at runtime otherwise. Granted, few do it.
  3. Maven does a lot more than "moving files around" and without maven doing it seamlessly and unobtrusively for you you'd have to do it yourself. It's not a problem to need a dependency ("file" as you put it) and having to obtain that dependency is part of the development process.

Mladen Girazovski replied on Mon, 2010/08/16 - 2:37am in response to: Alex Collins

Pre-compiling JSPs is actually a very useful integration test to ensure changes don't break what's already working. You'd only notice this at runtime otherwise. Granted, few do it.

There is even a couple of Maven plugins that compile your JSPs, very useful if you want to find out if the JSPs are still compilatbly after refactoring or other changes. No need to include the compiled versions in the war, just compiling them is a valuable safety net that saves time compared with the usual manual testing.

 

Rick Siskey replied on Thu, 2011/10/27 - 12:13am

Wow, I can see there is conflicting opinion regarding certain issues. But I have to agree that both of them are geniuses on their own right. So keep on debating, who knows you might get something good from it. - Rick Siskey

Rick Siskey replied on Thu, 2011/10/27 - 12:15am

. - Rick Siskey

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.