- PrimeFaces Theme Development
- Andy Bailey Sudheer Jonna
- 455字
- 2021-07-09 21:12:22
Adding the PrimeFaces library and related dependencies to our project
We will use Maven to add all the required resources that we don't create ourselves, and this section will help us to understand how we add libraries to our project. PrimeFaces only requires that the PrimeFaces JAR file be added to our project. So, this is what we do:
- By clicking on the
+
symbol to the left of the project in the Project view, we open the project tree, as follows:The following is a brief explanation of the folders, as listed in the previous screenshot:
- Web Pages: This is where we will add views or pages to our application.
- Source Packages: Here, Java source code is managed.
- Other Sources: This allows us to add other types of files which may be needed for the project. We will use this facility. So, its purpose should become clear, eventually.
- Dependencies: Here we tell Maven the JAR files that we want to add to our project.
- Runtime Dependencies and Java Dependencies: These are not important for this project. Feel free to browse them at your leisure.
- Project Files: This is where NetBeans manages both the Maven project's
pom.xml
file and the NetBeans project configuration file. While we don't need to look at these now, we will visit thepom.xml
file in the later chapters. So, if you want to preview these files, please feel free to do so.
- Meanwhile, we are going to add PrimeFaces 5.2 to our project. Right-click on the Dependencies folder and select Add Dependency... from the context menu. This opens the Add Dependency dialog box, as shown in the following screenshot:
Usually, you only have the Search tab available in a newly created project.
- Type
org.primefaces
into the Query field of the Search tab, and then go and make a drink or something that takes a little time.Tip
Not only have we earned a break, but we also need time to allow Maven to download and install the Maven Central Repository index in our local Maven repository. This takes time because there are a very large number of resources available there. If you already use Maven for your projects, you obviously won't need a lot of time. The break might be welcome, though.
Once the Maven Central Repository index is available, you will see something like this:
- Select the 5.2 version and click on Add. Maven then adds the dependency to our project.
- JavaScript高效圖形編程
- 摩登創(chuàng)客:與智能手機(jī)和平板電腦共舞
- Podman實(shí)戰(zhàn)
- 名師講壇:Java微服務(wù)架構(gòu)實(shí)戰(zhàn)(SpringBoot+SpringCloud+Docker+RabbitMQ)
- 網(wǎng)店設(shè)計(jì)看這本就夠了
- Getting Started with Gulp
- 人工智能算法(卷1):基礎(chǔ)算法
- Mastering HTML5 Forms
- Scratch從入門到精通
- Kotlin進(jìn)階實(shí)戰(zhàn)
- Web編程基礎(chǔ):HTML5、CSS3、JavaScript(第2版)
- C/C++代碼調(diào)試的藝術(shù)
- Mastering ArcGIS Server Development with JavaScript
- Python程序設(shè)計(jì)現(xiàn)代方法
- Python3從入門到實(shí)戰(zhàn)