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

can you build and deploy core only?

Avatar

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile
TB3dock
Level 4

06-04-2021

currently, I am doing mvn clean install -PautoInstallSinglePackage after each change to a class in core.

 

Is there a more efficient way?  I can build core with 

 

cd core

mvn install

 

but presumably this does not deploy to running local server.

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct Reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct Reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Rohit_Utreja
Level 4

06-04-2021

Hi @TB3dock ,

 

When you hit the command "mvn clean install", maven will clean the target folder during the build and place the latest jar after creating it again. So basically, this will update the jar with the new codebase.

 

Other than that, if you want to install only the OSGi bundle in the AEM instance, you can use the below command.

"mvn clean install -PautoInstallBundle".

 

Here, "-PautoInstallBundle" will install only the OSGi bundle in the AEM instance.

 

You need to deploy the OSGI bundle every time any code changes have been made.

otherwise, you can use Mockito framework to test your code with some dummy data before deploying it into the AEM. This will save your time to do the deployment every time. For this approach, you can create a test case and use some sample data for that.

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

551 likes

Total Posts

663 posts

Correct Reply

191 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

551 likes

Total Posts

663 posts

Correct Reply

191 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

06-04-2021

Hi @TB3dock 

You can use the below command to deploy only core.

mvn clean install -PautoInstallBundle

Ensure you have the profile configured with autoInstallBundle in pom.xml

 

Thanks!