tags:

views:

927

answers:

1

I'm starting on a project that I expect will include a substantial amount of non-Java code (mostly shell and SQL scripts).

I would still like to manage this project with Maven. What are the best practices wrt non-Java source code and Maven? Where should the source go? What happens to them during the different lifecycle phases? Any pointers or links to more information would be greatly appreciated.

+2  A: 

You must not put the non-Java code into resources, if you don't want to include these files into your JAR files like heckj has suggested. Everything that is located in resources is automatically copied into the JAR file and I guess you don't want shell scripts and SQL scripts be included in a JAR file, right?

So the Maven way would be to create additional folders under src/main. E.g. create a sql folder for your SQL scripts, an sh folder for your shell scripts and so on. This is the location where other Maven plugins also expect sources, e.g. for C++, Groovy and so on.

Yaba