0

I'm newbie to Maven and I'm used it to create a dynamic web project in Eclipse with traditionnal jars.

I downloaded maven and installed it on my Windows8 system as indicated on the documentation and as listed on Kepler doc too, you don't have to install any Maven plugin on Eclipse because it's already installed.

So when I test it by adding some dependecies like Hibernate it's ok, it worked until I added the Struts2 & Sitemesh framework, when I was forced to add the jars to the lib folder to make it run.

Is tehre any special configuration to do for that?

Roman C
  • 49,761
  • 33
  • 66
  • 176
Sima
  • 61
  • 1
  • 6

2 Answers2

0

First you need to add Struts2 and test it if it works, then try to add Sitemesh and/or Hibernate plugins. See how to Create Struts 2 Web Application Using Maven To Manage Artifacts and To Build The Application.

The pom.xml for core struts2 application requires only

<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-core</artifactId>
    <version>X.X.X.X</version>
</dependency>

and it will download all other dependencies. Integrating with other frameworks use plugins and don't mess up dependencies that are duplicated.

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • it's already done but it's not working [MKYONG](http://www.mkyong.com/struts2/struts-2-hello-world-example/) tutorial is not working – Sima Jul 31 '14 at 16:31
0

I think you have a problem in deployment assembly management under eclipse, try:

  1. Open the project's properties (e.g., right-click on the project's name in the project explorer and select "Properties").
  2. Select "Deployment Assembly".
  3. Click the "Add..." button on the right margin.
  4. Click the "Add..." button on the right margin. 5.Select "Java Build Path Entries" from the menu of Directive Type and click "Next".
  5. Select "Maven Dependencies" from the Java Build Path Entries menu and click "Finish".
Bourkadi
  • 738
  • 1
  • 7
  • 17