You can create the structure of an EJB project with Maven.
1. Open cmd
2. Enter the content
MVN Archetype:generate-darchetypegroupid=org.codehaus.mojo.archetypes-darchetypeartifactid=pom-root- Darchetypeversion=1.1-darchetyperepository=http://repo.maven.apache.org/maven2-dgroupid=com.xxx-dartifactid= Yyy-dversion=1.0-snapshot-dpackage=zzz-dbasedir=www-darchetype.interactive=false--batch-mode
The XXX section is the group ID of your project, for example: Com.rickqin
The YYY section is the name of your project, for example: TESTEJB
The ZZZ section is the default package name for EJB sub-projects, for example: COM.RICKQIN.TESTEJB
The WWW section is the directory where the project is located, for example: D:\Examples
--batch-mode This option, only works at-darchetype.interactive=false time, and its role is to run manve in a non-interactive, continuous integration environment.
Build a good project structure as shown:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/89/wKiom1YAv2Kg242CAABTPU--9YI162.jpg "title=" Image 1.png "alt=" Wkiom1yav2kg242caabtpu--9yi162.jpg "/>
A parent project with 3 sub-modules. The ear project is used to ASSEMBLY,EJB the Java Web Project to provide EJB Service,web, which provides the user interface and other front-end functions. As a matter of principle, there should also be a ejb-client, which specifies that the client is automatically generated when the MAVEN build EJB project, or you can manually add one yourself. If you add it manually, don't forget to set up the project and add the project to the parent's sub module.
This article is from the "Bitterjava" blog, make sure to keep this source http://rickqin.blog.51cto.com/1096449/1697003
MAVEN Create EJB Project structure