How to extend/customize a WAR with another project

后端 未结 5 1579
挽巷
挽巷 2021-02-06 01:03

We have the following scenario with our project:

  • A core web application packaged as a war file (call it Core project).
  • The need to \"customize\" or \"ext
5条回答
  •  面向向阳花
    2021-02-06 01:28

    You usually start from the Java source code. WARs don't include the Java source code, just the compiled classes under WEB-INF/classes or JARs under WEB-INF/libs.

    What I would do is use Maven and start a brand new empty webapp project with it: http://maven.apache.org/guides/mini/guide-webapp.html

    After you have the new empty project structure, copy the Java source code to it (src/main/java) and fill out the dependencies list in pom.xml.

    Once you've done all this you can use mvn clean package to create a standard WAR file that you can deploy to Tomcat.

提交回复
热议问题