Customizing The Context Root

The sample below shows how to customize the context root of an artifact to be placed in the EAR file:

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.apache.maven.plugins</groupId>
  5. <artifactId>maven-ear-plugin</artifactId>
  6. <version>3.3.0</version>
  7. <configuration>
  8. [...]
  9. <modules>
  10. <webModule>
  11. <groupId>artifactGroupId</groupId>
  12. <artifactId>artifactId</artifactId>
  13. <contextRoot>/custom-context-root</contextRoot>
  14. </webModule>
  15. </modules>
  16. </configuration>
  17. </plugin>
  18. </plugins>
  19. </build>