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 2021/02/26 11:45:43 UTC

[GitHub] [maven-gpg-plugin] Syquel opened a new pull request #10: [MGPG-66] fix handling of excluded files

Syquel opened a new pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10


   Fixes [MGPG-66](https://issues.apache.org/jira/projects/MGPG/issues/MGPG-66) by adding a check if files match the exclude patterns.


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



[GitHub] [maven-gpg-plugin] elharo commented on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
elharo commented on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-796137075


   Many builds failed. might be flaky. Running again. 


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



[GitHub] [maven-gpg-plugin] elharo commented on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
elharo commented on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-795520674


   Running through Jenkins 
   https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-gpg-plugin/job/MGPG-66/


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



[GitHub] [maven-gpg-plugin] Syquel commented on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
Syquel commented on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-796196960


   I was able to reproduce this issue on Linux.
   
   The issue is that `org.codehaus.plexus.util.SelectorUtils#matchPath(java.lang.String, java.lang.String)` does not match the pattern `**/*.asc` on the path `/tmp/maven-gpg-plugin/target/it/sign-release-with-excludes/target/test-1.0-sources.jar.asc`.
   On Windows it's working.
   
   I will take a look tomorrow.


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



[GitHub] [maven-gpg-plugin] Syquel edited a comment on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
Syquel edited a comment on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-796196960


   I was able to reproduce this issue on Linux.
   
   The issue is that `org.codehaus.plexus.util.SelectorUtils#matchPath(java.lang.String, java.lang.String)` does not match the pattern `**/*.asc` on the path `/tmp/maven-gpg-plugin/target/it/sign-release-with-excludes/target/test-1.0-sources.jar.asc`.
   On Windows it's working.
   
   I will take a look tomorrow.
   
   //EDIT
   Found the following comment on `org.codehaus.plexus.util.SelectorUtils#separatorPatternStartSlashMismatch(java.lang.String, java.lang.String, java.lang.String)`:
   > // When str starts with a File.separator, pattern has to start with a
   > // File.separator.
   > // When pattern starts with a File.separator, str has to start with a
   > // File.separator.
   
   So while absolute Paths on Windows (usually) start with a drive letter they always start with the file separator char `/` on Linux.
   Either we make the path relative as a workaround or look for another Class which provides ant pattern matching.
   
   The following version would work on both OS, but I would like to hear another opinion first:
   ```
   protected boolean isExcluded( Artifact artifact )
   {
       final Path projectBasePath = project.getBasedir().toPath();
       final Path artifactPath = artifact.getFile().toPath();
       final String relativeArtifactPath = projectBasePath.relativize( artifactPath ).toString();
   
       for ( String exclude : excludes )
       {
           if ( SelectorUtils.matchPath( exclude, relativeArtifactPath ) )
           {
               return true;
           }
       }
       return false;
   }
   ```
   


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



[GitHub] [maven-gpg-plugin] elharo commented on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
elharo commented on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-799706947


   https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-gpg-plugin/job/MGPG-66/3/


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



[GitHub] [maven-gpg-plugin] Syquel edited a comment on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
Syquel edited a comment on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-796196960


   I was able to reproduce this issue on Linux.
   
   The issue is that `org.codehaus.plexus.util.SelectorUtils#matchPath(java.lang.String, java.lang.String)` does not match the pattern `**/*.asc` on the path `/tmp/maven-gpg-plugin/target/it/sign-release-with-excludes/target/test-1.0-sources.jar.asc`.
   On Windows it's working.
   
   I will take a look tomorrow.
   
   //EDIT
   Found the following comment on `org.codehaus.plexus.util.SelectorUtils#separatorPatternStartSlashMismatch(java.lang.String, java.lang.String, java.lang.String)`:
   > // When str starts with a File.separator, pattern has to start with a
   > // File.separator.
   > // When pattern starts with a File.separator, str has to start with a
   > // File.separator.
   
   So while absolute Paths on Windows (usually) start with a drive letter they always start with the file seperator char `/` on Linux.
   Either we make the path relative as a workaround or look for another Class which provides ant pattern matching.
   


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



[GitHub] [maven-gpg-plugin] elharo merged pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
elharo merged pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10


   


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



[GitHub] [maven-gpg-plugin] Syquel edited a comment on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
Syquel edited a comment on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-796196960


   I was able to reproduce this issue on Linux.
   
   The issue is that `org.codehaus.plexus.util.SelectorUtils#matchPath(java.lang.String, java.lang.String)` does not match the pattern `**/*.asc` on the path `/tmp/maven-gpg-plugin/target/it/sign-release-with-excludes/target/test-1.0-sources.jar.asc`.
   On Windows it's working.
   
   I will take a look tomorrow.
   
   //EDIT
   Found the following comment on `org.codehaus.plexus.util.SelectorUtils#separatorPatternStartSlashMismatch(java.lang.String, java.lang.String, java.lang.String)`:
   > // When str starts with a File.separator, pattern has to start with a
   > // File.separator.
   > // When pattern starts with a File.separator, str has to start with a
   > // File.separator.
   
   So while absolute Paths on Windows (usually) start with a drive letter they always start with the file separator char `/` on Linux.
   Either we make the path relative as a workaround or look for another Class which provides ant pattern matching.
   


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



[GitHub] [maven-gpg-plugin] clemensbartz commented on pull request #10: [MGPG-66] fix handling of excluded files

Posted by GitBox <gi...@apache.org>.
clemensbartz commented on pull request #10:
URL: https://github.com/apache/maven-gpg-plugin/pull/10#issuecomment-799726292


   I can confirm this fix is also working on macOS 11.2.3 (Apple Silicon, gpg (GnuPG/MacGPG2) 2.2.24). The test in 4da6921 is successful and was failing before as expected.
   Java reports as: `OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"`


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