You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Ram Pandey <ra...@gmail.com> on 2020/10/08 12:18:24 UTC
Issue with maven-dependency-plugin
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
Re: Issue with maven-dependency-plugin
Posted by Robert Scholte <rf...@apache.org>.
This is a typical question for the maven users list or stack overflow, but I'll give it a shot:
plugin configuration is based on inheritence through parents.
If ../third-project/other-project doesn't inherit this parent, and it probably doesn't because of its path, it won't have its configuration.
thanks,
Robert
On 10-10-2020 09:41:57, Ram Pandey <ra...@gmail.com> wrote:
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.
my-project
another-project
../third-project/other-project
Below, I have mentioned the dependency plugin, that, I have used
org.apache.maven.plugins
maven-dependency-plugin
3.1.2
copy-dependencies-main
prepare-package
copy-dependencies
${maven.libs}/${project.module}
runtime
true
Suggestions will be highly appreciated
Thanks,
Ram