You can put common components in the library project and unpack them as needed using the dependency: unpack or dependency: unpack-dependencies
eg. you plan the project this way:
root
|____ common-lib (jar, contains common java code)
|____ common-gui (jar, contains only non-java stuff like js, jsp, css etc)
|____ client1 (war)
|____ client2 (war)
client1 client2 compile common-lib, provided common-gui ( dependency:unpack, )
-:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-common-gui-elements</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.yourcompany</groupId>
<artifactId>common-gui</artifactId>
<version>${project.version}</version>
<type>jar</type>
<outputDirectory>
${project.build.directory}/${project.build.finalName}
</outputDirectory>
<includes>**/*.jsp,**/*.css,**/*.js</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
, , , .