001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: */
018: package org.apache.tools.ant.taskdefs.optional.extension;
019:
020: import org.apache.tools.ant.types.FileSet;
021:
022: /**
023: * LibFileSet represents a fileset containing libraries.
024: * Asociated with the libraries is data pertaining to
025: * how they are to be handled when building manifests.
026: *
027: */
028: public class LibFileSet extends FileSet {
029: /**
030: * Flag indicating whether should include the
031: * "Implementation-URL" attribute in manifest.
032: * Defaults to false.
033: */
034: private boolean includeURL;
035:
036: /**
037: * Flag indicating whether should include the
038: * "Implementation-*" attributes in manifest.
039: * Defaults to false.
040: */
041: private boolean includeImpl;
042:
043: /**
044: * String that is the base URL for the librarys
045: * when constructing the "Implementation-URL"
046: * attribute. For instance setting the base to
047: * "http://jakarta.apache.org/avalon/libs/" and then
048: * including the library "excalibur-cli-1.0.jar" in the
049: * fileset will result in the "Implementation-URL" attribute
050: * being set to "http://jakarta.apache.org/avalon/libs/excalibur-cli-1.0.jar"
051: *
052: * Note this is only used if the library does not define
053: * "Implementation-URL" itself.
054: *
055: * Note that this also implies includeURL=true
056: */
057: private String urlBase;
058:
059: /**
060: * Flag indicating whether should include the
061: * "Implementation-URL" attribute in manifest.
062: * Defaults to false.
063: *
064: * @param includeURL the flag
065: */
066: public void setIncludeUrl(boolean includeURL) {
067: this .includeURL = includeURL;
068: }
069:
070: /**
071: * Flag indicating whether should include the
072: * "Implementation-*" attributes in manifest.
073: * Defaults to false.
074: *
075: * @param includeImpl the flag
076: */
077: public void setIncludeImpl(boolean includeImpl) {
078: this .includeImpl = includeImpl;
079: }
080:
081: /**
082: * Set the url base for fileset.
083: *
084: * @param urlBase the base url
085: */
086: public void setUrlBase(String urlBase) {
087: this .urlBase = urlBase;
088: }
089:
090: /**
091: * Get the includeURL flag.
092: *
093: * @return the includeURL flag.
094: */
095: boolean isIncludeURL() {
096: return includeURL;
097: }
098:
099: /**
100: * Get the includeImpl flag.
101: *
102: * @return the includeImpl flag.
103: */
104: boolean isIncludeImpl() {
105: return includeImpl;
106: }
107:
108: /**
109: * Get the urlbase.
110: *
111: * @return the urlbase.
112: */
113: String getUrlBase() {
114: return urlBase;
115: }
116: }
|