You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/07/20 22:02:27 UTC

[I] getPreviouslyAttached() in AbstractSourceJarMojo is unused dead code [maven-source-plugin]

elharo opened a new issue, #305:
URL: https://github.com/apache/maven-source-plugin/issues/305

   `AbstractSourceJarMojo.java:330-336` contains a private method `getPreviouslyAttached()` that is never called anywhere in the codebase:
   
   ```java
   private Artifact getPreviouslyAttached(Artifact artifact, Project checkProject, String classifier) {
       return artifact.getExtension().equals(getExtension())
                       && artifact.getGroupId().equals(checkProject.getGroupId())
                       && artifact.getArtifactId().equals(checkProject.getArtifactId())
                       && artifact.getVersion().toString().equals(checkProject.getVersion())
                       && Objects.equals(artifact.getClassifier(), classifier)
               ? artifact
               : null;
   }
   ```
   
   This is dead code and should be removed to avoid confusion.


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

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


Re: [I] getPreviouslyAttached() in AbstractSourceJarMojo is unused dead code [maven-source-plugin]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo closed issue #305: getPreviouslyAttached() in AbstractSourceJarMojo is unused dead code
URL: https://github.com/apache/maven-source-plugin/issues/305


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

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


Re: [I] getPreviouslyAttached() in AbstractSourceJarMojo is unused dead code [maven-source-plugin]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on issue #305:
URL: https://github.com/apache/maven-source-plugin/issues/305#issuecomment-5180370515

   The issue is already fixed. The getPreviouslyAttached() method was         
        removed in commit eee8629 (PR #257), merged on Jul 22, 2026. The method    
        no longer exists in the codebase.                                          
                                           


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

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