Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.
SOLVED

error while running mvn clean install

Avatar

Level 1

 

NikhilGa_0-1727255213240.png

getting this error while running the mvn clean install command in terminal.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

can you check your port number in pom and what is the port that your instance is running on, they should be similar 

 

i can see that in your pom it's 4502 which means your instance must be running on something else check that it should be http://localhost:4502/ or check 4502 value in parent pom to the value on which your instance is running 

Abhishek Anand

View solution in original post

9 Replies

Avatar

Community Advisor

There is a unit test failure. Have you tried running the unit test individually?

Avatar

Level 1

no i haven't tried any unit test 

Avatar

Community Advisor

Then try to successfully run the unit tests. Hopefully, it will solve the issue then

Avatar

Community Advisor


as @Sady_Rifat mentioned try to run the unit test individually or you can skip the test cases as well using below command

mvn clean install -PautoInstallPackage -DskipTests

Abhishek Anand

Avatar

Level 1

NikhilGa_0-1727265067637.png


The command you have given worked really good later on i got up with this error

Could you please help out here?

 

Avatar

Correct answer by
Community Advisor

can you check your port number in pom and what is the port that your instance is running on, they should be similar 

 

i can see that in your pom it's 4502 which means your instance must be running on something else check that it should be http://localhost:4502/ or check 4502 value in parent pom to the value on which your instance is running 

Abhishek Anand

Avatar

Level 5

Hey can you check you instance is up and running as its now breaking while trying to install the package

Avatar

Community Advisor and Adobe Champion

Hi,

 

The error indicates that some unit tests are failing. This is the default behavior: the build fails if any test fails. Unless you fix the tests, you will continue to encounter this error. If this is a development (local) environment, you can temporarily skip or disable the tests(https://blog.marcnuri.com/junit5-how-to-disable-tests), as previously suggested, to continue working. However, this is not a definitive solution. Also, make sure the AEM instance is running while using the deploy command; otherwise, you will receive the "connection refused" error.

 

Hope this helps!



Esteban Bustamante

Avatar

Level 8

Your core pom is missing some dependencies needed to execute the test. Can you include this in your pom and try? The version will picked from the parent pom.

<dependency>
            <groupId>com.adobe.cq</groupId>
            <artifactId>core.wcm.components.core</artifactId>
            <scope>test</scope>
</dependency>