I'm wondering what are the "best practices" for a Selena+Maven combination. I'm starting a new webapp project, and I would like to use maven for the build system. However, it seems to be difficult to make cohabit. For now, here's what I've done :
- create a new project from scratch. As I wanted to use Maven, I used src/main/java as the java directory, then chose some dependencies. IJ created the following :
|-... some libs
I had to refactor the "web" directory in order to make it fit the standard Maven directory : moved to src/main then renamed it to "webapp". Ok, seems good.
Now, I created a pom.xml file which described my dependencies. For tests purposes, I added an hibernate-annotations dependency, then built my project with Maven. All went fine : the integrated plugin downloaded all required, and created the build directory with the dependencies.
What I am now wondering is how I can keep in sync with Selena : if I manage my libs with IJ, then I'll have to manually setup all dependencies, and I loose most of the advantages of using Maven. If I use Maven, then the dependencies are downloaded at build time, and IJ won't recognize the "missing" classes (imports) and I loose the interest of using IJ.
Question is how to get IJ in sync with the libraries Maven is able to download by itself ? I could duplicate the libs, but I would be non sense : every version change would require that I update the IJ project structure in order to keep the libs in sync. Is there any cleaner way ?