1 /* Copyright (C) 2004 Finalist IT Group
2 *
3 * This file is part of JAG - the Java J2EE Application Generator
4 *
5 * JAG is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * JAG is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with JAG; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17
18 package com.finalist.tools.ant.taskdefs;
19
20 import java.util.Properties;
21
22 /*** Simple value object for a 3rd party library file.
23 * <PRE><lib version="v1_4_1" file="shared/jakarta/ant/optional.jar" /></PRE>.
24 * @author Hillebrand Gelderblom - Finalist IT Group bv
25 */
26 public class Lib {
27
28 /*** CVSTag used to specify the version of the file. */
29 public String version;
30 /*** CVSPath for the library file */
31 public String file;
32
33
34 /*** Setter for version property
35 * @param version CVSTag used to specify the version of the file.
36 */
37 public void setVersion(String version) {
38 this.version = version;
39 }
40
41
42 /*** Setter for file property.
43 * @param file CVSPath for the library file.
44 */
45 public void setFile(String file) {
46 this.file = file;
47 }
48
49
50 /*** Getter for property version.
51 * @return Value of property version.
52 *
53 */
54 public String getVersion() {
55 return this.version;
56 }
57
58
59 /*** Getter for name of the file.
60 * @return Name of the file.
61 */
62 public String getFilename() {
63 return file.substring(file.lastIndexOf('/') + 1);
64 }
65
66
67 /*** Getter for property file.
68 * @return Value of property file.
69 *
70 */
71 public String getFile() {
72 return this.file;
73 }
74
75
76 /*** Builds a string representation of this class.
77 * @return String representation of this class.
78 */
79 public String toString() {
80 return version + " " + file + ".";
81 }
82 }
83
84 /*
85 * $Log: Lib.java,v $
86 * Revision 1.2 2004/04/03 12:03:53 ekkelenkamp
87 * no message
88 *
89 * Revision 1.1 2004/03/01 18:55:00 ekkelenkamp
90 * initial version
91 *
92 * Revision 1.5 2003/05/04 11:58:51 hillebrand
93 * changes in lib.xml file are tracked down and processed.
94 * If a lib is removed for the lib.xml it is also removed from de lib directory.
95 * If the version of a lib is changed in the lib.xml file, the lib is removed and the correct version is checked out.
96 * javadoc added
97 *
98 * Revision 1.4 2003/04/22 19:38:42 hillebrand
99 * LibFile and LibDir added as parameters to make execution from different dir (as happens when running ant in netbeans) possible.
100 *
101 * Revision 1.3 2003/04/19 14:47:26 hillebrand
102 * added dtd validation
103 *
104 * Revision 1.2 2003/04/18 10:55:23 hillebrand
105 * new anttasks added for checking out libs and including them in war and ear files
106 *
107 * Revision 1.1 2002/07/08 14:35:21 keesjan
108 * Separate submodule for custom Ant tasks
109 *
110 * Revision 1.2 2002/06/28 15:17:36 keesjan
111 * Moved to tools/statementexecutor
112 *
113 */