[jira] Commented: (MDEP-294) copy-dependencies goal doesn't properly respect classifier when creating base version of snapshots
[ http://jira.codehaus.org/browse/MDEP-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=245947#action_245947 ] Tim Downey commented on MDEP-294: - I'm attaching a patch to TestCopyDependenciesMojo2 that exercises the fix. It adds an expanded snapshot artifact including a classifier to the testRepositoryLayout test. copy-dependencies goal doesn't properly respect classifier when creating base version of snapshots -- Key: MDEP-294 URL: http://jira.codehaus.org/browse/MDEP-294 Project: Maven 2.x Dependency Plugin Issue Type: Bug Components: copy-dependencies Affects Versions: 2.1 Reporter: Tim Downey Assignee: Brian Fox Attachments: CopyDependenciesMojo.java, CopyDependenciesMojo.java.diff, TestCopyDependenciesMojo2.diff CopyDependenciesMojo ignores any classifier on the artifact being copied when creating the base version of a snapshot. It works correctly for the non-base (timestamped) version. This leads to a mismatch in the copied dependencies where the timestamped version correctly keeps the classifier, but the base -SNAPSHOT version has the classifier completely dropped. The fix is simple, although a bit ugly. In the installBaseSnapshot method, a check must be made for the presence of a classifier on the artifact being copied before using the ArtifactFactory to create a copy of the base version. Ideally, the ArtifactFactory would expose a single method that takes all parameters, but unfortunately it does not. This requires a separate 'if' check for the presence of a classifier. Another potential issue is that the method ArtifactFactory#createArtifactWithClassifier has no parameter for scope. I don't think that causes any issue in this case, but is another reason why there should be a single method createArtifact that takes all combinations of parameters including classifier. I've attached a patch that will fix the issue, but not a test case since it looks like the maven-plugin-testing-tools-harness would need to be updated as well. It doesn't appear to expose any artifacts that both have a classifier and are snapshots from the ArtifactStubFactory. If deemed important, I can produce a patch for that as well along with a test. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MDEP-294) copy-dependencies goal doesn't properly respect classifier when creating base version of snapshots
[ http://jira.codehaus.org/browse/MDEP-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=245691#action_245691 ] Brian Fox commented on MDEP-294: Can you add a test? copy-dependencies goal doesn't properly respect classifier when creating base version of snapshots -- Key: MDEP-294 URL: http://jira.codehaus.org/browse/MDEP-294 Project: Maven 2.x Dependency Plugin Issue Type: Bug Components: copy-dependencies Affects Versions: 2.1 Reporter: Tim Downey Assignee: Brian Fox Attachments: CopyDependenciesMojo.java, CopyDependenciesMojo.java.diff CopyDependenciesMojo ignores any classifier on the artifact being copied when creating the base version of a snapshot. It works correctly for the non-base (timestamped) version. This leads to a mismatch in the copied dependencies where the timestamped version correctly keeps the classifier, but the base -SNAPSHOT version has the classifier completely dropped. The fix is simple, although a bit ugly. In the installBaseSnapshot method, a check must be made for the presence of a classifier on the artifact being copied before using the ArtifactFactory to create a copy of the base version. Ideally, the ArtifactFactory would expose a single method that takes all parameters, but unfortunately it does not. This requires a separate 'if' check for the presence of a classifier. Another potential issue is that the method ArtifactFactory#createArtifactWithClassifier has no parameter for scope. I don't think that causes any issue in this case, but is another reason why there should be a single method createArtifact that takes all combinations of parameters including classifier. I've attached a patch that will fix the issue, but not a test case since it looks like the maven-plugin-testing-tools-harness would need to be updated as well. It doesn't appear to expose any artifacts that both have a classifier and are snapshots from the ArtifactStubFactory. If deemed important, I can produce a patch for that as well along with a test. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MDEP-294) copy-dependencies goal doesn't properly respect classifier when creating base version of snapshots
[ http://jira.codehaus.org/browse/MDEP-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=245692#action_245692 ] Tim Downey commented on MDEP-294: - It looks like the artifacts used in the test cases come from the maven-plugin-testing-tools-harness (The artifacts supplied by the current harness don't have any that use a classifier and are snapshot). If so, I'd need to modify that as well, right? Would I submit a patch for both to this ticket? copy-dependencies goal doesn't properly respect classifier when creating base version of snapshots -- Key: MDEP-294 URL: http://jira.codehaus.org/browse/MDEP-294 Project: Maven 2.x Dependency Plugin Issue Type: Bug Components: copy-dependencies Affects Versions: 2.1 Reporter: Tim Downey Assignee: Brian Fox Attachments: CopyDependenciesMojo.java, CopyDependenciesMojo.java.diff CopyDependenciesMojo ignores any classifier on the artifact being copied when creating the base version of a snapshot. It works correctly for the non-base (timestamped) version. This leads to a mismatch in the copied dependencies where the timestamped version correctly keeps the classifier, but the base -SNAPSHOT version has the classifier completely dropped. The fix is simple, although a bit ugly. In the installBaseSnapshot method, a check must be made for the presence of a classifier on the artifact being copied before using the ArtifactFactory to create a copy of the base version. Ideally, the ArtifactFactory would expose a single method that takes all parameters, but unfortunately it does not. This requires a separate 'if' check for the presence of a classifier. Another potential issue is that the method ArtifactFactory#createArtifactWithClassifier has no parameter for scope. I don't think that causes any issue in this case, but is another reason why there should be a single method createArtifact that takes all combinations of parameters including classifier. I've attached a patch that will fix the issue, but not a test case since it looks like the maven-plugin-testing-tools-harness would need to be updated as well. It doesn't appear to expose any artifacts that both have a classifier and are snapshots from the ArtifactStubFactory. If deemed important, I can produce a patch for that as well along with a test. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira