Typically, a plugin that generates sources/resources during build should
add that output folder to the project model. It's not something that you
should do. However, if you do this the homebrewed way (e.g. antrun plugin)
it's not added automatically. Your friend in that case is the build-helper
plugin to add it to the project model during build. I'd argue, although
somewhat academically, that doing it via the sources/resources section is
not the right way (as the folder doesn't exist unless the plugin is
executed).

/Anders

On Fri, Jan 20, 2017 at 1:33 PM, Jörg Schaible <
[email protected]> wrote:

> Give target/generated-resources a try.
>
> Gary Aitken wrote:
>
> > I'm having trouble getting resources generated post-compile into the
> final
> > jar package (packaging type jar).
> >
> > During the process-classes phase, I run a task which reads some xml files
> > and produces other xml files.  I can't figure out how to get the output
> > xml files into the jar.
> >
> > Issues:
> >
> > 1. The output is written into target/xmldata,
> >    but the xmldata subtree is not written into the jar.
> >    I also tried generating into target/resources/xmldata
> >
> > 2. I tried the following in the <build> section of pom.xml:
> >     <resources>
> >       <resource>
> >         <directory>${generated-xml.dir}</directory>
> >         <excludes>
> >           <exclude>${generated-src-xml.dir}</exclude>
> >         </excludes>
> >       </resource>
> >     </resources>
> >
> > 3. I also tried adding an
> >         <includes>
> >           <include>**_consolidated.xml</include>
> >         </includes>
> >    to the above <resource> section; no luck.
> >
> > Hints?
> > Thanks,
> > Gary
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to