没有合适的资源?快使用搜索试试~ 我知道了~
首页Java-Maven-Eclipse-JSF-Tutorial.pdf
Maven 2 is a powerful tool that promotes convention over configuration and you need to integrate it into one of the popular integrated development environments (IDEs) called eclipse to make your work easier, thus increasing your productivity and project quality. This tutorial provides an example of how to make Maven and Eclipse collaborate. Also covers the popular JSF Web framework.
资源详情
资源评论
资源推荐

1
The author has made every effort in the preparation of this book to ensure the accuracy of the information.
However, information in this book is sold without warranty either expressed or implied. The author will not be
held liable for any damages caused or alleged to be caused either directly or indirectly by this book.
Java, Eclipse, Maven & JSF tutorial
Maven 2 is a powerful tool that promotes convention over configuration and you need to
integrate it into one of the popular integrated development environments (IDEs) called
eclipse to make your work easier, thus increasing your productivity and project quality. This
tutorial provides an example of how to make Maven and Eclipse collaborate. Also covers the
popular JSF Web framework.
by
K. Arulkumaran
& A. Sivayini
Website: http://www.lulu.com/java-success
Feedback email: java-interview@hotmail.com

2
Table Of Contents
Notations .....................................................................................................................3
Tutorial 1 – Java, Maven and Eclipse ..................................................................4
Tutorial 2 – Java Web, Maven and Eclipse....................................................... 16
Tutorial 3 – JSF, Maven and Eclipse..................................................................28
Appendix ...................................................................................................................58

3
Notations
Command prompt:
Eclipse:
File Explorer or Windows Explorer:
Internet Explorer:

4
Tutorial 1 – Java, Maven and Eclipse
This tutorial will guide you through building a simple Java application from
scratch using popular tools like eclipse and maven. This tutorial will be handy
for those who are new to maven/eclipse/Java.
Install the following programs. In this tutorial I have installed them under c:/java.
Java 1.5 (JDK1.5 & JRE1.5)
site: http://java.sun.com/javase/downloads/index_jdk5.jsp
. . Also set the environment
properties JAVA_HOME (e.g. C:\java\jdk1.5.0) and add to the path (e.g.
%JAVA_HOME%\bin). If installed correctly you should be able to test it by opening a
command prompt and typing
C:\>java –version
Results in:
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
Maven 2.0.7. Site: http://maven.apache.org/download.html. Set the environment
variables M2_HOME (e.g. C:\java\maven-2.0.7) and add to the path (e.g.
%M2_HOME%\bin). If installed correctly you should be able to test it by opening a
command prompt and typing:
C:\>mvn --version
Results in:
Maven version: 2.0.7
Java version: 1.5.0_11
OS name: "windows xp" version: "5.1" arch: "x86"
Open the “settings.xml” file under C:\java\maven-2.0.7\conf folder and set your
local repository as follows:
<localRepository>C:/java/.m2/repository</localRepository>
Also if your internet access is through a proxy server then configure your proxy server
in “settings.xml” for example:
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>webproxy</host>
<port>8080</port>
<nonProxyHosts>local.net,some.host.com</nonProxyHosts>
</proxy>
Eclipse 3.3.0 (Europa). Site: http://www.eclipse.org/downloads/
So far we have installed the programs under c:/java. Now we need to create a folder for
our tutorials as c:/tutorials. Also create an eclipse workspace “C:\java\eclipse-tutorial-

5
workspace” where metadata get stored. It is the best practice to separate IDE specific (i.e.
C:\java\eclipse-tutorial-workspace) files from the projects (i.e. c:/tutorials) specific files.
C:/java folder
C:/tutorials folder
剩余59页未读,继续阅读


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论3