On Tue, Jun 15, 2010 at 08:19, Philip Crotwell <[email protected]> wrote: > > I wonder is some of this can be cleared up by simply giving the java plugin > a default task (likely "assemble") and making the error message more verbose > in the case of either no build.gradle, or a build.gradle without a src > directory. In some sense a new user types "gradle" and expects either > something useful to happen, or at least a Usage that will point them in the > correct direction. Currently you get a message about "No tasks", telling you > to run gradle -t, which then says "No Tasks". Not terribly helpful someone > new to gradle. > > > Perhaps in the case of no build.gradle you should get: > > FAILURE: Unable to find 'build.gradle' in current directory. > > * What went wrong: > There is not a build.gradle file in the current directory and one was not > specified on the command line. > > * Try: > Create a build.gradle file in the current directory. The simplest instance, > for a java project is: > > apply plugin: 'java' > > See http://www.gradle.org/bla/bla/bla for more information on getting > started with gradle. > > > > And in the case of a build.gradle with apply plugin: 'java', but without a > source directory, you currently get a successful build, with an empty jar > file. Seems like the java plugin should make sure there is at least one > source file, or maybe just a src/main/java before proceeding to the jar > task. Maybe an error message like: > > FAILURE: Could not find a source directory. > > * What went wrong: > No source directory, usually src/main/java, exists. > > * Try: > Create the src/main/java directory and place your java source files in it. > > > Even if there is a "make my directories" task, I think these changes would > be helpful. > > > Just my $0.02 > Philip >
They sound like good changes to me. Anything we can give to the user to help them figure out what is wrong is a step in the right direction in my book. -- Jason Porter http://lightguard-jp.blogspot.com http://twitter.com/lightguardjp Software Engineer Open Source Advocate PGP key id: 926CCFF5 PGP key available at: keyserver.net, pgp.mit.edu --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
