-
Notifications
You must be signed in to change notification settings - Fork 644
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
Problem writing in xAR operation; archives contains unclosed entries #171
Comments
Yes, thats true. I changed it a bit to use Alternatively you can get this change via branch Does this help ? (hadn't a chance yet to repdroduce it myself) |
Thank you for that. I tried a 0.11.5-SNAPSHOT with the following SHA1: f9575b034d576b94194e7814cfb5af8f119b0b19, and it did not resolve my problem. It did not change any of the above behavior. |
Ok. May I ask to try a third time ? Now I changed from using Sorry, but I guess the issue is also connected to the OS (Windows in your case if I'm right) and I don't have a Windows setup (yet). If this doesn't help, I will try to reproduce the issue so that I can better debug it. Thanks for your patience ... |
Thank you for that. The issue was not limited to Windows, Mac users have seen this happening. I don't think I've seen it happening on any of our CI servers, which are Linux. I tried the new 0.11.5-SNAPSHOT and it does fix the problem. It seems to create ZIP and a TAR, for what it's worth.
It would be great to get this in a released version! |
I also just noticed that at the end of the build, there's a message now:
|
Thanks, for confirming that it works. I indeed make this configurable, so that you can even use the "old" variant without an intermediate archive (but by copying directories). The advantage of using an archive is that file permissions should be better preserved because they are then independent on the underlying filesystem (that's the theory :). I will also take care of cleaning up the zip-file. fwiw, I plan a 0.11.5 release this week with this fix + fixed registry handling. |
Sounds good, a release this week, particularly if that were to include more goodies that I look forward to 😄 (#146?) |
#146 is already fixed (but not yet pushed, need some better testing yet) |
The zip file issue is probably due to this bug: https://jira.codehaus.org/browse/MASSEMBLY-742 We probably have to wait until this is fixed. |
This can be specified with <build><assembly><mode>...</....> where mode can be "dir", "tar", "tgz" or "zip". Fixes #171. Still todo: Allow configuraton over property, too.
@rhuss can you update maven-assambly-plugin? white 2.5.3 i don't get the stacktrace but a error message. Now it is saying |
@rhuss i'm using 0.14.1 and have the same issue as @dverbeek84. the same setup works in 0.13.9 (having the Dockerfile in the project root. looks like it's tar-ing up target while writing it's output under target? |
Roland, Do you why this issue is happening again? I am using
|
@vrenjith could you update to d-m-p 0.15.3 (which is the latest version) ? If the problem then still persists, could you please post your build condiguration ? thanks ... |
Unfortunately it still fails with
|
Can you please post your configuration ? |
|
@vrenjith first of all, it doesn't make sense to use both, Then if, you use The solution is to either move your Dockerfile in a separate directory (e.g. Does this help ? |
i felt this was terribly documented. can you guys provide a complete good example? I tried more than ~30 minutes and no luck to get it working with an external docker file. |
@jessezhao2017 Thanks for your feedback, I will add some info to the documentation to https://dmp.fabric8.io/#docker:build BTW, if you have some specific comments what is not understandable or missing, I'm happy about any feedback (or even a PR, you find the documentation below src/main/asciidoc. But in the meantime, maybe you describe your use case and what you want to achieve ? If its only about adding a ...
<configuration>
<images>
<image>
<build>
<dockerFileDir>src/main/docker</dockerFileDir>
</build>
...
<image>
....
</images>
....
</configuration> but this example is also given in the documentation referenced above, so I guess you miss something here. Can you please elaborate a bit what do you miss ? Thanks ! |
@jessezhao2017 As promised I added a dedicated example to https://github.com/fabric8io/docker-maven-plugin/tree/master/samples/dockerfile Please feel free to give any feedback (btw, we also like positive feedback. just in case ;-), and open a new issue if you have problems with the Dockerfile mode or with the documentation. |
thanks,
1) with regard to:
<assembly> <descriptorRef>rootWar</descriptorRef></assembly>
where is rootWar defined?
2) what if I need to pack a child module's built target child-proj.war into
the docker image?
…On Apr 18, 2017 12:50 AM, "Roland Huß" ***@***.***> wrote:
@jessezhao2017 <https://github.com/jessezhao2017> As promised I added a
dedicated example to https://github.com/fabric8io/
docker-maven-plugin/tree/master/samples/dockerfile
Please feel free to give any feedback (btw, we also like positive
feedback. just in case ;-), and open a new issue if you have problems with
the Dockerfile mode or with the documentation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZokTVN6Fd7WP6aULD7-tNB5NUb8aM2oks5rxGsrgaJpZM4Ediry>
.
--
Legal Disclaimer: The information contained in this message may be
privileged and confidential. It is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the
reader of this message is not the intended recipient, you are on notice
that any distribution of this message, in any form, is strictly prohibited.
If you have received this message in error, please immediately notify the
sender and delete or destroy any copy of this message
|
1) described in the manual and the source is here
https://github.com/fabric8io/docker-maven-plugin/blob/master/src/main/resources/assemblies/rootWar.xml
2) Add it as a dependency to your project and use a <dependencySet> in your
assembly descriptor. For complicated setups I'd recommend to have a
dedicated Maven module for doing the build only, collection the artefacts
to include via dependencies.
On Tue, Apr 18, 2017 at 5:17 PM jessezhao2017 <[email protected]>
wrote:
thanks,
1) with regard to:
<assembly> <descriptorRef>rootWar</descriptorRef></assembly>
where is rootWar defined?
2) what if I need to pack a child module's built target child-proj.war into
the docker image?
On Apr 18, 2017 12:50 AM, "Roland Huß" ***@***.***> wrote:
> @jessezhao2017 <https://github.com/jessezhao2017> As promised I added a
> dedicated example to https://github.com/fabric8io/
> docker-maven-plugin/tree/master/samples/dockerfile
>
> Please feel free to give any feedback (btw, we also like positive
> feedback. just in case ;-), and open a new issue if you have problems
with
> the Dockerfile mode or with the documentation.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#171 (comment)
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AZokTVN6Fd7WP6aULD7-tNB5NUb8aM2oks5rxGsrgaJpZM4Ediry
>
> .
>
--
Legal Disclaimer: The information contained in this message may be
privileged and confidential. It is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the
reader of this message is not the intended recipient, you are on notice
that any distribution of this message, in any form, is strictly
prohibited.
If you have received this message in error, please immediately notify the
sender and delete or destroy any copy of this message
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGDCAfWv7QKMIUDTIR6IyQmGFj1wTNmks5rxNQRgaJpZM4Ediry>
.
--
... roland
|
my project:
parent-prj:
- pom.xml
- SRC/main/docker/Dockerfile
- child-prj
the docker generation needs to pick up war files from parent-prj/target and
child-prj/target.
I set docketFileDir to ${basedir} in pom.xml, but docker:build from your
plugin always complaints it can't find those two war files.
but it works fine if I use native docker :
"docker build -t xyz src/main/docker/Dockerfile .” to set the context in
basedir.
is: my Dockerfile is:
FROM tomcat
...
COPY target/../parent-prj.war
COPY child-prj/target/.../child-prj.war
…On Apr 17, 2017 10:36 PM, "Roland Huß" ***@***.***> wrote:
@jessezhao2017 <https://github.com/jessezhao2017> Thanks for your
feedback, I will add some info to the documentation to
https://dmp.fabric8.io/#docker:build BTW, if you have some specific
comments what is not understandable or missing, I'm happy about any
feedback (or even a PR, you find the documentation below src/main/asciidoc
<https://github.com/fabric8io/docker-maven-plugin/tree/master/src/main/asciidoc>
.
But in the meantime, maybe you describe your use case and what you want to
achieve ? If its only about adding a Dockerfile build, just use
...
<configuration>
<images>
<image>
<build>
<dockerFileDir>src/main/docker</dockerFileDir>
</build>
...
<image>
....
</images>
....
</configuration>
but this example is also given in the documentation referenced above, so I
guess you miss something here. Can you please elaborate a bit what do you
miss ? Thanks !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZokTWDdnXlQaSpcOpVZ9brHb06bSb_dks5rxEvJgaJpZM4Ediry>
.
--
Legal Disclaimer: The information contained in this message may be
privileged and confidential. It is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the
reader of this message is not the intended recipient, you are on notice
that any distribution of this message, in any form, is strictly prohibited.
If you have received this message in error, please immediately notify the
sender and delete or destroy any copy of this message
|
It's correct to set the dockerFileDir to ${project.basedir} (or ${basedir})
as if this is a relative path its relative to src/main/docker.
Please open an new issue (may this closed issue rest in peace), best with a
concrete pom.xml and concrete error messages.
But your setup is not optimal as your Docker build context will be huge
(i.e. the whole directory + subdirectories will be sent to your Docker
daemon). Also its quite unconventional to have a parent project which
builds a jar *and* includes child modules. Tbh, I didn't even know that
this is possible (i.e. having packaging jar and <modules>). If you want to
go this route you should also include a .mave--dockerignore file to not
include the target/docker directory as it will contain also the tar which
is sent to the Docker daemon (and hence cannot include itself). You find
more on this in the manual.
On Tue, Apr 18, 2017 at 5:27 PM jessezhao2017 <[email protected]>
wrote:
my project:
parent-prj:
- pom.xml
- SRC/main/docker/Dockerfile
- child-prj
the docker generation needs to pick up war files from parent-prj/target and
child-prj/target.
I set docketFileDir to ${basedir} in pom.xml, but docker:build from your
plugin always complaints it can't find those two war files.
but it works fine if I use native docker :
"docker build -t xyz src/main/docker/Dockerfile .” to set the context in
basedir.
is: my Dockerfile is:
FROM tomcat
...
COPY target/../parent-prj.war
COPY child-prj/target/.../child-prj.war
On Apr 17, 2017 10:36 PM, "Roland Huß" ***@***.***> wrote:
> @jessezhao2017 <https://github.com/jessezhao2017> Thanks for your
> feedback, I will add some info to the documentation to
> https://dmp.fabric8.io/#docker:build BTW, if you have some specific
> comments what is not understandable or missing, I'm happy about any
> feedback (or even a PR, you find the documentation below
src/main/asciidoc
> <
https://github.com/fabric8io/docker-maven-plugin/tree/master/src/main/asciidoc
>
> .
>
> But in the meantime, maybe you describe your use case and what you want
to
> achieve ? If its only about adding a Dockerfile build, just use
>
> ...
> <configuration>
> <images>
> <image>
> <build>
> <dockerFileDir>src/main/docker</dockerFileDir>
> </build>
> ...
> <image>
> ....
> </images>
> ....
> </configuration>
>
> but this example is also given in the documentation referenced above, so
I
> guess you miss something here. Can you please elaborate a bit what do you
> miss ? Thanks !
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#171 (comment)
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AZokTWDdnXlQaSpcOpVZ9brHb06bSb_dks5rxEvJgaJpZM4Ediry
>
> .
>
--
Legal Disclaimer: The information contained in this message may be
privileged and confidential. It is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the
reader of this message is not the intended recipient, you are on notice
that any distribution of this message, in any form, is strictly
prohibited.
If you have received this message in error, please immediately notify the
sender and delete or destroy any copy of this message
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGDCAPxs1qTS7E1NXrL7dVDzoBas7LUks5rxNZEgaJpZM4Ediry>
.
--
... roland
|
I run into the same problem:
using this configuration:
Note that I am copying the assembly along other stuff in a Dockerfile. |
add that you need to use the -DpushImage flag on docker:tag for a private registry as docker:push will use the original image. (issue fabric8io#171)
Update README.md for issue fabric8io#171
I have the same issue with v0.40.3.
I tried by using |
As of 0.11.4 we are seeing the following problem:
And:
Plugin execution as configured in
pom.xml
:Assembly as defined in
${basedir}/src/build/docker/assembly.xml
:This defect may have been introduced by issue #139, although that's just a hunch.
The text was updated successfully, but these errors were encountered: