简体   繁体   中英

WAR Dependency for maven

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.

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, ie 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM