Maven scenarios to build with profile-specific dependencies causing 'Dependency resolution scenarios'
I'm relatively new to this, so bear with me... Iām working with a dependency resolution scenario when trying to build my Maven project using a specific profile. I have a multi-module project where I defined a profile in my `pom.xml` to include certain dependencies only when that profile is active. However, when I attempt to execute `mvn clean install -PmyProfile`, I get the following behavior: ``` [behavior] Failed to execute goal on project my-module: Could not resolve dependencies for project com.example:my-module:jar:1.0-SNAPSHOT: Failure to find com.example:custom-lib:jar:2.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced ``` This is particularly strange because `custom-lib` is defined in the profile like this: ```xml <profiles> <profile> <id>myProfile</id> <dependencies> <dependency> <groupId>com.example</groupId> <artifactId>custom-lib</artifactId> <version>2.0</version> </dependency> </dependencies> </profile> </profiles> ``` I have verified that `custom-lib` version 2.0 exists in my local repository, and I can see it in the `.m2/repository/com/example/custom-lib/2.0` directory. I have also tried running `mvn clean install -U` to force an update, but the same behavior continues. Additionally, I checked my `settings.xml` for any repository configuration that might interfere, but I only have the default Maven Central set up. I even tried rebuilding the project from scratch, but no luck. Any insights on why the profile might not be recognizing the dependency correctly? The project is a desktop app built with Java. My development environment is CentOS.