Search |
||
Teaching Maven2 to use multiple source directoriesPosted by inder on May 22, 2008 at 4:37 PM PDT
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 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. »
Related Topics >>
Java Tools Comments
Comments are listed in date ascending order (oldest first)
Submitted by brianf on Thu, 2008-05-22 20:40.
On second thought, the compiler config above may cause problems with other plugins such as IDE integrations. The build-helper-maven-plugin really is the correct way. I wrote more about it here.
Submitted by brianf on Thu, 2008-05-22 19:40.
This is one way to accomplish the goal, however the build-helper-maven-plugin is the generally accepted way to add additional source folders to a build. It also lets you do some things like attach random files to be installed/deployed, etc.
--Brian Apache Maven PMC http://blogs.sonatype.com/brian |
||
|