MF file:
Finally, click on Finish, and your brand new custom library will be created at the
location that you have specified.
Chapter 8
[ 241 ]
In NetBeans, creating a custom library requires somewhat different steps. First of all,
open the Files view instead of the usual Projects (by clicking on the Files tab on the
left hand pane). Here, right-click the MyLib project and create MANIFEST.MF file
with contents shown previously. Make sure this file is saved directly in the
MyLib folder:
Now in the Files view, open the nbproject folder and locate in it the
project.properties file. Open this file and add the following line at the end:
manifest.file=MANIFEST.MF
Save the file and go back to the Projects view. Right-click on the MyLib project and
select Build Project. In a few seconds, the JAR file will be created. You can locate it in
the Files view in the dist subfolder:
Creating Custom Components
[ 242 ]
Whichever way you have created the custom library, it can be easily used now in
any Tapestry 5 project. For example, you might want to test it in the t5first project
we created back in Chapter 2. Just put the library JAR file into the WEB-INF/lib
subfolder in the host project's structure and then define components on any page
where you need them using the library's prefix (defined in its module).
Pages:
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296