0

I've been having trouble with Maven. Searched around but couldn't find anyone with similar problem or explanation. I am packaging a webapp with maven's generate archetype using openjdk7 for jre and jdk. Using Lubuntu Os. I am not using Eclipse or Netbeans since my computer is too slow to support it (runs too slow, I can't take it). Plus I'll have to create the war for the live webapp soon (outside of eclipse).

What happens:

I run mvn package and it create's the .war file.

There's only warnings about UTF-8 encoding. I fixed all other warnings which were about plugin version in the pom.

When I open the war, my views are gone and my spring-context file is gone.

Any ideas?

IgorAgatti
  • 73
  • 4

1 Answers1

1

You need to place the files under src/main/resources to be packaged with the war. See the maven directory structure shown here: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

With a typical web-app with xml file, the xml file and views go under src/main/resources/webapp/WEB-INF folder. See this discussion: What is WEB-INF used for in a Java EE web application?

Community
  • 1
  • 1
Jigish
  • 1,764
  • 1
  • 15
  • 20
  • I realized with your comment that previous modifications on the code, using Eclipse, modified the structure. Putting the views and XML under a different folder – IgorAgatti Dec 03 '14 at 07:31