Hello Experts,

I am using the maven dependency plugin in parent pom.xml  to copy the
dependency of all subprojects.

It does not copy dependencies for the project, which is outside parent
project directory.

For an example, It does not copy the dependency of project "
third-project/other-project "  in below mentioned module.


<modules>
<module>my-project</module>
 <module>another-project</module>
<module>../third-project/other-project</module>
</modules>

Below, I have mentioned the dependency plugin, that, I have used

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy-dependencies-main</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${maven.libs}/${project.module}</outputDirectory>
<includeScope>runtime</includeScope>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>

Suggestions will be highly appreciated

Thanks,
Ram

Reply via email to