|
15 | 15 | <target name="bootstrap"> |
16 | 16 | <mkdir dir="${user.home}/.ant/lib"/> |
17 | 17 | <get dest="${user.home}/.ant/lib/ant-contrib.jar" src="https://search.maven.org/remotecontent?filepath=ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar"/> |
| 18 | + |
| 19 | + <get dest="${user.home}/.ant/lib/rhino.jar" src="https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.14-RC1/rhino-1.7.14-RC1.jar"/> |
| 20 | + <get dest="${user.home}/.ant/lib/bsf.jar" src="http://search.maven.org/remotecontent?filepath=bsf/bsf/2.4.0/bsf-2.4.0.jar"/> |
| 21 | + <get dest="${user.home}/.ant/lib/commons-logging-api.jar" src="http://search.maven.org/remotecontent?filepath=commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/> |
18 | 22 | </target> |
19 | 23 |
|
20 | 24 |
|
21 | | - |
22 | 25 | <!-- PLATFORM INFORMATION --> |
23 | 26 |
|
24 | 27 | <condition property="isWindows" else="false"> |
|
67 | 70 | <attribute name="value" /> |
68 | 71 | <![CDATA[ |
69 | 72 | project.setProperty( attributes.get( "name" ), |
70 | | - attributes.get( "value" ).replace( ".", "" ) ); |
| 73 | + attributes.get( "value" ).replaceAll( "\\.", "" ) ); |
71 | 74 | ]]> |
72 | 75 | </scriptdef> |
73 | 76 |
|
74 | | - <scriptdef language="javascript" name="cleanpath"> |
75 | | - <attribute name="name" /> |
76 | | - <attribute name="value" /> |
77 | | - <![CDATA[ |
78 | | - project.setProperty( attributes.get( "name" ), |
79 | | - attributes.get( "value" ).replace( /\/\/|\/\.\//g, "/" ) ); |
80 | | - ]]> |
81 | | - </scriptdef> |
82 | | - |
83 | 77 | <scriptdef language="javascript" name="wrapxmltag"> |
84 | 78 | <attribute name="name" /> |
85 | 79 | <attribute name="input" /> |
|
96 | 90 | ]]> |
97 | 91 | </scriptdef> |
98 | 92 |
|
| 93 | + |
99 | 94 | <scriptdef language="javascript" name="outputname"> |
100 | 95 | <attribute name="name" /> |
101 | 96 | <attribute name="prefix" /> |
|
104 | 99 | <![CDATA[ |
105 | 100 | var outputName = ""; |
106 | 101 | |
107 | | - var prefix = attributes.get( "prefix" ); |
| 102 | + var prefix = String(attributes.get( "prefix" )); |
108 | 103 | if (prefix.length > 0) |
109 | 104 | outputName = prefix + "."; |
110 | 105 | |
111 | | - var grp = attributes.get( "grp" ).toLowerCase(); |
112 | | - var projectname = attributes.get( "projectname" ); |
| 106 | + var grp = String(attributes.get( "grp" ).toLowerCase()); |
| 107 | + var projectname = String(attributes.get( "projectname" )); |
113 | 108 | if (grp.length > 0) |
114 | 109 | { |
115 | 110 | outputName += grp + "." + projectname; |
|
130 | 125 | <![CDATA[ |
131 | 126 | var packageName = ""; |
132 | 127 |
|
133 | | - var prefix = attributes.get( "prefix" ); |
| 128 | + var prefix = String(attributes.get( "prefix" )); |
134 | 129 | if (prefix.length > 0) |
135 | 130 | packageName = prefix + "."; |
136 | 131 |
|
137 | | - var grp = attributes.get( "grp" ).toLowerCase(); |
138 | | - var projectname = attributes.get( "projectname" ).toLowerCase(); |
| 132 | + var grp = String(attributes.get( "grp" ).toLowerCase()); |
| 133 | + var projectname = String(attributes.get( "projectname" ).toLowerCase()); |
139 | 134 | if (grp.length > 0) |
140 | 135 | { |
141 | 136 | packageName += grp + "." + projectname; |
|
153 | 148 | <attribute name="value" /> |
154 | 149 | <![CDATA[ |
155 | 150 | project.setProperty( attributes.get( "name" ), |
156 | | - attributes.get( "value" ).replace( /\./g, "/" ) ); |
| 151 | + attributes.get( "value" ).replaceAll( "\\.", "/" ) ); |
157 | 152 | ]]> |
158 | 153 | </scriptdef> |
159 | 154 |
|
|
162 | 157 | <attribute name="value" /> |
163 | 158 | <![CDATA[ |
164 | 159 | project.setProperty( attributes.get( "name" ), |
165 | | - attributes.get( "value" ).replace( /\./g, "-" ) ); |
| 160 | + attributes.get( "value" ).replaceAll( "\\.", "-" ) ); |
166 | 161 | ]]> |
167 | 162 | </scriptdef> |
168 | 163 |
|
|
0 commit comments