I am working on Maven project and I have a jar app-client.jar which have dependency on app-core.jar. So I have a pom.xml for app-client.jar and that pom.xml has dependency of app-core so we added dependency of app-core in this pom.xml. Now I wanna use the app-client.jar in my main project. Because this jar is build locally and not available at remote repository. So I did add the app-client and also specify the location repository where it will located. as following..
<repositories> <repository> <id>repo</id> <releases> <enabled>true</enabled> <checksumPolicy>ignore</checksumPolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> <url>file://${project.basedir}/../lib</url> </repository> <repositories> <dependencies> <dependency> <groupId>com.sample</groupId> <artifactId>app-client</artifactId> <version>1.0</version> </dependency> </dependencies>
and also I put my jar as following [My Module] / [com] / [sample] /[app-client] /[1.0]/app-client-1.0.jar
When I run mvn clean install I got error app-client's pom.xml not found. and build get failed. Usually when I use single jar then its working fine, but if I use jar having dependency with other jar it getting failed.
So how can I build my app-client jar and their pom so that it behave normal and also deploy app-core.jar too.