Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven install folder structure problem j2ee (spring, struts ..)

i'm using maven 2.1-SNAPSHOT as eclipse plugin. My project structure is like this:

src/main/java
   -model
   -service
   -action
src/test/java
   empty atm
src/main/resources
   empty atm
src/test/resources
   empty atm
src/main/webapp
   -js
    -dojo
   -META-INF
   -WEB-INF
     web.xml
     appcontext.xml
     struts.xml
   index.jsp

I'm having trouble understanding the build process and where to put which file. I use as Application Server Jetty but i want to deploy my project on tomcat as well (so i have set up in my pom packaging war).

When i run my project with the maven:install command my target folder looks like this: myproject.war
war
   not relevant
test-classes
   empty atm
myproject
   js
   META-INF
   WEB-INF
   index.jsp
classes
   model
   service
   action

My problem is that i need in the classes folder my persistence.xml which i have in META-INF. And struts.xml too i guess. I'm not sure about dojo either if it is right there. And honestly i don't know if this structure is right at all. I also dont know how to configure that the output changes.

I hope somebody can help me i really want to understand this process how it should be right, maybe there are even nice ressources to lookup to get better at these things. Thanks in advance kukudas

like image 238
kukudas Avatar asked Nov 06 '22 22:11

kukudas


1 Answers

I believe files that you want deployed to the classpath go in the resources/ folder.

Take a look at the Maven in 5 Minutes guide, along with the Getting Started guide.

like image 138
matt b Avatar answered Nov 11 '22 06:11

matt b