equal
deleted
inserted
replaced
26 <!-- |
26 <!-- |
27 This task will copy the content of the its nested fileset in parallel. The todir attribute defines |
27 This task will copy the content of the its nested fileset in parallel. The todir attribute defines |
28 the output directory. 'threads' defines how many copy you would like in parallel, and verbose |
28 the output directory. 'threads' defines how many copy you would like in parallel, and verbose |
29 defines if you want the copying to be logged. |
29 defines if you want the copying to be logged. |
30 --> |
30 --> |
31 <scriptdef language="beanshell" name="parallelCopy" uri="http://www.nokia.com/helium"> |
31 <scriptdef name="parallelCopy" language="beanshell" uri="http://www.nokia.com/helium"> |
32 <attribute name="todir" /> |
32 <attribute name="todir" /> |
33 <attribute name="threads" /> |
33 <attribute name="threads" /> |
34 <attribute name="verbose" /> |
34 <attribute name="verbose" /> |
35 <attribute name="overwrite" /> |
35 <attribute name="overwrite" /> |
36 <element name="resourceset" type="http://www.nokia.com/helium:resourceSet"/> |
36 <element name="resourceset" type="http://www.nokia.com/helium:resourceSet"/> |
54 if (threads < 0) { |
54 if (threads < 0) { |
55 throw new BuildException("Invalid thread number: " + threads); |
55 throw new BuildException("Invalid thread number: " + threads); |
56 } |
56 } |
57 } |
57 } |
58 if (attributes.get("verbose") != null) { |
58 if (attributes.get("verbose") != null) { |
59 verbose = attributes.get("verbose"); |
59 verbose = attributes.get("verbose"); |
60 } |
60 } |
61 if (attributes.get("overwrite") != null) { |
61 if (attributes.get("overwrite") != null) { |
62 overwrite = attributes.get("overwrite"); |
62 overwrite = attributes.get("overwrite"); |
63 } |
63 } |
|
64 |
64 // Creating the output dir |
65 // Creating the output dir |
65 Mkdir mkdir = new Mkdir(); |
66 Mkdir mkdir = new Mkdir(); |
66 mkdir.setProject(project); |
67 mkdir.setProject(project); |
67 mkdir.setTaskName(self.getTaskName()); |
68 mkdir.setTaskName(self.getTaskName()); |
68 mkdir.setDir(new File(attributes.get("todir"))); |
69 mkdir.setDir(new File(attributes.get("todir"))); |
84 copy.setTodir(new File(attributes.get("todir"))); |
85 copy.setTodir(new File(attributes.get("todir"))); |
85 copy.add(resourceCollections.get(i)); |
86 copy.add(resourceCollections.get(i)); |
86 copy.setVerbose(new Boolean(verbose).booleanValue()); |
87 copy.setVerbose(new Boolean(verbose).booleanValue()); |
87 copy.setOverwrite(new Boolean(overwrite).booleanValue()); |
88 copy.setOverwrite(new Boolean(overwrite).booleanValue()); |
88 pt.addTask(copy); |
89 pt.addTask(copy); |
89 } |
90 } |
90 } |
91 } |
91 } |
92 } |
92 self.log("Starting parallel copying..."); |
93 self.log("Starting parallel copying..."); |
93 pt.execute(); |
94 pt.execute(); |
94 self.log("Copying completed."); |
95 self.log("Copying completed."); |
95 ]]> |
96 ]]> |
96 </scriptdef> |
97 </scriptdef> |
97 |
98 |
98 <!-- |
99 <!-- |
99 This task will unzip each group (represented as path element) in parallel. But the content of each |
100 This task will unzip each group (represented as path element) in parallel. But the content of each |
100 group will be unzipped sequentially. |
101 group will be unzipped sequentially. |
183 } |
184 } |
184 } |
185 } |
185 self.log("Starting parallel unzipping..."); |
186 self.log("Starting parallel unzipping..."); |
186 pt.execute(); |
187 pt.execute(); |
187 self.log("Unzipping completed."); |
188 self.log("Unzipping completed."); |
188 ]]> |
189 ]]> |
189 </scriptdef> |
190 </scriptdef> |
190 |
191 |
191 </antlib> |
192 </antlib> |
|
193 |