Hello Trygve Fixed the source as per your recommendation. My only issue was that when a directory is non existant the isDirectory() always throws false, so wasn't getting the expected result. Decided to just create the file/directory if non-existant and then check for its type.
Reagrds Johann Reyes -----Original Message----- From: Trygve Laugstøl [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 1:28 PM To: [email protected] Subject: [mojo-dev] Re: [mojo-scm] [1700]trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/code haus/mojo/hibernate3/HibernateUtils.java:o Fixed bug when ${basedir} contained a period ('.') On Tue, 2006-03-21 at 14:40 +0000, [EMAIL PROTECTED] wrote: > Revision > 1700 > Author > jreyes > Date > 2006-03-21 09:40:22 -0500 (Tue, 21 Mar 2006) > Log Message > o Fixed bug when ${basedir} contained a period ('.') > Modified Paths > * trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/m ojo/hibernate3/HibernateUtils.java > Diff > Modified: > trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/m ojo/hibernate3/HibernateUtils.java (1699 => 1700) > --- trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/m ojo/hibernate3/HibernateUtils.java 2006-03-21 02:28:54 UTC (rev 1699) > +++ trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/m ojo/hibernate3/HibernateUtils.java 2006-03-21 14:40:22 UTC (rev 1700) > @@ -49,41 +49,34 @@ > /** > * Checks if the directory is in fact a directory path and creates it if it is necessary. > * > - * @param directory the directory > - * @param parameter name of the parameter calling this method > + * @param parent parent file > + * @param directoryPath child directory path > + * @param parameter name of the parameter calling this method > * @return the directory as a File object > * @throws MojoExecutionException if the directory is not a directory > */ > - public static File prepareDirectory( File directory, String parameter ) > + public static File prepareDirectory( File parent, String directoryPath, String parameter ) > throws MojoExecutionException > { > + if ( directoryPath.indexOf( '.' ) != -1 ) > + { > + throw new MojoExecutionException( "<" + parameter + "> is not a directory." ); > + } > + What about using File.isDirectory() here? -- Trygve
