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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]