The largest Interview Solution Library on the web


« Previous | 1 | 2 | 3 | Next »

First Application


To create a simple JSF application, we'll use maven-archetype-webapp plugin. In example below, We'll create a maven based web application project in C:\JSF folder.

Create Project

Let's open command console, go the C:\ > JSF directory and execute the following mvn command.

C:\JSF>mvn archetype:create
-DgroupId=com.javatechnologycenter.test
-DartifactId=helloworld
-DarchetypeArtifactId=maven-archetype-webapp

Maven will start processing and will create the complete java web application project structure.

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] -------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO] -------------------------------------------------------------
[INFO] [archetype:create {execution: default-cli}]
[INFO] [archetype:create {execution: default-cli}]
[INFO] artifact org.apache.maven.archetypes:maven-archetype-webapp:
checking for updates from central
[INFO] -------------------------------------------------------------
[INFO] Using following parameters for creating project
from Old (1.x) Archetype: maven-archetype-webapp:RELEASE
[INFO] -------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.javatechnologycenter.test
[INFO] Parameter: packageName, Value: com.javatechnologycenter.test
[INFO] Parameter: package, Value: com.javatechnologycenter.test
[INFO] Parameter: artifactId, Value: helloworld
[INFO] Parameter: basedir, Value: C:\JSF
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Ar