1 | /*
|
---|
2 | * Copyright 2002,2004-2005 The Apache Software Foundation
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | *
|
---|
16 | */
|
---|
17 | package org.apache.tools.ant.taskdefs.optional.extension;
|
---|
18 |
|
---|
19 | import org.apache.tools.ant.types.FileSet;
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * LibFileSet represents a fileset containing libraries.
|
---|
23 | * Asociated with the libraries is data pertaining to
|
---|
24 | * how they are to be handled when building manifests.
|
---|
25 | *
|
---|
26 | */
|
---|
27 | public class LibFileSet
|
---|
28 | extends FileSet {
|
---|
29 | /**
|
---|
30 | * Flag indicating whether should include the
|
---|
31 | * "Implementation-URL" attribute in manifest.
|
---|
32 | * Defaults to false.
|
---|
33 | */
|
---|
34 | private boolean includeURL;
|
---|
35 |
|
---|
36 | /**
|
---|
37 | * Flag indicating whether should include the
|
---|
38 | * "Implementation-*" attributes in manifest.
|
---|
39 | * Defaults to false.
|
---|
40 | */
|
---|
41 | private boolean includeImpl;
|
---|
42 |
|
---|
43 | /**
|
---|
44 | * String that is the base URL for the librarys
|
---|
45 | * when constructing the "Implementation-URL"
|
---|
46 | * attribute. For instance setting the base to
|
---|
47 | * "http://jakarta.apache.org/avalon/libs/" and then
|
---|
48 | * including the library "excalibur-cli-1.0.jar" in the
|
---|
49 | * fileset will result in the "Implementation-URL" attribute
|
---|
50 | * being set to "http://jakarta.apache.org/avalon/libs/excalibur-cli-1.0.jar"
|
---|
51 | *
|
---|
52 | * Note this is only used if the library does not define
|
---|
53 | * "Implementation-URL" itself.
|
---|
54 | *
|
---|
55 | * Note that this also implies includeURL=true
|
---|
56 | */
|
---|
57 | private String urlBase;
|
---|
58 |
|
---|
59 | /**
|
---|
60 | * Flag indicating whether should include the
|
---|
61 | * "Implementation-URL" attribute in manifest.
|
---|
62 | * Defaults to false.
|
---|
63 | *
|
---|
64 | * @param includeURL the flag
|
---|
65 | */
|
---|
66 | public void setIncludeUrl(boolean includeURL) {
|
---|
67 | this.includeURL = includeURL;
|
---|
68 | }
|
---|
69 |
|
---|
70 | /**
|
---|
71 | * Flag indicating whether should include the
|
---|
72 | * "Implementation-*" attributes in manifest.
|
---|
73 | * Defaults to false.
|
---|
74 | *
|
---|
75 | * @param includeImpl the flag
|
---|
76 | */
|
---|
77 | public void setIncludeImpl(boolean includeImpl) {
|
---|
78 | this.includeImpl = includeImpl;
|
---|
79 | }
|
---|
80 |
|
---|
81 | /**
|
---|
82 | * Set the url base for fileset.
|
---|
83 | *
|
---|
84 | * @param urlBase the base url
|
---|
85 | */
|
---|
86 | public void setUrlBase(String urlBase) {
|
---|
87 | this.urlBase = urlBase;
|
---|
88 | }
|
---|
89 |
|
---|
90 | /**
|
---|
91 | * Get the includeURL flag.
|
---|
92 | *
|
---|
93 | * @return the includeURL flag.
|
---|
94 | */
|
---|
95 | boolean isIncludeURL() {
|
---|
96 | return includeURL;
|
---|
97 | }
|
---|
98 |
|
---|
99 | /**
|
---|
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 | }
|
---|