You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2022/12/05 20:00:10 UTC

[GitHub] [avro] rgroothuijsen opened a new pull request, #2002: AVRO-3640: [Java] Correctly handle symbolic links as source directory for Maven plugin

rgroothuijsen opened a new pull request, #2002:
URL: https://github.com/apache/avro/pull/2002

   This PR provides a fix for situations where a user provides the Maven plugin with a symbolic link instead of an actual directory as the source directory, and the plugin fails to detect the source files referred to by the link. To fix this, the plugin will first check if the provided directory is a symbolic link, and resolve it to the actual directory if necessary.
   
   In order to verify this, a unit test has been added which creates a symbolic link, and this link is referred to in the provided POM's `sourceDirectory` field. When the test completes, files will be written to the output directory similarly to the non-symbolic test cases.


-- 
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: dev-unsubscribe@avro.apache.org

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


[GitHub] [avro] opwvhk commented on a diff in pull request #2002: AVRO-3640: [Java] Correctly handle symbolic links as source directory for Maven plugin

Posted by "opwvhk (via GitHub)" <gi...@apache.org>.
opwvhk commented on code in PR #2002:
URL: https://github.com/apache/avro/pull/2002#discussion_r1094341872


##########
lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java:
##########
@@ -202,6 +203,13 @@ public abstract class AbstractAvroMojo extends AbstractMojo {
 
   @Override
   public void execute() throws MojoExecutionException {
+    if (Files.isSymbolicLink(sourceDirectory.toPath())) {

Review Comment:
   The first line below is a null check, but this will throw if sourceDirectory is null.



-- 
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-unsubscribe@avro.apache.org

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