There is a web module, it works, everything starts ... I created the second web-new module. Ideally, I want to make it a successor from just the web and, for example, rewrite one page or in the future a class like. How can this be implemented? For example, created a repository https://github.com/Piom/level_app

  • And what purpose are you pursuing with this or, in other words, what task are you trying to solve? - Slava Semushin
  • There are 2 web modules, varying by state, one module almost completely copies the other, but there are some changes on the web muzzle .. then these modules will not be 2 but 5 .. and roughly there is a basic part, and for each state there is customization. - AlexK

1 answer 1

Basically pom.xml describes the modules:

<modules> <module>web</module> <module>web-new</module> </modules> 

Then, when building, we include or redefine files or packages from the web, for example, as it looked to me:

 <build> <finalName>level_app</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <overlays> <overlay> <groupId>ru.piom.mvc.level</groupId> <artifactId>web</artifactId> <excludes> <exclude>пример/пути/файл.java</exclude> </excludes> <packagingExcludes>**/address/**/*.*</packagingExcludes> </overlay> </overlays> </configuration> </plugin> </plugins> </build> 

This file, which is registered from the web, will be taken from the web-new, if available. In any case, look towards build> configeration> overlays