3

There is standard Java WebApp project. I need to use Maven to build/compile/deploy project to online server. There is an option to create new maven module module or to import project using pom.xml. Following probaby won't work because:

  1. Project doesn't have maven project and pom.xml

  2. Creating new maven module probably would mess up my existing project structure.

How to add Maven support to existing Java WebApplication in IntelliJ 12?


UPDATE:

I selected Add framework Support... > Maven. Generated pom.xml at project's root. Added maven-war-plugin. The following structure I have got. Is it any good / correct?

enter image description here

J.Olufsen
  • 13,415
  • 44
  • 120
  • 185

1 Answers1

3

You should use maven standard project structure for maven applications. However, if you cannot change it, then you have to tell Maven where to look for specific files. Consider:

Using maven using non standard directory layout

Standard Maven structure

Also here are some interesting things to remember: http://wiki.jetbrains.net/intellij/Maven_FAQ

Community
  • 1
  • 1
mareckmareck
  • 1,560
  • 13
  • 18