Deploying Code to AEM Instance
Clone AEM Project from GitHub:
- Navigate to the GitHub repository where the AEM project is hosted (prathaapmk/bt-sample (github.com)).
- Make sure you have Git installed on your local machine.
- Clone the repository to your local machine using the following command:
git clone <repository_url>
Replace
<repository_url>with the URL of the GitHub repository.Set Up Your Local Environment:
- Ensure that you have Java Development Kit (JDK) installed on your machine. AEM requires JDK to run.
- Download and install Apache Maven if you haven't already. Maven is used for building AEM projects.
- Install an Integrated Development Environment (IDE) such as IntelliJ IDEA or Eclipse if you prefer working with an IDE.
Configure AEM Project:
- Navigate to the directory where you cloned the AEM project.
- Update the necessary configuration files according to your local environment settings. This may include configurations related to AEM run modes, servlets, components, etc.
- Make sure to review and update any sensitive information like credentials or API keys stored in configuration files.
Build the AEM Project:
- Open a terminal or command prompt.
- Navigate to the root directory of your AEM project.
- Run the Maven build command to build the AEM project
mvn clean install
This command will compile the code, run tests, and package the project into an AEM package (
.zipfile).Deploy to AEM Instance:
- Manually Installing
- Access the AEM author instance where you want to deploy the project.
- Log in to the AEM author instance using your credentials.
- Once logged in, navigate to the Package Manager in AEM. This is typically located at
http://localhost:4502/crx/packmgr/index.jsp. - Upload the package (
*.zipfile) that was generated in the previous step using the Maven build. - After uploading the package, install it by clicking on the "Install" button.
- Once the installation is complete, activate the package to make it available on the AEM instance.
- Install using Profile
- mvn clean install -PautoInstallPackage
Verify Installation:
- Navigate to the appropriate section of your AEM instance (e.g., website, content fragments, etc.) to verify that the project components and configurations are working as expected.
Comments
Post a Comment