Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Maven commands for AEM | AEM Community Blog Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

23-11-2020

BlogImage.jpg

Maven commands for AEM by Kiran Vedantam

Abstract

 

What is Maven: Maven is an automation tool used to build and deploy the code for java applications. All the maven commands are supposed to be run in the command prompt (of course 😁)

How to check your maven version:

To run all the below mentioned commands, you need to have maven installed in your system (Pre-requisite 🤦 ). To check the version of your maven,

“mvn -v”

AEM and Maven:

In AEM maven is used to clean, build and install the code into different AEM instances. In this blog we will see various useful maven commands.

Cleaning the target directory code:

mvn clean

Cleaning and installing the code to a local repository:

mvn clean install

Note:

Generic maven commands are part of Maven life cycle [Ex: install]. They usually does not install your code in AEM. We need to use specific Maven plug-ins to achieve that.

Installing package (including bundle) into AEM instance:

mvn clean install -PautoInstallPackage

Installing only bundle into AEM instance:

mvn clean install -PautoInstallBundle

Adding the release version for your package via maven command:

mvn clean install -PautoInstallPackage -drelease.version=1.0.0

Skipping the unit tests written in java code during build:

Package build: mvn clean install -PautoInstallPackage -DskipTests
Bundle build: mvn clean install -PautoInstallBundle -DskipTests
Adding the profile in maven command:

mvn clean install -PautoInstallPackage -padobe-public

To build a single package:

mvn clean install -PbuildSinglePackage

To build and install single package on an AEM instance:

mvn clean install -PbuildSinglePackage -PautoInstallSinglePackage

Read Full Blog

Maven commands for AEM

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager

Replies

Avatar

Avatar
Validate 1
Level 6
KiranVedantam1992
Level 6

Likes

150 likes

Total Posts

155 posts

Correct Reply

44 solutions
Top badges earned
Validate 1
Establish
Give Back 3
Give Back
Boost 50
View profile

Avatar
Validate 1
Level 6
KiranVedantam1992
Level 6

Likes

150 likes

Total Posts

155 posts

Correct Reply

44 solutions
Top badges earned
Validate 1
Establish
Give Back 3
Give Back
Boost 50
View profile
KiranVedantam1992
Level 6

02-12-2020

Thanks, @kautuk_sahni  for sharing this. Can you please update it with the latest commands?

 

Thanks,

Kiran Vedantam.

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

02-12-2020

Thank you for writing this wonderful article. Keep the wonderful AEM community work going. Participate more here. I have also Update the content.