The point of a convention-based approach is that you don't have
explicitly run compiler tasks or copy files all over the place. You just
stick your files in the place where the Java plugin expects them to be
and it compiles them for you, runs your tests and builds your jar file.
And yes, that's what maven does and it's generally a good thing, at
least as a starting point on which you can build. If you find that
cryptic then you should probably stick with ant, but personally I found
the manual very useful and well written.
And of course, you can still use ant through gradle to do any of the
things you can normally do with ant. Have a look at gradle's own build
file and you will find plenty of examples in there of ant calls (running
java, zipping files, copying stuff etc):
http://svn.codehaus.org/gradle/gradle-core/trunk/build.gradle
Luke.
On 27/5/09 01:16, Dean Schulze wrote:
Those links are the same material that is in the user guide, which I've
read twice and still don't have a clue about how to use gradle to build
a j2ee project.
I've written many Ant builds, some very complex, but your documentation
doesn't give me a clue about how to do basic things like compile .java
files.
The problem is that chapter 6 is cryptic. A typical J2EE project has
source files that get compiled with javac, web artifacts like .html and
.jsp pages that simply get moved to a directory in the .war structure,
and deployment descriptors.
I don't see any of that in your documentation.
How do I compile my .java files? How do I specify the src/ and output
directories? How do I move artifacts into WEB-INF/lib, etc?
Ant, for all of its shortcomings is at least intuitive. The attributes
and child elements of <javac>, <jar>, and <war> correspond to the
underlying tools. Ant falls flat on its face, however, with simple
things like doing if ... else... You can't change the value of a
property, and lots of other things. That's really what I'm looking for
from gradle.
If chapter 6 is the "normal" way to do things in gradle, then you've
made very straight forward things cryptic. If I wanted that I'd use Maven.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email