The best option to handle this is to use the add-resource goal of the
build-helper-maven-plugin. Just bind that to the build lifecycle as
outlined in the usage example [1]

[1] http://www.mojohaus.org/build-helper-maven-plugin/usage.html

/Anders

On Fri, Jan 20, 2017 at 5:49 AM, Gary Aitken <[email protected]> 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