I have a project with <packaging>
as WAR
.
I want to add this project as a dependency in another project.
I've done bit digging on some threads like Maven WAR dependency
But nothing works for me.
Any help would be really appreciated.
Asked
Active
Viewed 89 times
0

Community
- 1
- 1

Saurabh Sharma
- 489
- 5
- 20
-
WAR's weren't meant be added as dependencies. You will probably have to write your own classloader because of structural differences in between jar's and war's. – Dhrubajyoti Gogoi Apr 09 '14 at 11:08
1 Answers
1
I assume you want to use the classes from your war project in another (non war) project.
WAR projects as dependencies makes only sense for overlays, i.e. when you want to include the resources of one WAR file in another WAR file (usually not the classes).
What you can and should do is remove the source code from your WAR project into a separate JAR project, which in turn is included in both (your origional WAR project and your other project) projects as a dependency.

blackbuild
- 5,026
- 1
- 23
- 35