while after executing mvn clean install commands, the build fails and gets MojoExecutionException. What would be the cause?
Console output:
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /home/faisal/.jenkins/workspace/OpenCartAutomationJob/pom.xml clean install
[INFO] Scanning for projects...
[INFO]
[INFO] -----------< TestAutomationSessions:TestAutomationSessions >------------
[INFO] Building TestAutomationSessions 0.0.1-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ TestAutomationSessions ---
[INFO] Deleting /home/faisal/.jenkins/workspace/OpenCartAutomationJob/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ TestAutomationSessions ---
[INFO] skip non existing resourceDirectory /home/faisal/.jenkins/workspace/OpenCartAutomationJob/src/main/resources
[INFO]
[INFO] --- compiler:3.8.1:compile (default-compile) @ TestAutomationSessions ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 17 source files to /home/faisal/.jenkins/workspace/OpenCartAutomationJob/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.705 s
[INFO] Finished at: 2023-10-16T12:34:43+05:30
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project TestAutomationSessions: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x453ca7df) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x453ca7df -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[JENKINS] Archiving /home/faisal/.jenkins/workspace/OpenCartAutomationJob/pom.xml to TestAutomationSessions/TestAutomationSessions/0.0.1-SNAPSHOT/TestAutomationSessions-0.0.1-SNAPSHOT.pom
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
channel stopped
[OpenCartAutomationJob] $ /home/faisal/.jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure/bin/allure generate -c -o /home/faisal/.jenkins/workspace/OpenCartAutomationJob/allure-report
allure-results does not exist
Report successfully generated to /home/faisal/.jenkins/workspace/OpenCartAutomationJob/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /home/faisal/.jenkins/workspace/OpenCartAutomationJob/reports to /home/faisal/.jenkins/jobs/OpenCartAutomationJob/builds/11/htmlreports/HTML_20Report
ERROR: Specified HTML directory '/home/faisal/.jenkins/workspace/OpenCartAutomationJob/reports' does not exist.
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
testng-results.xml was last modified before this build started. Ignoring it.
Saving reports...
Found matching files but did not find any TestNG results.
Finished: FAILURE
pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Nov2022POMSeries</groupId>
<artifactId>Nov2022POMSeries</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<extentreports-version>5.0.8</extentreports-version>
<aspectj.version>1.9.19</aspectj.version>
<allure.version>2.22.1</allure.version>
</properties>
<!-- <distributionManagement>
<snapshotRepository>
<id>nexus-snapshots</id>
<url>http://admin:admin123@localhost:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement> -->
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.11.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>openxml4j</artifactId>
<version>1.0-beta</version>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>${extentreports-version}</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>${allure.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.14.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.14.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testrunners/testng_regression.xml</suiteXmlFile>
<!-- <suiteXmlFile>${suiteXmlFile}</suiteXmlFile> -->
</suiteXmlFiles>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin> -->
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<reportVersion>${allure.version}</reportVersion>
<resultsDirectory>${project.basedir}/allure-results</resultsDirectory>
</configuration>
</plugin>
</plugins>
</reporting>
</project>