CodexBloom - Programming Q&A Platform

Eclipse 2023-09: how to to Resolve Maven Dependencies with Custom Repository Configuration

👀 Views: 227 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-12
Maven Eclipse Artifactory Java

I'm integrating two systems and I've encountered a strange issue with Quick question that's been bugging me - Quick question that's been bugging me - I'm working with an scenario in Eclipse 2023-09 where my Maven project fails to resolve dependencies from a custom repository... The pom.xml is correctly configured to point to our internal Artifactory instance, but when I try to build the project, I encounter the following behavior: ``` Failed to execute goal on project my-app: Could not resolve dependencies for project com.example:my-app:jar:1.0-SNAPSHOT: Could not find artifact com.example:my-library:jar:1.2.3 in my-internal-repo (http://artifactory.example.com/artifactory/repo) -> [Help 1] ``` I've tried updating the Maven settings in Eclipse to include the custom repository under the `<repositories>` section: ```xml <repositories> <repository> <id>my-internal-repo</id> <url>http://artifactory.example.com/artifactory/repo</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> ``` Additionally, I have confirmed that the artifact `my-library` version `1.2.3` exists in Artifactory and is available. I also tried running `mvn clean install` from the command line, which works fine, so the scenario might be specific to Eclipse. I've checked that my Eclipse has the latest Maven Integration (m2e) plugin version and tried refreshing the project several times. The project uses JDK 17 and the Maven version is 3.8.5. Is there something I'm missing in the Eclipse settings or configurations that could prevent it from recognizing the custom Maven repository? Any help would be appreciated! For context: I'm using Java on macOS. How would you solve this? For context: I'm using Java on Ubuntu 20.04. I'd be grateful for any help.