You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/10/01 21:36:47 UTC

[GitHub] [maven-ear-plugin] mabrarov commented on a change in pull request #17: [MEAR-287] Fixed failure when destination directory exists

mabrarov commented on a change in pull request #17:
URL: https://github.com/apache/maven-ear-plugin/pull/17#discussion_r498525410



##########
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##########
@@ -443,7 +443,7 @@ 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 :)
-                    if ( !destinationFile.mkdirs() )
+                    if ( !destinationFile.isDirectory() && !destinationFile.mkdirs() )

Review comment:
       https://github.com/zzzLobster/maven-ear-plugin/pull/1




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org