This code:
 
String s = "D:\\My Documents\\Projectos\\MavenPlugin\\project.xml";
File f = new File(s);
if (f.exists() || f.canRead())
{
   Project p = MavenUtils.getProject(f); // Using Maven 1 parser
   System.out.println("OK");
}
else
{
  System.out.println("no file present");
}
 
that didn't throw any exception in rc2 now shows this as a result:
 
 
java.lang.NullPointerException
 at java.io.File.<init>(File.java:180)
 at
org.apache.maven.jelly.MavenJellyContext.resolveRelativePath(MavenJellyC
ontext.java:688)
 at
org.apache.maven.jelly.MavenJellyContext.resolveRelativePaths(MavenJelly
Context.java:682)
 at org.apache.maven.MavenUtils.createContext(MavenUtils.java:788)
 at org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:211)
 at org.apache.maven.MavenUtils.getProject(MavenUtils.java:143) 
 
Thanks

Reply via email to