0

I am trying to start a new project in Eclipse with Maven. It is a project that will have both EJB/JPA and JSF technology. I used the webapp archetype create the project. Is correct to use that? And do I need to add some libraries on the buildpath? (Deploying to Glassfish)

2 Answers 2

1

The maven-archetype-webapp is perfectly fine to use to get started. It creates the initial folder structure nicely. Another good alternative is to use appfuse-basic-jsf.

As long as your pom.xml has all the dependencies set up correctly, your eclipse build path should be fine. I am assuming you already have m2eclipse plugin installed. If you see that you are seeing errors in eclipse view then right click on the project select Maven->Update Project Configuration.

Sign up to request clarification or add additional context in comments.

5 Comments

Hi, thank you for a quick reply! I am new to Java EE so what I am trying to do is just to get a project in Eclipse to work so I can run examples from my EJB and JSF book. Having a hard time understanding which projecttype I should use and what I need though. I really need some help on this.
@BPDeveloper - well did my answer help? I am not sure if there is anything else you were looking for? You are on the right track with maven-archetype-webapp. Did you get m2eclipse plugin installed on your eclipse?
@BPDeveloper - Also if you are new to Java then I will recommend to not use maven yet - just stick to IDE build process. It will be one less thing to learn for you. Just a thought!
No, I have been doing Java SE for some years now. Desktop and Android as well as other languages. I have also bought the Maven Definitive Guide book and read some in it so I at least know what Maven is. Yes I have the plugins and all that in Eclipse too. I am trying to make the simplest (basic) project possible so I can understand what all the things are.
@BPDeveloper - okay. Let me know if u have any specific questions. Happy Mavenizing!
0

Just type "archetype:generate" and select JSF + EJB/JPA if available.

This one seems fine: 360: remote -> org.jboss.weld.archetypes:weld-jsf-jee (Weld archetype for creating a Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1 and JPA 2.0 (persistence unit included))

The Appfuse are quite more complete and may embed stuff you will never use and that you will have to remove.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.