Author: kevj
Date: Sat Jan 23 13:58:40 2010
New Revision: 902405

URL: http://svn.apache.org/viewvc?rev=902405&view=rev
Log:
-non-controversial exception message and start of support of jgit

Modified:
    
ant/sandbox/antlibs/git/trunk/src/main/org/apache/ant/git/AbstractGitTask.java

Modified: 
ant/sandbox/antlibs/git/trunk/src/main/org/apache/ant/git/AbstractGitTask.java
URL: 
http://svn.apache.org/viewvc/ant/sandbox/antlibs/git/trunk/src/main/org/apache/ant/git/AbstractGitTask.java?rev=902405&r1=902404&r2=902405&view=diff
==============================================================================
--- 
ant/sandbox/antlibs/git/trunk/src/main/org/apache/ant/git/AbstractGitTask.java 
(original)
+++ 
ant/sandbox/antlibs/git/trunk/src/main/org/apache/ant/git/AbstractGitTask.java 
Sat Jan 23 13:58:40 2010
@@ -575,7 +575,18 @@
                        throw new BuildException("You must specify a gitRepo 
value");
                }
                if(!validGitRepo()) {
-                       throw new BuildException("The repository [ "+ 
getGitRepo()+ " ] specified is not recognised");
+                       throw new BuildException("The repository [ "+ 
getGitRepo()+ " ] specified is invalid");
                }
        }
+       
+       protected boolean jgitPresent() throws BuildException {
+               try {
+                       Class.forName("org.eclipse.jgit.lib.Repository");
+               } catch (ClassNotFoundException e){
+                       return false;
+               } catch (Exception e) {
+                       throw new BuildException(e);
+               }
+               return true;
+       }
 }


Reply via email to