[GitHub] [maven-ear-plugin] mabrarov commented on a change in pull request #26: replace deprecated method no longer needed in Java 7+

2020-12-20 Thread GitBox


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



##
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##
@@ -480,9 +482,10 @@ private void copyModules( final JavaEEVersion 
javaEEVersion,
 if ( sourceFile.lastModified() > 
destinationFile.lastModified() )
 {
 getLog().info( "Copying artifact [" + module + "] to 
[" + module.getUri() + "]" );
-FileUtils.copyFile( sourceFile, destinationFile );
-
-if ( module.changeManifestClasspath() )
+createParentIfNecessary( destinationFile );
+Files.copy( sourceFile.toPath(), 
destinationFile.toPath(),
+LinkOption.NOFOLLOW_LINKS, 
StandardCopyOption.REPLACE_EXISTING );
+if ( module.changeManifestClasspath() && ( skinnyWars 
|| module.getLibDir() == null ) )

Review comment:
   Refer to pull request #30 for the fix of this bug.





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:
us...@infra.apache.org




[GitHub] [maven-ear-plugin] mabrarov commented on a change in pull request #26: replace deprecated method no longer needed in Java 7+

2020-12-20 Thread GitBox


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



##
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##
@@ -480,9 +482,10 @@ private void copyModules( final JavaEEVersion 
javaEEVersion,
 if ( sourceFile.lastModified() > 
destinationFile.lastModified() )
 {
 getLog().info( "Copying artifact [" + module + "] to 
[" + module.getUri() + "]" );
-FileUtils.copyFile( sourceFile, destinationFile );
-
-if ( module.changeManifestClasspath() )
+createParentIfNecessary( destinationFile );
+Files.copy( sourceFile.toPath(), 
destinationFile.toPath(),
+LinkOption.NOFOLLOW_LINKS, 
StandardCopyOption.REPLACE_EXISTING );
+if ( module.changeManifestClasspath() && ( skinnyWars 
|| module.getLibDir() == null ) )

Review comment:
   I opened [MEAR-293](https://issues.apache.org/jira/browse/MEAR-293) bug 
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.

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




[GitHub] [maven-ear-plugin] mabrarov commented on a change in pull request #26: replace deprecated method no longer needed in Java 7+

2020-12-20 Thread GitBox


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



##
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##
@@ -480,9 +482,10 @@ private void copyModules( final JavaEEVersion 
javaEEVersion,
 if ( sourceFile.lastModified() > 
destinationFile.lastModified() )
 {
 getLog().info( "Copying artifact [" + module + "] to 
[" + module.getUri() + "]" );
-FileUtils.copyFile( sourceFile, destinationFile );
-
-if ( module.changeManifestClasspath() )
+createParentIfNecessary( destinationFile );
+Files.copy( sourceFile.toPath(), 
destinationFile.toPath(),
+LinkOption.NOFOLLOW_LINKS, 
StandardCopyOption.REPLACE_EXISTING );
+if ( module.changeManifestClasspath() && ( skinnyWars 
|| module.getLibDir() == null ) )

Review comment:
   I opened 
[MEAR-293](https://issues.apache.org/jira/projects/MEAR/issues/MEAR-293) bug 
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.

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




[GitHub] [maven-ear-plugin] mabrarov commented on a change in pull request #26: replace deprecated method no longer needed in Java 7+

2020-12-20 Thread GitBox


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



##
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##
@@ -480,9 +482,10 @@ private void copyModules( final JavaEEVersion 
javaEEVersion,
 if ( sourceFile.lastModified() > 
destinationFile.lastModified() )
 {
 getLog().info( "Copying artifact [" + module + "] to 
[" + module.getUri() + "]" );
-FileUtils.copyFile( sourceFile, destinationFile );
-
-if ( module.changeManifestClasspath() )
+createParentIfNecessary( destinationFile );
+Files.copy( sourceFile.toPath(), 
destinationFile.toPath(),
+LinkOption.NOFOLLOW_LINKS, 
StandardCopyOption.REPLACE_EXISTING );
+if ( module.changeManifestClasspath() && ( skinnyWars 
|| module.getLibDir() == null ) )

Review comment:
   This line looks to be modified by mistake. It should remain:
   
   ```java
   if ( module.changeManifestClasspath() )
   ```





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:
us...@infra.apache.org