I see, why not executing maven dependency plugin before tomee-maven-plugin and referencing the unpacked folder for the conf?
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2015-05-05 16:01 GMT+02:00 Adam Cornett <[email protected]>: > Since the conf is loaded into the zip file when we build it we are not > re-supplying the conf each time we use the plugin. Since all of our apps > use a common conf we wanted it in one place instead of having copies > attached to each project. > > On Tue, May 5, 2015 at 9:57 AM, Romain Manni-Bucau <[email protected]> > wrote: > > > Hi > > > > > > 2015-05-05 15:47 GMT+02:00 Adam Cornett <[email protected]>: > > > > > We use TomEE in several applications, and to speed up builds and > > > standardize our deployments, we use the Maven plugin to create a TomEE > > zip > > > already configured with our libraries and configuration files and > publish > > > it to our internal maven repo. > > > > > > We then use the TomEE maven plugin in each project to pull in this > custom > > > build and deploy our application into it. However the current maven > > plugin > > > will overwrite the conf/tomee.xml file that we have packaged. This > > happens > > > because the plugin is trying to be helpful by adding the '<Deployments > > > dir="apps" />' tag, which is not enabled in the file that ships with > the > > > original zip, however it does this by writing out a whole new file with > > > this tag. > > > > > > > > it does it during tomee unzip phase which is before the synchronization > > with conf folder so your file should override the forced one. > > > > What do I miss? > > > > > > > There are many ways to go about solving this issue, the one I came up > > with > > > is in the attached patch, developed against 2.0. This does a more > > surgical > > > update of an existing tomee.xml file without touching over any existing > > > changes. If this needs further changes or refinement in order to be > > > accepted into the project I'd be glad to continue to work on it based > on > > > feedback. > > > > > > > > > - Adam Cornett > > > > > > > > > > > > > > > > > > > > > -- > Adam Cornett > [email protected] > (678) 296-1150 >
