New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow better control of assembly process/export #64
Comments
The current working suggestion is: <build>
...
<assembly>
<descriptor>src/resources/docker/assembly.xml</descriptor>
<directory>/maven</directory>
<export>true</export>
<uid>www-data</uid>
</assembly>
</build> and keeping extra volumes to export outside this configuration section. Depending on the |
given that i'm about 1/2 to 2/3 of the way through this i thought i should get some feedback on where i'm headed... a new, top level
most of the time i'm sure this will never get used directly but i know there are ppl out there that dislike the default maven dir structure (i used to be one of them) and this allows more flexibility. it also allows for what's to follow. if you are happy w/ what the assembly defaults
and you don't want to use one of the predefined
if you want to specify a location outside of
or if you want the to use a predefined ref
the flexibility is there. if you don't want any assembly to occur (see #66), you can do this
and create a container w/o any artifacts from the project at all. you can now define the location of a docker file like so:
if you define a if the path to the file is relative, it will search for now, it will be up to the user to handle adding an 'ADD' line to the dockerfile to pull in the the project artifact. i have some ideas on using the resources plugin to do property substitution, etc but i'm taking the approach that if you're using a in terms of the assembly block, if you're happy using all the defaults (project archive in to be added lives in 'maven' and you are letting the assembly scan for the descriptor) it does not have to be specified. otherwise, you can specify the
like above, if a i thought about using a separate xml block for this but that would just mean more xml and if you're happy w/ what the defaults are, you can really pair down the maven configuration if you're using a other tidbits... now that a thinking about it now, maybe there should be two
i think that's everything :) |
Wow, lots of stuff ;-) On a first glimpse:
Complete agreement for:
These are my points ;) One important thing: I reviewed you pull request, made some changes (essentially minor, however some refactorings nevertheless), so I would like to push this tomorrow in extra branch and I would be awesome if you could rebase on this. |
lol - let's see... the absence of an assembly block means use all the default values so i'm not sure how you can indicate 'no assembly' otherwise w/o some other explicit element b/c i don't think it should be up to us to decide if someone wants to make a non-portable build. if they want to use a full path, that's their business but i'm not going to argue the point either way. as an aside, i think just by the nature of how maven works, everything is relative to the having said that, i still the idea of using if you're still not sold, perhaps as a compromise we could leave using a default directory as an explicit option that you enable instead of having it be implicit. i know specifying the following
might not seem like a lot, but i think the less xml that needs to be defined, the better. i went back and forth between the path to the Dockerfile itself and the dir it lived in, so i'll change it to be the dir. i realize there is a chicken and egg issue if you use an assembly and a Dockerfile, so the idea to allow the container to be built independent of the plugin may not be practice.
the idea behind this is if you are using a Dockerfile and you already are including files, eg:
you can do it's possible this may be a flawed idea - i need to experiment a little w/ the assembly plugin to see if this will actually work but i think it should. i'll incorporate all comments into an initial PR and we can go from there. w.r.t. the other pull requuest, at this point what exactly do you want me to do there? this work should be its own PR so if you're happy w/ things as they stand, i'm not going to argue against any changes you've made so why not just push those changes into master? |
IMO, at least the I heavily argue for not having an (implicite) assembly by default, but I can live with a configurable Docker top-dir. If I understand you right, instead of <configuration>
<image>
...
<build>
<assembly>
<descriptor>src/main/docker/assembly.xml</descriptor>
</assembly>
</build>
</image>
</configuration> you suggest <configuration>
<dockerDir>src/main/docker</dockerDir>
<image>
...
<build>
<assembly>
<descriptor>assembly.xml</descriptor>
</assembly>
</build>
</image>
</configuration> where in this case wrt/ I think that's simple enough that it can be understood even without documentation. Evolving on this idea as a next step could be an But that's the next story .... ;-) For the pull request: I pushed branch Yup, quite some stuff ;-) FYI, I created an channel |
i'll circle back on this later tonight/tomorrow - had something come up. |
i'm back working on this again...hopefully it won't take me long to make these changes. on a separate, but related note: isn't the i hung out on the irc channel today - i'll try again tomorrow. |
Yes, it is a breaking change (I documented this here) so feel free to drop the support for the old stuff already and change the configuration as discussed. Normally, I wouldn't be that aggressive, but for 0.10.6 we will force the user to change a bit anyways:
Please add to this document for helping people in migration. And yes, we are still in pre-1.0 mode ;-) |
i knew i saw it some place, i just couldn't remember where. i'll be sure to make changes there as well when i do doc updates. |
I want to do a release before christmas, so I wonder whether we can include your changes already. Do you think you can make it until tomorrow ? Maybe you can push you current state anyways, since I have some time until wednesday and could do the integration ? No rush, though. There will be a 0.11.1 release after this anyways ;-) (However, having all already known fundamental config changes in one release would be nice, but that's not mandatory, of course ....) |
this was merged, so closing... |
split off from issue #62, relevant parts below.
BTW, in other issue #53 Thomas has problems with the UID of the exported directory. I tried to changed from ADD to COPY but this didn't helped.
My idea is to use an extra configuration (like 'assemblyUser') and then do the required 'chown' on our own by inserting it into the on-the-fly generated Dockerfile. Since this is yet another assembly related paremeter, what do you think about combining this into extra configuration section like in
For backwards compatibility one would still support
exportDir
,assemblyDescriptor
andassemblyDescriptorRef
for some time ?i would change uid to user b/c that's what docker calls it and i'd probably call directory basedir b/c that's more maven-ish
The stuff with support for Dockerfiles can be found here #13
The text was updated successfully, but these errors were encountered: