Here is the relations between my projects:
Spring boot project A -> Project B -> Project C
When I run a Maven:install
I want to have all the dependencies from Project B AND Project C in my lib folder.
The problem is that for now I just Have the dependencies from Project A...
I just have the spring-boot-maven-plugin
as build configuration without any argument...
Asked
Active
Viewed 4,180 times
0

bryce
- 842
- 11
- 35
-
When you run maven install on projects B and C the result of the build will be stored in the local maven repo, so you can use it in project A's POM as a normal dependency. Is that what you want? – Evgeni Dimitrov Mar 01 '16 at 15:50
-
Yes, it is what I am doing. I run maven install first on Project C, then on Project B and finally on Project A. But when I look in the lib folder of the Project A (a war) I do not find the dependencies from Project C. I see Project C but not it's dependencies... – bryce Mar 01 '16 at 15:53
-
Can you add your POM configuration please? I think we need to see it to really help you. Are you doing anything with "provided" scope where it means that the expectation is that the container provides the files at run-time? – Rob Baily Mar 01 '16 at 17:07
-
what version are you using of Maven – achabahe Mar 01 '16 at 17:39
-
you should use maven 2.0 or later – achabahe Mar 01 '16 at 17:40
2 Answers
0
you should use maven 2.0 or later to have your transitive dependencies imported . The dependencies in B and C should not have scope "provided" otherwise maven will not import them thinking that the server will provide them

achabahe
- 2,445
- 1
- 12
- 21
0
I finally find my mistake...
In the pom of the Project C, I had a dependency in scope system
and the system path was like ${basedir}/my/path/librairy.jar
. The problem is that Maven wants an absolute path for this librairy when I package Project B. I saw a warning in maven's logs that was saying that.
The solution was easy, I change the path for an absolute path and everything went fine! Except for the system librairy that is not packaged. I will put it on our Nexus and it will be fine.

bryce
- 842
- 11
- 35