I have a project called Parent. His type is POM. There is a library ( ojdbc6.jar ) that is not available in the open repository, so I access it through <SystemPath> , as you can see below pom.xml :
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.Parent</groupId> <artifactId>Parent</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>childModule</module> </modules> <dependencies> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc</artifactId> <version>6</version> <scope>system</scope> <systemPath>${basedir}/lib/ojdbc6.jar</systemPath> </dependency> </dependencies> <repositories> <repository> <id>in-project</id> <name>In Project Repo</name> <url>file://${basedir}/lib</url> </repository> </repositories>
Now the names of the child projects Child-Module1 and Child-Module2 use this library ( ojdbc6.jar ). POM is listed below:
<project> <modelVersion>4.0.0</modelVersion> <artifactId>testApp</artifactId> <version>1.14.5.1-SNAPSHOT</version> <packaging>war</packaging> <name>APP1</name> <description>Application</description> <parent> <groupId>com.Parent</groupId> <artifactId>Parent</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> </project>
When I build using Maven, this gives me an error:
Description Resource Path Location Type The container 'Maven Dependencies' references non existing library 'C:\Users\ABCCOMPUTER_NAME\.m2\repository\com\oracle\ojdbc\6\ojdbc-6.jar' testApp Build path Problem.
Why does it look in the local repository? This only happens when the parent project contains a library ( jar ) that contains the system path. This does not happen when the access path library ( jar ) in the same project as the parent, referencing ojdbc6.jar , is good there.
source share