Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ jobs:
name: Verify
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
with:
ff-maven: "4.0.0-beta-5" # Maven version for fail-fast-build
maven-matrix: '[ "4.0.0-beta-5" ]'
jdk-matrix: '[ "17", "21" ]'
maven4-build: true
maven4-version: '4.0.0-rc-2' # as in project
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ under the License.

<properties>
<javaVersion>17</javaVersion>
<mavenVersion>4.0.0-beta-5</mavenVersion>
<mavenVersion>4.0.0-rc-2</mavenVersion>

<guiceVersion>6.0.0</guiceVersion>
<mavenAntrunPluginVersion>${version.maven-antrun-plugin}</mavenAntrunPluginVersion>
Expand All @@ -83,7 +83,7 @@ under the License.
<mavenSourcePluginVersion>${version.maven-source-plugin}</mavenSourcePluginVersion>
<mavenSurefirePluginVersion>${version.maven-surefire}</mavenSurefirePluginVersion>
<mavenWarPluginVersion>${version.maven-war-plugin}</mavenWarPluginVersion>
<mavenPluginTestingVersion>4.0.0-beta-2</mavenPluginTestingVersion>
<mavenPluginTestingVersion>4.0.0-beta-3</mavenPluginTestingVersion>
<mavenResolverVersion>2.0.2</mavenResolverVersion>
<mockitoVersion>5.15.2</mockitoVersion>
<slf4jVersion>2.0.13</slf4jVersion>
Expand Down Expand Up @@ -119,7 +119,7 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-meta</artifactId>
<artifactId>maven-api-annotations</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -151,7 +151,7 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-impl</artifactId>
<artifactId>maven-impl</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/it/deploy-bom/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

def expectedDeploys = [
'org/apache/maven/its/deploy/bom/test/1.0/test-1.0-build.pom',
// 'org/apache/maven/its/deploy/bom/test/1.0/test-1.0-build.pom', - rc-2 fix
'org/apache/maven/its/deploy/bom/test/1.0/test-1.0.pom',
'org/apache/maven/its/deploy/bom/test/maven-metadata.xml',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public void execute() throws MojoException {
failIfOffline();
warnIfAffectedPackagingAndMaven(packaging);

List<Artifact> deployables = new ArrayList<>();
List<ProducedArtifact> deployables = new ArrayList<>();

boolean isFilePom = classifier == null && "pom".equals(packaging);
ProducedArtifact artifact = session.createProducedArtifact(
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private boolean hasDeployExecution(Project p) {
}

private void deployAllAtOnce() {
Map<RemoteRepository, Map<Integer, List<Artifact>>> flattenedRequests = new LinkedHashMap<>();
Map<RemoteRepository, Map<Integer, List<ProducedArtifact>>> flattenedRequests = new LinkedHashMap<>();
// flatten requests, grouping by remote repository and number of retries
for (Project reactorProject : session.getProjects()) {
State state = getState(reactorProject);
Expand All @@ -227,8 +227,9 @@ private void deployAllAtOnce() {
}
// Re-group all requests
List<ArtifactDeployerRequest> requests = new ArrayList<>();
for (Map.Entry<RemoteRepository, Map<Integer, List<Artifact>>> entry1 : flattenedRequests.entrySet()) {
for (Map.Entry<Integer, List<Artifact>> entry2 : entry1.getValue().entrySet()) {
for (Map.Entry<RemoteRepository, Map<Integer, List<ProducedArtifact>>> entry1 : flattenedRequests.entrySet()) {
for (Map.Entry<Integer, List<ProducedArtifact>> entry2 :
entry1.getValue().entrySet()) {
requests.add(ArtifactDeployerRequest.builder()
.session(session)
.repository(entry1.getKey())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.stream.Collectors;

import org.apache.maven.api.Artifact;
import org.apache.maven.api.ProducedArtifact;
import org.apache.maven.api.Project;
import org.apache.maven.api.di.Inject;
import org.apache.maven.api.di.Priority;
Expand Down Expand Up @@ -87,7 +88,7 @@ public void testBasicDeployWithPackagingAsPom(DeployMojo mojo) throws Exception
ArtifactDeployerRequest request = execute(mojo);

assertNotNull(request);
Collection<Artifact> artifacts = request.getArtifacts();
Collection<ProducedArtifact> artifacts = request.getArtifacts();
assertEquals(
Collections.singletonList("org.apache.maven.test:maven-deploy-test:pom:1.0-SNAPSHOT"),
artifacts.stream().map(Artifact::key).collect(Collectors.toList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.stream.Collectors;

import org.apache.maven.api.Artifact;
import org.apache.maven.api.ProducedArtifact;
import org.apache.maven.api.Project;
import org.apache.maven.api.RemoteRepository;
import org.apache.maven.api.di.Inject;
Expand Down Expand Up @@ -108,7 +109,7 @@ public void testBasicDeploy(DeployMojo mojo) throws Exception {
ArtifactDeployerRequest request = execute(mojo);

assertNotNull(request);
Collection<Artifact> artifacts = request.getArtifacts();
Collection<ProducedArtifact> artifacts = request.getArtifacts();
assertEquals(
Arrays.asList(
"org.apache.maven.test:maven-deploy-test:pom:1.0-SNAPSHOT",
Expand Down Expand Up @@ -167,7 +168,7 @@ public void testDeployWithAttachedArtifacts(DeployMojo mojo) throws Exception {
ArtifactDeployerRequest request = execute(mojo);

assertNotNull(request);
Collection<Artifact> artifacts = request.getArtifacts();
Collection<ProducedArtifact> artifacts = request.getArtifacts();
assertEquals(
Arrays.asList(
"org.apache.maven.test:maven-deploy-test:pom:1.0-SNAPSHOT",
Expand Down
Loading