When I run the maven project in Jenkins, I am getting the following error. I am new to this maven project, any help will be appreciated. Thank you
[ERROR] Error when generating sources.
org.apache.maven.plugin.MojoExecutionException:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.614s
[INFO] Finished at: Tue Sep 08 11:56:39 IST 2015
[INFO] Final Memory: 16M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:generate-sources (default-generate-sources) on project PowerMeter: MojoExecutionException: ANDROID-040-001: Could not execute: Command = cmd.exe /X /C "D:\android-sdks\build-tools\23.0.0_rc3\aapt.exe package -f --no-crunch -I D:\android-sdks\platforms\android-22\android.jar -M E:\Jenkin\.jenkins\jobs\powermeter\workspace\PowerMeter\AndroidManifest.xml -S E:\Jenkin\.jenkins\jobs\powermeter\workspace\PowerMeter\res -A E:\Jenkin\.jenkins\jobs\powermeter\workspace\PowerMeter\target\generated-sources\combined-assets\assets -m -J E:\Jenkin\.jenkins\jobs\powermeter\workspace\PowerMeter\target\generated-sources\r --output-text-symbols E:\Jenkin\.jenkins\jobs\powermeter\workspace\PowerMeter\target --auto-add-overlay", Result = 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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
[JENKINS] Archiving E:\Jenkin\.jenkins\jobs\powermeter\workspace\PowerMeter\pom.xml to com.maetree.powermeter/PowerMeter/2.0.0/PowerMeter-2.0.0.pom
channel stopped
I have my pom.xml content below
<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 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.maetree.powermeter</groupId>
<artifactId>PowerMeter</artifactId>
<packaging>apk</packaging>
<version>2.0.0</version>
<name>app_name</name>
<url>http://maven.apache.org</url>
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<app.version.code>2</app.version.code>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version>5.1.1</platform.version>
<android.plugin.version>3.8.2</android.plugin.version>
<projectVersion>2.0.0</projectVersion>
<packagingType>apk</packagingType>
<android.maven.version>3.8.2</android.maven.version>
<abs.version>4.3.1</abs.version>
<dagger.version>1.0.1</dagger.version>
<otto.version>1.3.4</otto.version>
<gson.version>2.2.4</gson.version>
<menudrawer.version>3.0.2</menudrawer.version>
<android.sdk.path>D:\android-sdks</android.sdk.path>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.8.2</version>
<extensions>true</extensions>
<configuration>
<sdk>
<platform>22</platform>
<path>D:\android-sdks</path>
</sdk>
<emulator>
<avd>demodevice</avd>
<wait>100000</wait>
<options>-no-skin</options>
</emulator>
<zipalign>
<verbose>true</verbose>
</zipalign>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.0.1.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
This is the first time i am using maven project
Its says it can't execute D:\android-sdks\build-tools\23.0.0_rc3\aapt.exe. Have you tried running that full command from the command line?
DId you try running maven locally?
This is not a jenkins problem. This is your maven build failing
Related
It's my first time trying out maven and I can't understand why I keep getting classnotfoundexception every time I am trying to build. This is the error I am receiving:
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------------< owmapi:owmapi >----------------------------
[INFO] Building OwmAPICase 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) # owmapi ---
[WARNING]
java.lang.ClassNotFoundException: owmapi.Main
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:435)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:246)
at java.base/java.lang.Thread.run(Thread.java:832)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.582 s
[INFO] Finished at: 2021-02-28T14:09:17+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project owmapi: An exception occured while executing the Java class. owmapi.Main -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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
And this is my 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>owmapi</groupId> <!-- case.se.ctk -->
<artifactId>owmapi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>OwmAPICase</name>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<mainClass>owmapi.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/net.aksingh/owm-japis -->
<dependency>
<groupId>net.aksingh</groupId>
<artifactId>owm-japis</artifactId>
<version>2.5.3.0</version>
</dependency>
</dependencies>
</project>
Everything works fine if i simply run the project as a java application in eclipse but for some reason it won't work with maven. I guess the problem lies in mainClass in my pom but I've tried several solutions to no avail.
I think your main class have some dependencies on the jar mentioned in the pom.xml. You're simply creating a target jar which doesn't have those dependencies included. You need to create the uber/fat jar which include all the relevant dependencies. You can use this following plugin maven-assembly-plugin for creating the target jar.
Assumption: Main.java class is under package owmapi.
<build>
<finalName>owmapi</finalName>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>owmapi.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
My Maven is failing with the following error:
[ERROR] Failed to execute goal on project sdcf4j-twitch: Could not resolve dependencies for project com.github.twitch4j:sdcf4j-twitch:jar:1.0.9: Failed to collect dependencies at com.github.twitch4j:twitch4j:jar:v0.10.2 -> org.projectlombok:lombok:jar:+: Failed to read artifact descriptor for org.projectlombok:lombok:jar:+: Could not transfer artifact org.projectlombok:lombok:pom:+ from/to jitpack.io (https://jitpack.io): Transfer failed for https://jitpack.io/org/projectlombok/lombok/+/lombok-+.pom 400 Bad Request -> [Help 1]
I already tried completely wiping Intellij IDEA's files, and re-adding the dependencies, which didn't help with the error, but some wrong dependencies, that my IDE displayed.
Of course I already tried without any lombok plugin, (lombok) annotation paths and a mvn clear, but that didn't help either.
The Maven code for that project is the following:
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.btobastian.sdcf4j</groupId>
<artifactId>sdcf4j</artifactId>
<version>1.0.9</version>
</parent>
<groupId>com.github.twitch4j</groupId>
<artifactId>sdcf4j-twitch</artifactId>
<version>1.0.9</version>
<repositories>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
</path>
</annotationProcessorPaths>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Include source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Include JavaDocs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.2</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<stylesheet>java</stylesheet>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- The core module -->
<dependency>
<groupId>de.btobastian.sdcf4j</groupId>
<artifactId>sdcf4j-core</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.twitch4j</groupId>
<artifactId>twitch4j</artifactId>
<version>v0.10.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
The Parent Pom does not differ from the original at https://github.com/Bastian/sdcf4j/blob/8f569ee5dc36be09c6595c12833d109b7127c23e/pom.xml.
If one sets up the folders correctly, you can add sdcf4j-twitch as a module in sdcf4j, just like sdcf4j-core,sdcf4j-discord4j in L17
Complete Build log:
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.github.twitch4j:sdcf4j-twitch >------------------
[INFO] Building sdcf4j-twitch 1.0.9
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from jitpack.io: https://jitpack.io/org/projectlombok/lombok/+/lombok-+.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.968 s
[INFO] Finished at: 2020-12-10T22:55:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sdcf4j-twitch: Could not resolve dependencies for project com.github.twitch4j:sdcf4j-twitch:jar:1.0.9: Failed to collect dependencies at com.github.twitch4j:twitch4j:jar:v0.10.2 -> org.projectlombok:lombok:jar:+: Failed to read artifact descriptor for org.projectlombok:lombok:jar:+: Could not transfer artifact org.projectlombok:lombok:pom:+ from/to jitpack.io (https://jitpack.io): Transfer failed for https://jitpack.io/org/projectlombok/lombok/+/lombok-+.pom 400 Bad Request -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/DependencyResolutionException
I'm trying to create a gRPC service with Java using below codelab.
I created a sample proto file. While compiling the .proto using maven, i got a build failure error. It says javax.annotation.Generated anottation class is not found.
Could you help me find the root cause of the issue and steps to fix it. I feel it should be a versioning issue but not clear on how to solve it.
https://codelabs.developers.google.com/codelabs/cloud-grpc-java/index.html?index=..%2F..index#2
Errors:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/grpc_hello_server/target/generated-sources/protobuf/grpc-java/com/example/grpc/GreetingServiceGrpc.java:[20,18] cannot find symbol
symbol: class Generated
location: package javax.annotation
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.845 s
[INFO] Finished at: 2020-06-29T16:56:21-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project grpc_hello_server: Compilation failure
[ERROR] /home/grpc_hello_server/target/generated-sources/protobuf/grpc-java/com/example/grpc/GreetingServiceGrpc.java:[20,18] cannot find symbol
[ERROR] symbol: class Generated
[ERROR] location: package javax.annotation
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoFailureException.
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 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.grpc</groupId>
<artifactId>grpc_hello_server</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>grpc_hello_server</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.7.0</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.2</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.4.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.7.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Issue is due to missing dependency in pom.xml for Java 9+
<dependency> <!-- necessary for Java 9+ -->
<groupId>org.apache.tomcat</groupId>
<artifactId>annotations-api</artifactId>
<version>6.0.53</version>
<scope>provided</scope>
</dependency>
Any reason you are using Java 1.6?
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
Can you change it to 1.7 and see if it works?
So whatever I do I can't get my project to run on my mac. But the project seems to run fine on my colleagues pc's. Is there something i'm not seeing in my pom file? I keep getting this error,
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
(default-cli) on project got-team20: Command execution failed. Process
exited with an error: 1 (Exit value: 1) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e
switch. Re-run Maven using the -X switch to enable full debug logging.
I have maven 3.5.0 installed on my mac, but i don't know if that can be a issue? I have also tried three different ide's, so the problem is not there.
My pom file:
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.gameoftrades</groupId>
<!-- Change Me -->
<artifactId>got-team20</artifactId> <!-- got-teamNN -->
<!-- -->
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Game of Trades Student Starter Kit</name>
<description>Student starter kit for Game of Trades</description>
<inceptionYear>2016</inceptionYear>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>42 BV</name>
<url>http://blog.42.nl/</url>
</organization>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<got.version>0.3.0</got.version>
<junit.version>4.11</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>io.gameoftrades</groupId>
<artifactId>gameoftrades-library</artifactId>
<version>${got.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
This is the full error i have when i run it with the -e switch.
[ERROR] Failed to execute goal
org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on
project got-team20: The parameters 'mainClass' for goal
org.codehaus.mojo:exec-maven-plugin:1.6.0:java are missing or invalid
-> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java
(default-cli) on project got-team23: The parameters 'mainClass' for
goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java are missing or
invalid...
So i guess something is wrong with the plugins i am using.
I'm running a set of tests on jenkins and I get the following:
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:39 min
[INFO] Finished at: 2014-07-21T16:33:14-07:00
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project barcoAutomation: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Code\Maven\.\Maven\barcoAutomation\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoFailureException
[INFO] Build failures were ignored.
[Maven] $ cmd /c call C:\Windows\TEMP\hudson8319915807901667722.bat
Well something tells me the line: maven-surefire-plugin:2.16 is the issue here, so here is my pom file for examination:
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.barco.automation</groupId>
<artifactId>barcoAutomation</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>barcoAutomation</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<!-- added -->
<!-- <suiteFile>src/test/resources/barcoColor.xml</suiteFile> <suiteFile>src/test/resources/GeneralSettings.xml</suiteFile> -->
</properties>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
</dependency>
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.42.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.10-FINAL</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/barcoGeneralSettings.xml</suiteXmlFile>
<!-- <suiteXmlFile>${suiteFile}</suiteXmlFile> -->
</suiteXmlFiles>
<!--<suiteXmlFile>src/test/resources/GeneralSettings.xml</suiteXmlFile>
<suiteXmlFiles> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
<suiteXmlFile>src/test/resources/NewFile.xml</suiteXmlFile> <suiteXmlFile>src/test/resources/barcoColor.xml</suiteXmlFile>
</suiteXmlFiles> -->
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/test/resources/</directory>
</resource>
</resources>
</build>
</project>
I've checked the plugin in maven repository and the only difference I see is that I have the plugin in the plugin tag and in the website it is in the dependecy tag.
What could be the error here?
Thanks
NOTE: sorry for the plain text, but I don't know how to put color on the code =/
The maven command ran successfully, however one of your 5 tests failed.
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0
A failed test will cause the build to "fail"
Take a look in:
C:\Code\Maven\.\Maven\barcoAutomation\target\surefire-reports
And see which test failed and why.