001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: /* *************************************************************************
021: *
022: * Copyright (c) 2002, SeeBeyond Technology Corporation,
023: * All Rights Reserved
024: *
025: * This program, and all the routines referenced herein,
026: * are the proprietary properties and trade secrets of
027: * SEEBEYOND TECHNOLOGY CORPORATION.
028: *
029: * Except as provided for by license agreement, this
030: * program shall not be duplicated, used, or disclosed
031: * without written consent signed by an officer of
032: * SEEBEYOND TECHNOLOGY CORPORATION.
033: *
034: ***************************************************************************/
035: package org.netbeans.modules.sql.project.anttasks;
036:
037: import java.io.File;
038: import java.io.FileOutputStream;
039: import java.util.ArrayList;
040: import java.util.List;
041: import org.apache.tools.ant.BuildException;
042: import org.apache.tools.ant.Task;
043:
044: /**
045: *
046: * @author blu
047: */
048: public class GenerateAsaArtifacts extends Task {
049: private String mSrcDirectoryLocation;
050: private String mBuildDirectoryLocation;
051: private String mJbiDescriptorFileLocation;
052:
053: /** Creates a new instance of GenerateIEPASAArtifacts */
054: public GenerateAsaArtifacts() {
055: }
056:
057: /**
058: * @return Returns the srcDirectoryLocation.
059: */
060: public String getSrcDirectoryLocation() {
061: return mSrcDirectoryLocation;
062: }
063:
064: /**
065: * @param srcDirectoryLocation The srcDirectoryLocation to set.
066: */
067: public void setSrcDirectoryLocation(String srcDirectoryLocation) {
068: mSrcDirectoryLocation = srcDirectoryLocation;
069: }
070:
071: /**
072: * @return Returns the srcDirectoryLocation.
073: */
074: public String getBuildDirectoryLocation() {
075: return mBuildDirectoryLocation;
076: }
077:
078: /**
079: * @param srcDirectoryLocation The srcDirectoryLocation to set.
080: */
081: public void setBuildDirectoryLocation(String buildDirectoryLocation) {
082: mBuildDirectoryLocation = buildDirectoryLocation;
083: }
084:
085: /**
086: * @return Returns the portMapFileLocation.
087: */
088: public String getJbiDescriptorFileLocation() {
089: return mJbiDescriptorFileLocation;
090: }
091:
092: /**
093: * @param portMapFileLocation The portMapFileLocation to set.
094: */
095: public void setJbiDescriptorFileLocation(
096: String jbiDescriptorFileLocation) {
097: mJbiDescriptorFileLocation = jbiDescriptorFileLocation;
098: }
099:
100: public void execute() throws BuildException {
101: File srcDir = new File(mSrcDirectoryLocation);
102: if (!srcDir.exists()) {
103: throw new BuildException("Directory "
104: + mSrcDirectoryLocation + " does not exit.");
105: }
106: try {
107: String srcDirPath = srcDir.getAbsolutePath();
108: //1: for appending '/'
109: int srcDirPathLen = srcDir.getPath().length() + 1;
110: String[] ext = new String[] { ".sql" };
111: } catch (Exception e) {
112: throw new BuildException(e.getMessage());
113: }
114: }
115:
116: public static void main(String[] args) {
117: GenerateAsaArtifacts tsk = new GenerateAsaArtifacts();
118: tsk.setJbiDescriptorFileLocation("c:/temp/portMap.xml");
119: tsk.setSrcDirectoryLocation("c:/temp");
120: tsk.execute();
121: }
122:
123: }
|