This is something that has been asked on this forum and other places as well and whilst I have following some of the guides online. I am not being able to find add a new project as a maven dependency into a main project
I have a main_project(comprised of multiple modules and poms) I have created a new_project that looks like this
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.project.package</groupId>
<artifactId>clientinterface</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
I did a mvn clean install
on the new project and can see it in the .m2 local repository folder
I have then added the above dependency in the pom file of the main_project The import is successful and I can also see the dependency in the External Libraries section of intelliJ
However, when I try to instantiate a class from this new dependency, it doesn't find the new dependency that I've added
I believe it's not finding the class path but I'm not sure if there are further steps required to update that
As a precaution I also did the following on the new project
mvn clean install
and maven > Generate sources and update folders in intelliJ
What am I missing?