I have following structure in project
| prj
| a1_module
|src
|pom
| a2_module
|src
|pom
| lib
xyz.jar
|pom(parent)
Now i register xyz.jar in sub module(a1_module) pom like this:
<dependency>
<groupId>com.asd.prj</groupId>
<artifactId>pubsub</artifactId>
<version>1.0.0.</version>
<scope>system</scope>
<systemPath>${project.parent.basedir}/lib/pubsub_2.11-1.0.0-SNAPSHOTjar</systemPath>
</dependency>
I expect ${project.parent.basedir}/lib/pubsub_2.11-1.0.0-SNAPSHOTjar
should give me prj/lib/pubsub_2.11-1.0.0-SNAPSHOTjar
but it gives me path like this prj/a1_module/lib/pubsub_2.11-1.0.0-SNAPSHOTjar
.
Beacuse of this situtaion i get error as there is no jar kept in sub-module but its kept outside in "lib" directory of main project.
This question says that project.parent.basedir
should give path of parent of that module path but in my case its giving me path of submodule rather parent module path.
Any suggestion that what i am doing wrong or what is other way to register my local jar in submodules.