|
|
||
Inderjeet Singh's Blog
«NetBeans module for Java SDK for Google Checkout APIs released |
Main
| Installing a Ubuntu Hardy Heron Java Development Environment on a USB flash drive »
Teaching Maven2 to use multiple source directoriesPosted by inder on May 22, 2008 at 04:37 PM | Comments (2)For project Gson, which is a library to convert Java objects to JSON and vice-versa, we use Maven2. We are also using Javacc to generate a JSON parser, but we had to modify the generated source-code to hide the generated classes. This meant that we had two source directories, one under src/main/java and another under src/generated/java. I tried hard to find out how to convince maven to use both the directories for compilation, but most websites really advise you to use multiple modules. In maven1.x, there seemed to be some support for it through maven:addPath but nothing in Maven2.
Finally, I did find a solution for Maven2 in this and this thread, and thought I would share it here. Essentially, you define an include section in your build section of
See pom.xml of Gson for more details. Have you run into a similar issue? Did you also find the answer hard to search? How did you solve this problem? Share your thoughts as comments to this blog. Thanks for reading. Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|