Prerequisites
1, why to use two War a call to a package?
because weMavenitems perWarThe package is a line, the front desk withEasyui, and each line has to be referencedEasyuirelated toJS,CSS, and there are some other styles. In order to pull out these repetitive things, I hit aWarbag, put these things in.
2. Why not use Jar where's the bag?
hit a common jar Package, the resources into the, but can not be quoted. Time was urgent and no other solution was tried. The final War package is implemented.
Realize
1 , where you need to reference the resource Web layer joins the following dependencies:
<!--for Unified control version--><easyui.version>0.0.1-snapshot</easyui.version><dependency><groupid >com.tgb</groupid><artifactid>itoo-easyui</artifactid><version>${easyui.version} </version> <type>war</type></dependency>
type type is War form, representing the time to pack the appropriate resources into the present Web project, which exists in the following form,
Rather than a War the form of the package is presented.
2 , in their own JSP page Add Reference
<% @include file= "/common.jsp"%>
with include label.
So we put web war jsp file, but if we need to reference the class file inside, then we need to refer to the war inside pom file add a default value as follows:
<build><plugins><plugin><artifactId>maven-war-plugin</artifactId>< configuration><attachclasses>true</attachclasses></configuration></plugin></ Plugins></build>
Summarize:
by playing into a war package, so that our repetitive things are greatly reduced, fully embodies the characteristics of encapsulation, reusability. We always make progress in the constant abstraction, and the project is getting better.
Maven Combat-Two war package calls