• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Maven | Create an EAR module (ear file)
  1. Using the archetype "maven-archetype-quickstart"
  2. POM file (sample)

  1. Using the archetype "maven-archetype-quickstart"

    You have to modify the created project to adjust it to an EAR project:

    • In the file « pom.xml », change the « packaging » value to « ear » (if the packaging element is missing, add a new one)

    • In the file « pom.xml », add the configs of the plugin "maven-ear-plugin" (see bellow an example of the "pom.xml")

    • Clear the contents of the folder « src/main/ »

    • Clear the contents of the folder « src/test/ »

    • In the folder « src/main/ », add a new folder « application » (the contents of this folder will be added to the "ear" file of the application)

    • In the folder « application », you can add the folder « META-INF ».

    • In the folder « application », you can also add other configuration files specific to the application server where the EAR will be deployed.

  2. POM file (sample)

    Build the project:
© 2025  mtitek