jira-importer commented on issue #92: URL: https://github.com/apache/maven-war-plugin/issues/92#issuecomment-2967841714
**[Victor Yushenko](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hifisoftware)** commented I really needed to fix it so I looked at the code and made the fix. The problem is that if source and destination 'classes' folder is the same then files are emptied while plugins tries to copy. Ideally this fix should be made in org.codehaus.plexus.util.FileUtils. FileUtils are used by this plugin to copy compiled classes into the staging directory. I fixed it by bypassing the copy if source and target directory are the same. I changed this block (line 265 in AbstractWarMojo.java): if ( getClassesDirectory().exists() ) { FileUtils.copyDirectoryStructure( getClassesDirectory(), webappClassesDirectory ); } to if ( getClassesDirectory().exists() && (!getClassesDirectory().equals(webappClassesDirectory))) { FileUtils.copyDirectoryStructure( getClassesDirectory(), webappClassesDirectory ); } I'll try to attach an svn patch for this issue. -- 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. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org