diff --git a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/ConnectorDependencyDownloadResult.java b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/ConnectorDependencyDownloadResult.java
new file mode 100644
index 000000000..e3978e24c
--- /dev/null
+++ b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/ConnectorDependencyDownloadResult.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2026, WSO2 LLC. (http://www.wso2.com).
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * WSO2 LLC - support for WSO2 Micro Integrator Configuration
+ */
+
+package org.eclipse.lemminx.customservice.synapse.parser;
+
+import java.util.List;
+
+/**
+ * Encapsulates the results of connector dependency download operations.
+ *
+ * Contains two lists: connectors that failed to download due to general errors,
+ * and connectors that were skipped because they are already provided by an
+ * integration project dependency.
+ *
+ */
+public class ConnectorDependencyDownloadResult {
+
+ private List failedDependencies;
+ private List fromIntegrationProjectDependencies;
+
+ public ConnectorDependencyDownloadResult(List failedDependencies,
+ List fromIntegrationProjectDependencies) {
+ this.failedDependencies = failedDependencies;
+ this.fromIntegrationProjectDependencies = fromIntegrationProjectDependencies;
+ }
+
+ public List getFailedDependencies() {
+ return failedDependencies;
+ }
+
+ public List getFromIntegrationProjectDependencies() {
+ return fromIntegrationProjectDependencies;
+ }
+}
diff --git a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/ConnectorDownloadManager.java b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/ConnectorDownloadManager.java
index 51838852e..078398c2f 100644
--- a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/ConnectorDownloadManager.java
+++ b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/ConnectorDownloadManager.java
@@ -60,8 +60,10 @@ public class ConnectorDownloadManager {
private static final Logger LOGGER = Logger.getLogger(ConnectorDownloadManager.class.getName());
- public static List downloadDependencies(String projectPath, List dependencies) {
+ public static ConnectorDependencyDownloadResult downloadDependencies(String projectPath, List dependencies) {
+ LOGGER.log(Level.INFO, "Starting connector dependency download for project: " + new File(projectPath).getName()
+ + " with " + dependencies.size() + " dependencies");
String projectId = new File(projectPath).getName() + "_" + Utils.getHash(projectPath);
File directory = Path.of(System.getProperty(Constant.USER_HOME), Constant.WSO2_MI, Constant.CONNECTORS,
projectId).toFile();
@@ -80,8 +82,17 @@ public static List downloadDependencies(String projectPath, List failedDependencies = new ArrayList<>();
+ List fromIntegrationProjectDependencies = new ArrayList<>();
for (DependencyDetails dependency : dependencies) {
+ String dependencyId =
+ dependency.getGroupId() + Constant.HYPHEN + dependency.getArtifact() + Constant.HYPHEN + dependency.getVersion();
+ if (isConnectorFromIntegrationProjectDependency(dependency.getArtifact())) {
+ LOGGER.log(Level.WARNING, "Connector " + dependencyId +
+ " is provided by an integration project dependency. Download not allowed.");
+ fromIntegrationProjectDependencies.add(dependencyId);
+ continue;
+ }
try {
File connector = Path.of(downloadDirectory.getAbsolutePath(),
dependency.getArtifact() + "-" + dependency.getVersion() + Constant.ZIP_EXTENSION).toFile();
@@ -98,14 +109,25 @@ public static List downloadDependencies(String projectPath, List artifactId.equalsIgnoreCase(c.getArtifactId()) && !c.isFromProject());
}
private static void deleteRemovedConnectors(File downloadDirectory, List dependencies,
diff --git a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/DependencyDownloadManager.java b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/DependencyDownloadManager.java
index 7adc2b37f..7230d2a56 100644
--- a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/DependencyDownloadManager.java
+++ b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/DependencyDownloadManager.java
@@ -49,20 +49,19 @@ public static String downloadDependencies(String projectPath) {
pomDetailsResponse.getDependenciesDetails().getConnectorDependencies();
List integrationProjectDependencies =
pomDetailsResponse.getDependenciesDetails().getIntegrationProjectDependencies();
- List failedConnectorDependencies =
+ ConnectorDependencyDownloadResult connectorResult =
ConnectorDownloadManager.downloadDependencies(projectPath, connectorDependencies);
Node isVersionedDeployment = pomDetailsResponse.getBuildDetails().getVersionedDeployment();
boolean isVersionedDeploymentEnabled = isVersionedDeployment != null ?
Boolean.parseBoolean(isVersionedDeployment.getValue()) : false;
- DependencyDownloadResult integrationProjectResult =
+ IntegrationProjectDependencyDownloadResult integrationProjectResult =
IntegrationProjectDownloadManager.downloadDependencies(projectPath, integrationProjectDependencies,
isVersionedDeploymentEnabled);
StringBuilder errorMessage = new StringBuilder();
- if (!failedConnectorDependencies.isEmpty()) {
- String connectorError = "Some connectors were not downloaded: " + String.join(", ", failedConnectorDependencies);
- LOGGER.log(Level.SEVERE, connectorError);
- errorMessage.append(connectorError);
+ String connectorErrorMessage = buildConnectorErrorMessage(connectorResult);
+ if (!connectorErrorMessage.isEmpty()) {
+ errorMessage.append(connectorErrorMessage);
}
String integrationProjectsErrorMessage = buildIntegrationProjectsErrorMessage(integrationProjectResult);
@@ -97,7 +96,7 @@ public static String refetchIntegrationProjectDependencies(String projectPath) {
Node isVersionedDeployment = pomDetailsResponse.getBuildDetails().getVersionedDeployment();
boolean isVersionedDeploymentEnabled = isVersionedDeployment != null ?
Boolean.parseBoolean(isVersionedDeployment.getValue()) : false;
- DependencyDownloadResult result =
+ IntegrationProjectDependencyDownloadResult result =
IntegrationProjectDownloadManager.refetchDependencies(projectPath, integrationProjectDependencies,
isVersionedDeploymentEnabled);
@@ -110,11 +109,41 @@ public static String refetchIntegrationProjectDependencies(String projectPath) {
}
/**
- * Builds a human-readable error string from a {@link DependencyDownloadResult},
+ * Builds a human-readable error string from a {@link ConnectorDependencyDownloadResult},
+ * logging and concatenating each category of failure. Returns an empty string if
+ * there were no failures.
+ */
+ private static String buildConnectorErrorMessage(ConnectorDependencyDownloadResult result) {
+
+ StringBuilder errorMessage = new StringBuilder();
+
+ if (!result.getFailedDependencies().isEmpty()) {
+ String connectorError = "Some connectors were not downloaded: " +
+ String.join(", ", result.getFailedDependencies());
+ LOGGER.log(Level.SEVERE, connectorError);
+ errorMessage.append(connectorError);
+ }
+
+ if (!result.getFromIntegrationProjectDependencies().isEmpty()) {
+ String integrationProjectError = "Following connectors are provided by integration project dependencies" +
+ " and cannot be downloaded: " +
+ String.join(", ", result.getFromIntegrationProjectDependencies());
+ LOGGER.log(Level.SEVERE, integrationProjectError);
+ if (errorMessage.length() > 0) {
+ errorMessage.append(". ");
+ }
+ errorMessage.append(integrationProjectError);
+ }
+
+ return errorMessage.toString();
+ }
+
+ /**
+ * Builds a human-readable error string from a {@link IntegrationProjectDependencyDownloadResult},
* logging and concatenating each category of failure. Returns an empty string if
* there were no failures.
*/
- private static String buildIntegrationProjectsErrorMessage(DependencyDownloadResult result) {
+ private static String buildIntegrationProjectsErrorMessage(IntegrationProjectDependencyDownloadResult result) {
StringBuilder errorMessage = new StringBuilder();
diff --git a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/DependencyDownloadResult.java b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/IntegrationProjectDependencyDownloadResult.java
similarity index 62%
rename from org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/DependencyDownloadResult.java
rename to org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/IntegrationProjectDependencyDownloadResult.java
index 07b89858c..7af2abd7d 100644
--- a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/DependencyDownloadResult.java
+++ b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/IntegrationProjectDependencyDownloadResult.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
+ * Copyright (c) 2026, WSO2 LLC. (http://www.wso2.com).
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -17,20 +17,22 @@
import java.util.List;
/**
- * Encapsulates the results of dependency download operations.
+ * Encapsulates the results of integration project dependency download operations.
*
- * Contains two lists: dependencies that failed to download due to general errors,
- * and dependencies that failed due to missing or invalid descriptor.xml files.
+ * Contains three lists: dependencies that failed to download due to general errors,
+ * dependencies that failed due to missing or invalid descriptor.xml files, and
+ * dependencies whose versioning type does not match the current project.
*
*/
-public class DependencyDownloadResult {
+public class IntegrationProjectDependencyDownloadResult {
private List failedDependencies;
private List noDescriptorDependencies;
private List versioningTypeMismatchDependencies;
- public DependencyDownloadResult(List failedDependencies, List noDescriptorDependencies,
- List versioningTypeMismatchDependencies) {
+ public IntegrationProjectDependencyDownloadResult(List failedDependencies,
+ List noDescriptorDependencies,
+ List versioningTypeMismatchDependencies) {
this.failedDependencies = failedDependencies;
this.noDescriptorDependencies = noDescriptorDependencies;
this.versioningTypeMismatchDependencies = versioningTypeMismatchDependencies;
diff --git a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/IntegrationProjectDownloadManager.java b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/IntegrationProjectDownloadManager.java
index 02fd1ea32..57a3230ac 100644
--- a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/IntegrationProjectDownloadManager.java
+++ b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/IntegrationProjectDownloadManager.java
@@ -72,15 +72,16 @@ public class IntegrationProjectDownloadManager {
* @param isVersionedDeploymentEnabled indicates if versioned deployment is enabled in the parent project
* @return a result object containing any dependencies that failed to download or process
*/
- public static DependencyDownloadResult refetchDependencies(String projectPath, List dependencies,
+ public static IntegrationProjectDependencyDownloadResult refetchDependencies(String projectPath, List dependencies,
boolean isVersionedDeploymentEnabled) {
- LOGGER.log(Level.INFO, "Starting hard refresh of dependencies for project: " + new File(projectPath).getName());
+ LOGGER.log(Level.INFO, "Starting hard refresh of dependencies for project: " + new File(projectPath).getName()
+ + " with " + dependencies.size() + " dependencies");
return refetchDependencies(projectPath, dependencies, isVersionedDeploymentEnabled,
Path.of(System.getProperty(Constant.USER_HOME)));
}
- public static DependencyDownloadResult refetchDependencies(String projectPath, List dependencies,
+ public static IntegrationProjectDependencyDownloadResult refetchDependencies(String projectPath, List dependencies,
boolean isVersionedDeploymentEnabled, Path userHome) {
String projectId = new File(projectPath).getName() + UNDERSCORE + Utils.getHash(projectPath);
@@ -120,14 +121,14 @@ public static DependencyDownloadResult refetchDependencies(String projectPath, L
* @param isVersionedDeploymentEnabled indicates if versioned deployment is enabled in the parent project
* @return a list of dependency identifiers that failed to download or process
*/
- public static DependencyDownloadResult downloadDependencies(String projectPath, List dependencies,
+ public static IntegrationProjectDependencyDownloadResult downloadDependencies(String projectPath, List dependencies,
boolean isVersionedDeploymentEnabled) {
return downloadDependencies(projectPath, dependencies, isVersionedDeploymentEnabled,
Path.of(System.getProperty(Constant.USER_HOME)));
}
- public static DependencyDownloadResult downloadDependencies(String projectPath, List dependencies,
+ public static IntegrationProjectDependencyDownloadResult downloadDependencies(String projectPath, List dependencies,
boolean isVersionedDeploymentEnabled, Path userHome) {
String projectId = new File(projectPath).getName() + UNDERSCORE + Utils.getHash(projectPath);
@@ -184,7 +185,11 @@ public static DependencyDownloadResult downloadDependencies(String projectPath,
deleteObsoleteDownloadedFiles(downloadDirectory, expectedBaseNames);
deleteObsoleteExtractedDirs(extractDirectory, expectedBaseNames);
- return new DependencyDownloadResult(failedDependencies, noDescriptorDependencies, versioningMismatchDependencies);
+ LOGGER.log(Level.INFO, "Integration project dependency download completed for project: "
+ + new File(projectPath).getName() + ". Failed: " + failedDependencies.size()
+ + ", No descriptor: " + noDescriptorDependencies.size()
+ + ", Version mismatch: " + versioningMismatchDependencies.size());
+ return new IntegrationProjectDependencyDownloadResult(failedDependencies, noDescriptorDependencies, versioningMismatchDependencies);
}
/**
diff --git a/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/connector/downloader/ConnectorDownloadManagerTest.java b/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/connector/downloader/ConnectorDownloadManagerTest.java
index 23d23327d..9d7673989 100644
--- a/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/connector/downloader/ConnectorDownloadManagerTest.java
+++ b/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/connector/downloader/ConnectorDownloadManagerTest.java
@@ -14,10 +14,14 @@
package org.eclipse.lemminx.synapse.connector.downloader;
+import org.eclipse.lemminx.customservice.synapse.connectors.ConnectorHolder;
+import org.eclipse.lemminx.customservice.synapse.connectors.entity.Connector;
import org.eclipse.lemminx.customservice.synapse.parser.ConnectorDownloadManager;
import org.eclipse.lemminx.customservice.synapse.parser.DependencyDetails;
+import org.eclipse.lemminx.customservice.synapse.parser.ConnectorDependencyDownloadResult;
import org.eclipse.lemminx.customservice.synapse.parser.OverviewPageDetailsResponse;
import org.eclipse.lemminx.customservice.synapse.utils.Utils;
+import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.MockedStatic;
@@ -29,6 +33,7 @@
import static org.eclipse.lemminx.customservice.synapse.parser.pom.PomParser.getPomDetails;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mockStatic;
@@ -41,6 +46,15 @@ public class ConnectorDownloadManagerTest {
void setUp() {
connectorDownloadManager = new ConnectorDownloadManager();
utilsMock = mockStatic(Utils.class);
+ ConnectorHolder.getInstance().clearConnectors();
+ }
+
+ @AfterEach
+ void tearDown() {
+ ConnectorHolder.getInstance().clearConnectors();
+ if (utilsMock != null) {
+ utilsMock.close();
+ }
}
@Test
@@ -52,10 +66,32 @@ void downloadConnectorsWithValidDependencies() {
getPomDetails(projectPath, pomDetailsResponse);
List
connectorDependencies = pomDetailsResponse.getDependenciesDetails().getConnectorDependencies();
- List failedDependencies = connectorDownloadManager.downloadDependencies(projectPath, connectorDependencies);
- utilsMock.close();
+ ConnectorDependencyDownloadResult result = ConnectorDownloadManager.downloadDependencies(projectPath, connectorDependencies);
+
+ assertEquals(0, result.getFailedDependencies().size());
+ assertEquals(0, result.getFromIntegrationProjectDependencies().size());
+ }
+
+ @Test
+ void downloadConnectorsFromIntegrationProjectDependency() {
+ String path = ConnectorDownloadManagerTest.class.getResource("/synapse/pom.parser/test_pom_parser").getPath();
+ String projectPath = new File(path).getAbsolutePath();
+
+ // Simulate a connector already loaded from an integration project dependency (fromProject = false)
+ Connector dependencyConnector = new Connector();
+ dependencyConnector.setArtifactId("mi-connector-http");
+ dependencyConnector.setFromProject(false);
+ ConnectorHolder.getInstance().addConnector(dependencyConnector);
+
+ OverviewPageDetailsResponse pomDetailsResponse = new OverviewPageDetailsResponse();
+ getPomDetails(projectPath, pomDetailsResponse);
+ List connectorDependencies =
+ pomDetailsResponse.getDependenciesDetails().getConnectorDependencies();
+
+ ConnectorDependencyDownloadResult result = ConnectorDownloadManager.downloadDependencies(projectPath, connectorDependencies);
- assertEquals(0, failedDependencies.size());
+ assertTrue(result.getFromIntegrationProjectDependencies().stream().anyMatch(dep -> dep.contains("mi-connector-http")),
+ "Connector from integration project dependency should be marked as failed");
}
@Test
@@ -67,9 +103,8 @@ void downloadConnectorsWithInvalidDependencies() {
getPomDetails(projectPath, pomDetailsResponse);
List
connectorDependencies = pomDetailsResponse.getDependenciesDetails().getConnectorDependencies();
- List failedDependencies = connectorDownloadManager.downloadDependencies(projectPath, connectorDependencies);
- utilsMock.close();
+ ConnectorDependencyDownloadResult result = ConnectorDownloadManager.downloadDependencies(projectPath, connectorDependencies);
- assertFalse(failedDependencies.isEmpty());
+ assertFalse(result.getFailedDependencies().isEmpty());
}
}
diff --git a/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/parser/IntegrationProjectDownloadManagerTest.java b/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/parser/IntegrationProjectDownloadManagerTest.java
index 8aa277c5b..7ff2d9c7a 100644
--- a/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/parser/IntegrationProjectDownloadManagerTest.java
+++ b/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/synapse/parser/IntegrationProjectDownloadManagerTest.java
@@ -15,7 +15,7 @@
package org.eclipse.lemminx.synapse.parser;
import org.eclipse.lemminx.customservice.synapse.parser.DependencyDetails;
-import org.eclipse.lemminx.customservice.synapse.parser.DependencyDownloadResult;
+import org.eclipse.lemminx.customservice.synapse.parser.IntegrationProjectDependencyDownloadResult;
import org.eclipse.lemminx.customservice.synapse.parser.IntegrationProjectDownloadManager;
import org.eclipse.lemminx.customservice.synapse.utils.Constant;
import org.eclipse.lemminx.customservice.synapse.utils.Utils;
@@ -84,7 +84,7 @@ public void tearDown() throws IOException {
@Test
public void testEmptyDependencies_allResultListsEmptyAndDirectoriesCreated() {
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), Collections.emptyList(), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());
@@ -117,7 +117,7 @@ public void testDependencyNotInLocalRepo_addedToFailedList() {
utilsMock.when(() -> Utils.getHash(any())).thenCallRealMethod();
utilsMock.when(() -> Utils.deleteDirectory(any())).thenCallRealMethod();
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertEquals(1, result.getFailedDependencies().size());
@@ -147,7 +147,7 @@ public void testCarWithoutDescriptor_addedToNoDescriptorList() throws IOExceptio
Files.createDirectories(repoDir);
createZipWithoutDescriptor(repoDir, dep.getArtifact() + "-" + dep.getVersion() + ".car");
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertEquals(1, result.getNoDescriptorDependencies().size());
@@ -169,7 +169,7 @@ public void testCarWithVersioningMismatch_addedToVersioningMismatchList() throws
// Plant a .car with versionedDeployment=true in the local repo; parent has false
plantInLocalRepo(dep, true, Collections.emptyList());
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertEquals(1, result.getVersioningTypeMismatchDependencies().size());
@@ -196,7 +196,7 @@ public void testValidCarWithNoDeps_noFailures() throws IOException {
Path downloadDir = resolveProjectBaseDir().resolve(Constant.DOWNLOADED);
assertFalse(downloadDir.toFile().exists(), "downloadDir must not exist before the call");
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());
@@ -222,7 +222,7 @@ public void testValidCarWithTransitiveDep_noFailures() throws IOException {
Path downloadDir = resolveProjectBaseDir().resolve(Constant.DOWNLOADED);
assertFalse(downloadDir.toFile().exists(), "downloadDir must not exist before the call");
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(rootDep), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());
@@ -255,7 +255,7 @@ public void testCarAlreadyInDownloaded_localRepoNotConsulted() throws IOExceptio
long lastModifiedBefore = existingCar.toFile().lastModified();
// Nothing planted in local repo — if the code tries to fetch it would find nothing
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());
@@ -287,7 +287,7 @@ public void testZipAlreadyInDownloaded_localRepoNotConsulted() throws IOExceptio
long lastModifiedBefore = existingZip.toFile().lastModified();
// Nothing planted in local repo — if the code tries to fetch it would find nothing
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());
@@ -574,7 +574,7 @@ public void testGrowingDepList_existingFilesPreservedAndNewDepFetched() throws I
// newDep: fetched fresh from local repo (pre-extraction .car)
plantInLocalRepo(newDep, false, Collections.emptyList());
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(existingDep, newDep), false, tempHome);
// Extracted: existingDep's dir must be preserved
@@ -662,7 +662,7 @@ public void testDuplicateDependencyInList_processedOnlyOnce() throws IOException
Path downloadDir = resolveProjectBaseDir().resolve(Constant.DOWNLOADED);
assertFalse(downloadDir.toFile().exists(), "downloadDir must not exist before the call");
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(dep, dep), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());
@@ -691,7 +691,7 @@ public void testMultipleDependencies_onlyFailedOneReported() throws IOException
Path downloadDir = resolveProjectBaseDir().resolve(Constant.DOWNLOADED);
assertFalse(downloadDir.toFile().exists(), "downloadDir must not exist before the call");
- DependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.downloadDependencies(
projectRoot.toString(), List.of(goodDep, badDep), false, tempHome);
assertEquals(1, result.getFailedDependencies().size());
@@ -830,7 +830,7 @@ public void testRefetch_noPriorState_fetchesFromLocalRepo() throws IOException {
Path downloadDir = resolveProjectBaseDir().resolve(Constant.DOWNLOADED);
assertFalse(downloadDir.toFile().exists(), "downloadDir must not exist before the call");
- DependencyDownloadResult result = IntegrationProjectDownloadManager.refetchDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.refetchDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());
@@ -1013,7 +1013,7 @@ public void testRefetch_resultReflectsOnlyCurrentDeps() throws IOException {
DependencyDetails dep = makeDep("com.example", "dep-a", "1.0.0", "car");
plantInLocalRepo(dep, false, Collections.emptyList());
- DependencyDownloadResult result = IntegrationProjectDownloadManager.refetchDependencies(
+ IntegrationProjectDependencyDownloadResult result = IntegrationProjectDownloadManager.refetchDependencies(
projectRoot.toString(), List.of(dep), false, tempHome);
assertTrue(result.getFailedDependencies().isEmpty());