Kiran, Please keep replies on the list so that in future others can use Google to find the answers... also, did you not read the PS in my reply?
On 24 February 2010 04:04, <kiran.choud...@gmail.com> wrote: > Hi Stephen, > Iam new to maven and iam struggling to generate the source code at runtime > using maven. Previously we were using ant targets in generating the > Source code, but we are migrating to maven .Please find the build file > content which we were using in generating the source code. Could you please > help out in writng the maven plugin in pom file > To achieve the same. > > build.xml > > <project name="abc" default="usage" basedir="."> > [SNIP] > </project> > > Regards > kiran > > Stephen Connolly-2 wrote: > > > > bind an execution of maven-antrun-plugin to the generate-sources phase > > putting your generated sources in > > ${project.build.directory}/generated-sources/my-company/ > > > > then use buildhelper-maven-plugin (@mojo) to add additional source > > directory > > paths (you'll want to add > > ${project.build.directory}/generated-sources/my-company/) > > > > FYI > > > > The "Maven Way" is to put generated sources in > > ${project.build.directory}/generated-sources/____ where ____ is the name > > of > > the source code generator... some people cheat and replace the > > ${project.build.directory} with the hardcoded equivalent "target" but you > > will have a better more portable build if you use the property > > > > -Stephen > > > > P.S. Google is your friend if you have issues trying to implement the > > above > See my comment above ^^^ -Stephen > > > > On 23 February 2010 15:08, Kiran Kumar M <kirankum...@cybage.com> wrote: > > > >> Hi, > >> > >> I have requirement where to generate the source code by reading some > >> velocity files *.vm and *.yml . > >> > >> This has been achieved through ant target, since we are moving every > >> thing to maven, the sam thing need to be achieved through maven plugins > >> > >> Could you please help me on this > >> > >> > >> > >> Regards > >> > >> Kiran Kumar M > >> > >> > >> > >> > >> > >> > >> "Legal Disclaimer: This electronic message and all contents contain > >> information from Cybage Software Private Limited which may be > privileged, > >> confidential, or otherwise protected from disclosure. The information is > >> intended to be for the addressee(s) only. If you are not an addressee, > >> any > >> disclosure, copy, distribution, or use of the contents of this message > is > >> strictly prohibited. If you have received this electronic message in > >> error > >> please notify the sender by reply e-mail to and destroy the original > >> message > >> and all copies. Cybage has taken every reasonable precaution to minimize > >> the > >> risk of malicious content in the mail, but is not liable for any damage > >> you > >> may sustain as a result of any malicious content in this e-mail. You > >> should > >> carry out your own malicious content checks before opening the e-mail or > >> attachment." > >> www.cybage.com > >> > >> > >> > > > > > Quoted from: > > http://old.nabble.com/Generate-source-code-through-maven-before-compling-tp27704869p27706150.html > >