2020
2121import java .util .Collection ;
2222
23- import org .apache .maven .api .Artifact ;
23+ import org .apache .maven .api .ProducedArtifact ;
2424import org .apache .maven .api .RemoteRepository ;
2525import org .apache .maven .api .Session ;
2626import org .apache .maven .api .annotations .Experimental ;
@@ -45,7 +45,7 @@ public interface ArtifactDeployerRequest {
4545 RemoteRepository getRepository ();
4646
4747 @ Nonnull
48- Collection <Artifact > getArtifacts ();
48+ Collection <ProducedArtifact > getArtifacts ();
4949
5050 int getRetryFailedDeploymentCount ();
5151
@@ -56,7 +56,9 @@ static ArtifactDeployerRequestBuilder builder() {
5656
5757 @ Nonnull
5858 static ArtifactDeployerRequest build (
59- @ Nonnull Session session , @ Nonnull RemoteRepository repository , @ Nonnull Collection <Artifact > artifacts ) {
59+ @ Nonnull Session session ,
60+ @ Nonnull RemoteRepository repository ,
61+ @ Nonnull Collection <ProducedArtifact > artifacts ) {
6062 return builder ()
6163 .session (nonNull (session , "session cannot be null" ))
6264 .repository (nonNull (repository , "repository cannot be null" ))
@@ -67,7 +69,7 @@ static ArtifactDeployerRequest build(
6769 class ArtifactDeployerRequestBuilder {
6870 Session session ;
6971 RemoteRepository repository ;
70- Collection <Artifact > artifacts ;
72+ Collection <ProducedArtifact > artifacts ;
7173 int retryFailedDeploymentCount ;
7274
7375 ArtifactDeployerRequestBuilder () {}
@@ -84,7 +86,7 @@ public ArtifactDeployerRequestBuilder repository(RemoteRepository repository) {
8486 return this ;
8587 }
8688
87- public ArtifactDeployerRequestBuilder artifacts (Collection <Artifact > artifacts ) {
89+ public ArtifactDeployerRequestBuilder artifacts (Collection <ProducedArtifact > artifacts ) {
8890 this .artifacts = artifacts ;
8991 return this ;
9092 }
@@ -102,13 +104,13 @@ public ArtifactDeployerRequest build() {
102104 private static class DefaultArtifactDeployerRequest extends BaseRequest implements ArtifactDeployerRequest {
103105
104106 private final RemoteRepository repository ;
105- private final Collection <Artifact > artifacts ;
107+ private final Collection <? extends ProducedArtifact > artifacts ;
106108 private final int retryFailedDeploymentCount ;
107109
108110 DefaultArtifactDeployerRequest (
109111 @ Nonnull Session session ,
110112 @ Nonnull RemoteRepository repository ,
111- @ Nonnull Collection <Artifact > artifacts ,
113+ @ Nonnull Collection <? extends ProducedArtifact > artifacts ,
112114 int retryFailedDeploymentCount ) {
113115 super (session );
114116 this .repository = nonNull (repository , "repository cannot be null" );
@@ -124,7 +126,7 @@ public RemoteRepository getRepository() {
124126
125127 @ Nonnull
126128 @ Override
127- public Collection <Artifact > getArtifacts () {
129+ public Collection <? extends ProducedArtifact > getArtifacts () {
128130 return artifacts ;
129131 }
130132
0 commit comments