Learn Java for Web Development

(Tina Meador) #1

170 CHAPTER 4: Building a Web Application Using Struts 2


The dependencies, explicitly configured and transitive, described in the Maven configuration file
(pom.xml) will be accessed from a local repository or downloaded to the local repository during the
build process. This feature allows developers to create new projects without creating the common
directory structure, creating the configuration files, and coding default classes and tests from
scratch. The benefit of using Maven for runtime dependencies is that you don’t need to remember
and search for required dependencies manually. You will use Maven 4 to import Struts 2 runtime
dependencies. Maven 4 is integrated with Eclipse-kepler, as mentioned in Chapter 1. So, you do not
have to install the Maven plug-in for Eclipse. To create the Maven project, click New ➤ Other, as
illustrated in Figure 4-3.


Figure 4-3. Selecting a Maven project


Select Maven Project in the wizard, as illustrated in Figure 4-4.

Free download pdf