[MEAR-287] Fixed failure when destination directory exists#17
[MEAR-287] Fixed failure when destination directory exists#17elharo merged 7 commits intoapache:masterfrom
Conversation
| 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() ) |
There was a problem hiding this comment.
This needs a test. Assuming this is an issue (I can't reproduce) there are other areas that need to be fixed too.
There was a problem hiding this comment.
Test created in zzzLobster#1. That test covers change in line 752 but not in this line. I'll check if I can extend test. Let me know if it is not required.
There was a problem hiding this comment.
Hmm... it wasn't so hard to extend the test. Now it covers both changed lines, i.e. it fails if one of changes is missing.
There was a problem hiding this comment.
I have merged the Marat's PR, So the PR currently contains IT for it
…of previous build exist in target location
[MEAR-287] - Integration test for MEAR-287 fix
| if ( workDirectory.mkdirs() ) | ||
| if ( workDirectory.isDirectory() || workDirectory.mkdirs() ) | ||
| { | ||
| getLog().debug( "Created a temporary work directory: " + workDirectory.getAbsolutePath() ); |
There was a problem hiding this comment.
log message is now incorrect here; probably need a nested if in this case
There was a problem hiding this comment.
Could we just simplify log message till:
getLog().debug( "Temporary work directory: " + workDirectory.getAbsolutePath() );?
| /** | ||
| * Builds WAR and EAR as part of multi-module project twice so that the 2nd build is guaranteed to be performed when | ||
| * target directories and files exist. | ||
| * @throws Exception in case of an error. |
There was a problem hiding this comment.
I agree with useless of this part of this JavaDoc but I prefer to keep code consistent - all tests in this file have this @throws JavaDoc
There was a problem hiding this comment.
We don't need to be consistent with mistakes.
There was a problem hiding this comment.
Well, do you find it appropriate if I remove this useless JavaDoc from all tests in this file?
# Conflicts: # pom.xml
|
What's pending / required for merging this pull request? |
|
Trying jenkins again: https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-ear-plugin/job/17/ |
|
Resolve #452 |
|
Resolve #456 |
|
Resolve #452 |
|
Resolve #456 |
MEAR-287 Fixed failure when destination directory exists