views:

15

answers:

1
+1  Q: 

Maven dependency

Hi i have a quite simple question about maven dependency. I have 2 modules of one project. So first module is dependent on second. Second module has dependencies on some libs. Second module can be itself installed as standalone app. So when i build the project the first war will contain packaged second module as well as all libs that second module depends on.

I need that when i package first module the second module should be included without it's dependencies. How it is possible to manage?

Thx

A: 

I need that when i package first module the second module should be included without it's dependencies. How it is possible to manage?

Somehow, this is an hint that the dependencies of the 2nd module are provided when it gets packaged inside the war. IOW, declaring the dependencies of the 2nd module with a provided scope would do it, they wouldn't get pulled transitively.

Depending on how you create the standalone distribution of the 2nd module, you might need to combine dependencies scope with profiles, or not. Can't say since you didn't say anything about this :)

References

Pascal Thivent