Conversation
| getLog().info( "Copying artifact [" + module + "] to [" + module.getUri() + "] (unpacked)" ); | ||
| // Make sure that the destination is a directory to avoid plexus nasty stuff :) | ||
| destinationFile.mkdirs(); | ||
| if ( !destinationFile.mkdirs() ) |
There was a problem hiding this comment.
This change seems to be causing an issue when build is run without "clean".
[INFO] Copying artifact [ejb:com.aaa.bbb:bbb-ejb:1.0.0.0-SNAPSHOT] to [bbb-ejb.jar]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:3.1.0:ear (default-ear) on project bbb-ear: Failed to create directory /Checkout/project/bbb/bbb-ear/target/temp/bbb-ejb.jar -> [Help 1]
Probably it should be wrapped with something like:
if ( !destinationFile.isDirectory() )
{
if ( !destinationFile.mkdirs() )
{
throw new MojoExecutionException( "Error creating " + destinationFile );
}
}There was a problem hiding this comment.
My bad. That's not the right place.
There was a problem hiding this comment.
Here is the one
ce76c3e#diff-0520547103a4a317e72df7f8c27e3d61R757
|
Sounds plausible. Can you open an issue in the Jira and assign to me?
…On Thu, Oct 1, 2020 at 8:45 AM Mikhail Gavrilov ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/main/java/org/apache/maven/plugins/ear/EarMojo.java
<#15 (comment)>
:
> @@ -453,7 +453,10 @@ private void copyModules( final JavaEEVersion javaEEVersion,
{
getLog().info( "Copying artifact [" + module + "] to [" + module.getUri() + "] (unpacked)" );
// Make sure that the destination is a directory to avoid plexus nasty stuff :)
- destinationFile.mkdirs();
+ if ( !destinationFile.mkdirs() )
This change seems to be causing an issue when build is run without "clean".
[INFO] Copying artifact [ejb:com.aaa.bbb:bbb-ejb:1.0.0.0-SNAPSHOT] to
[bbb-ejb.jar]
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-ear-plugin:3.1.0:ear (default-ear) on
project bbb-ear: Failed to create directory
/Checkout/project/bbb/bbb-ear/target/temp/bbb-ejb.jar -> [Help 1]
Probably it should be wrapped with something like:
if ( !destinationFile.isDirectory() )
{
if ( !destinationFile.mkdirs() )
{
throw new MojoExecutionException( "Error creating " + destinationFile );
}
}
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#15 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVP2BRCHY6LCADKNCI4BTSIQ6RLANCNFSM4RZSOHKA>
.
--
Elliotte Rusty Harold
elharo@macfaq.com
|
|
I have raised a PR associated with the original issue. |
|
Yes, please since that issue is already closed and shipped. I haven't been
able to reproduce this myself yet.
…On Thu, Oct 1, 2020 at 8:36 AM Mikhail Gavrilov ***@***.***> wrote:
I have raised a PR <#17>
associated with the original issue.
Should I open a new one for it?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVP2A2MDWZKD45ZTGIKADSIRZVHANCNFSM4RZSOHKA>
.
--
Elliotte Rusty Harold
elharo@macfaq.com
|
|
@elharo, I discussed this issue with @zzzLobster and we decided that I'll take care of openning new bug. At the moment I'm able to reproduce this issue on Windows 10 x64 and CentOS 7 x64 with https://github.com/mabrarov/dockerfile-test: I'm in the process of creation of integration test in maven-ear-plugin repository to reproduce this issue and to validate fix of @zzzLobster. I believe I'll complete my actions within next 12-24 hrs. |
|
@mabrarov , I have created the issue, just to push a new commit with the correct issue number in description. |
|
Resolve #452 |
1 similar comment
|
Resolve #452 |
@hboutemy