Expand my Community achievements bar.

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
Level 7

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 

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

Community Advisor

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

Avatar

Level 7


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

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
Level 7

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 

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

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 5

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>