maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff MAURY <jeffma...@gmail.com>
Subject Re: Post processing generated sources
Date Mon, 21 Mar 2016 11:50:56 GMT
You can generate in any folder (under target) but you must add this folder
to the list of source directories so that the maven compiler will process
them
This can be done with the maven API if you have your own Maven plugin or
with the build-helper-plugin

Jeff
Le 21 mars 2016 12:45, "Jens Teglhus Møller" <djarnis@gmail.com> a écrit :

> Thanks for the short and precise answer.
>
> Any guidelines as how to organize the code that performs the processing.
> Should I create a new directory in src separate from main and test i.e.
> preprocess and compile it to target/preprocess-classes?
>
> Best regards Jens
>
> And where should i put my source that does the post processing should i
> create my own
>
> On Mon, Mar 21, 2016 at 12:29 PM, Jeff MAURY <jeffmaury@gmail.com> wrote:
>
> > Generate-sources
> >
> > Jeff
> > Le 21 mars 2016 12:25, "Jens Teglhus Møller" <djarnis@gmail.com> a
> écrit :
> >
> > > Hi
> > >
> > > I'm generating java sources (using jsonschema2pojo and
> jaxb2-maven-plugin
> > > plugin) and I would like to do some post processing on the generated
> > source
> > > files before compiling them (like have some of the generated files
> > > implement certain interfaces, perhaps using roaster).
> > >
> > > I'm a bit unsure which phase I should do that in and if I do it with
> > > roaster I will have probably have a few java files that I would need to
> > > compile and run on the source files (I would prefer not to på that in a
> > > separate project). It could probably be done quite easily with
> > > maven-antrun-plugin but I'm but I'm interested to know if there is a
> > smart
> > > way to do it.
> > >
> > > Best regards Jens
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message