portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r513674 - /portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java
Date Fri, 02 Mar 2007 09:15:30 GMT
Author: ate
Date: Fri Mar  2 01:15:30 2007
New Revision: 513674

URL: http://svn.apache.org/viewvc?view=rev&rev=513674
Log:
ant-installer check db connections task

Added:
    portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java
  (with props)

Added: portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java?view=auto&rev=513674
==============================================================================
--- portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java
(added)
+++ portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java
Fri Mar  2 01:15:30 2007
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the  "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" 
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+package org.apache.jetspeed.anttasks;
+
+/**
+ * @version $Id$
+ *
+ */
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.JDBCTask;
+
+public class AntInstallerCheckConnection extends JDBCTask
+{
+    public void setDriver(String driver)
+    {
+        super.setDriver(driver);
+    }
+    
+    public void execute() throws BuildException
+    {
+        setDriver(getProject().getUserProperty("jdbcDriverClass"));
+        setUserid(getProject().getUserProperty("dbUser"));
+        setPassword(getProject().getUserProperty("dbPassword"));
+        setUrl(getProject().getUserProperty("jdbcUrl"));
+        try
+        {
+            getConnection();
+        }
+        catch (Exception e)
+        {
+            throw new RuntimeException("Connection failed",e);
+        }
+    }
+}

Propchange: portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/trunk/ant-tasks/src/java/org/apache/jetspeed/anttasks/AntInstallerCheckConnection.java
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message