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 17:36:05 UTC

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

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



##########
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:
       This needs a test. Assuming this is an issue (I can't reproduce) there are other areas that need to be fixed too. 




----------------------------------------------------------------
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