Create AEM project using the AEM project archetype

Explore how to create a new AEM application project using the AEM Maven Project archetype, to align to best practices and accelerate the start of AEM development.

Hello and welcome everyone. My name is Abhishek Dwevedi. And in this video, we are going to learn about how we can create AEM Project using Archetype.
After completing this video, you should be able to create AEM project using Archetypes. Now we have got our AEM up and running, and we have already set up AEM in Java in our last video. The first thing that we need to do is, we need to add public profile to our AEM settings. For this I can go to my m2 folder, in my repository. For this we need to go to our .m2 folder in our maven, and we have to open the settings on the XML site. And, for, and we also have to add this public profile. So, this public profile is basically pointing to Adobe record so that it can download all the required dependencies from Adobe record.
Once we have configured the settings on XML file, the next thing is to identify the right AEM project archetype. For this, we can go to
And in here, you can find the documentation for AEM project archetype. The latest version that we have got as of now when we are recording the video is the archetype version 22. You can read about this archetype here. And once you are sure that you want to create a project using this archetype, you can simply copy this command. So, there are two versions identified, and you can just copy this command and it will be more interactive. The other option is to provide all these details by yourself. So, you can just pick up all this information and put that as an argument and provide the pages. So, for now I’ll just go with this small command and I will open my terminal. So, I am on desktop, and here what I’m going to do is I’m going to paste this command. And it has started scanning for projects to identify the right archetype. And then it will come to interactive mode and ask me some questions like the project name and all those details. So now you can see it is asking me to provide a group ID. So, for training purpose, what I am creating is from the Adobe group ID. And now it’s asking me for a version, it can provide a version or it can pick this default value, 1.0-SNAPSHOT. I just go with default value for now. You can provide apps, folder name. So, in this case, I’m calling it as training. So now it is automatically prompting me to choose this default artifact ID. But if you want, you can provide a new artifact ID. Again, I’ll go with defaults, and it’s again asking me another information like value for property package. I’ll skip this. And my name’s keeping this. It’s going to basically pick up this information as default value. If you want to change the name, you can provide a new name here, or new input here. So, I’m just going to select some of the default options. And now it’s asking me the site name, and in this one I just want to give a focus training. And in the end, it will just compile everything and ask me, okay, if these values are correct or not and I’ll simply say, Y which is yes. And now that’s going to create a project for me. Now, if I go back to my desktop I should be able to see a new project. As you can see here, It’s, there’s the folder, and there I have got my new project created.
Okay. So, let’s go back and let’s also try to deploy this project to our AEM. For that first of all, I need to go to that folder. So, I’ll cd to folder, and I’ll run a command, mvn clean install, P auto install package.
And now what it will do is, it will just build this project and deploy on AEM instance, which is running on port 4502.
Okay? So, once you get the success message you can go back to your AEM instance, and here you can just log in with credentials admin, admin. As user and password. Now we can go to sites and we should be able to see our training project there. So now here you can see we have got this training project, and it has got some sample structure as well.
And we can open its pages. Now you should be able to create AEM project using archetype. Thank you for watching this video. Have a great day. -