File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Help with getting started with Maven, JSF, and Eclipse/JBoss dev studio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Help with getting started with Maven, JSF, and Eclipse/JBoss dev studio" Watch "Help with getting started with Maven, JSF, and Eclipse/JBoss dev studio" New topic
Author

Help with getting started with Maven, JSF, and Eclipse/JBoss dev studio

Scott Geller
Greenhorn

Joined: Dec 02, 2012
Posts: 1
I've been trying to follow this tutorial (http://www.mkyong.com/jsf2/jsf-2-0-hello-world-example/) to get started with Maven and JSF. I used maven to generate a simple webapp project. When I import my maven project into jboss dev studio and add all of the jsf dependencies, I get the following errors:

JavaServer Faces 2.0 can not be installed : One or more constraints have not been satisfied.
JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer.

I have been looking online for about 6 hours today trying to find a solution and I'm just about dead. I will paste in my pom.xml file to show you everything I have so far. If you can help me with this problem, it would be greatly appreciated.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.scott.common</groupId>
<artifactId>JavaServerFaces</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>JavaServerFaces Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>

<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
<build>
<finalName>JavaServerFaces</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>


Thank you,
Scott
Alan Smith
Ranch Hand

Joined: Oct 19, 2011
Posts: 158

Assuming you are using Eclipse, have you tried to change the project facet to Dynamic Web Project in the projects properties (Right click project --> properties --> project facets --> convert to faceted form...)? Ideally you should set your maven project up in Eclipse using the m2e plugin instead of creating the template from the command line and then importing. It will avoid time wasting errors like the one you posted. After that you can go to the command line and run maven commands manually.

ps. Netbeans has built in support for Maven and great JSF support out of the box if you are interested in that IDE.

Alan
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16137
    
  21

Your problem has nothing to do with JSF and everything to do with Eclipse, which is what's hosting the JBoss dev studio.

I'm moving your question to the IDEs forum.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1085
    
  10

Hi Scott,
Welcome to the Ranch!

It would really help if you post your pm.xml with some indentation.
And, did you use 'Import Maven project ' to import the project? Also, what version of jbdev are you using?


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with getting started with Maven, JSF, and Eclipse/JBoss dev studio