0

I have created a Maven Project to run my automation scripts. When I try to run from CMD or eclipse, I see below log trail but the project is not being executed. kindly let me know where is the issue. Also find the pom.xml of my project

I am using Java and Selenium to run the automation scripts and created Maven Project to integrate with Jenkins.

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< Epic2Maven:Epic2Maven >-----------------------  
[INFO] Building Epic2KSA 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.jenkins-ci.plugins.workflow:workflow-step- 
api:jar:1.15
is missing, no dependency information available
[WARNING] The POM for org.kohsuke:groovy-sandbox:jar:1.10 is missing, no 
dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
Epic2Maven
---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered 
resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Epic2Maven -- 
-
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
Epic2Maven ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered 
resources,
i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
Epic2Mven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Epic2Maven ---
[INFO] ---------------------------------------------------------------------- 
 --
[INFO] BUILD SUCCESS
[INFO] ---------------------------------------------------------------------- 
 --
[INFO] Total time: 1.529 s
[INFO] Finished at: 2018-07-23T11:29:13+04:00
[INFO] ---------------------------------------------------------------------- 
  --

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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>Epic2Maven</groupId>
  <artifactId>Epic2Maven</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>Epic2KSA</name>
  <description>Epic2Maven</description>

  <dependencies> 
 <dependency> 
 <groupId>junit</groupId> 
 <artifactId>junit</artifactId>
 <version>4.12</version> 
 <scope>test</scope> </dependency> 
 <dependency>
 <groupId>org.seleniumhq.selenium</groupId> 
 <artifactId>selenium-java</artifactId>
 <version>2.53.0</version>
 </dependency>

 <dependency>
 <groupId>info.cukes</groupId>
 <artifactId>cucumber-java</artifactId>
 <version>1.2.4</version> 
 <scope>test</scope>
 </dependency> 

 <dependency> 
 <groupId>info.cukes</groupId> 
 <artifactId>cucumber-junit</artifactId> 
 <version>1.2.4</version>
 <scope>test</scope>
 </dependency> 

 <dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.5</version>
</dependency>


    <dependency>
    <groupId>com.aventstack</groupId>
    <artifactId>extentreports</artifactId>
    <version>3.0.6</version>
    <scope>provided</scope>
</dependency>



 <dependency>
    <groupId>com.vimalselvam</groupId>
    <artifactId>cucumber-extentsreport</artifactId>
    <version>3.0.1</version>
</dependency>

<dependency>
    <groupId>org.freemarker</groupId>
    <artifactId>freemarker</artifactId>
    <version>2.3.23</version>
</dependency>

<dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>bson</artifactId>
    <version>3.2.2</version>
</dependency>

<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.6</version>
</dependency>


<dependency>
    <groupId>ojdbc14</groupId>
    <artifactId>ojdbc14</artifactId>
    <version>10.2.0.3.0</version>
</dependency>

 <dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>scm-api</artifactId>
    <version>1.1</version>

</dependency>
<dependency>
    <groupId>org.jenkins-ci.plugins.workflow</groupId>
    <artifactId>workflow-job</artifactId>
    <version>2.1</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.jenkins-ci.plugins.workflow</groupId>
    <artifactId>workflow-support</artifactId>
    <version>2.2</version>
    <scope>test</scope>
</dependency>


<dependency>
    <groupId>org.jenkins-ci.plugins.workflow</groupId>
    <artifactId>workflow-step-api</artifactId>
    <version>2.2</version>
</dependency>

<dependency>
    <groupId>org.apache.maven.wagon</groupId>
    <artifactId>wagon-provider-api</artifactId>
    <version>1.0-beta-2</version>
</dependency>

<dependency>
    <groupId>org.apache.maven.wagon</groupId>
    <artifactId>wagon-file</artifactId>
    <version>1.0-beta-2</version>
</dependency>


<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-clean-plugin</artifactId>
    <version>2.5</version>
</dependency>

 </dependencies> 

  </project>

New Log

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< Epic2Maven:Epic2Maven >------------------------
[INFO] Building Epic2KSA 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Epic2Maven
 ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Epic2Maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Ep
ic2Maven ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Epic2Ma
ven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Epic2Maven ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.711 s
[INFO] Finished at: 2018-07-23T14:17:33+04:00
Aditya
  • 457
  • 2
  • 8
  • 27
  • First remove all dependencies which contain `org.apache.maven.plugins` cause it does not make sense. Furthermore remove `org.apache.maven.wagon` ..Why do you have dependencies on `org.jenkins-ci.plugins.*`? – khmarbaise Jul 23 '18 at 08:20

1 Answers1

0

Your jar for jenkins and groovy is not being downloaded in your C:\Users\username.m2\repository\org folder that is why you are getting this error your

workflow-step-api-1.15.jar

jar should be present in C:\Users\username\.m2\repository\org\jenkins-ci\plugins\workflow folder

and

groovy-sandbox-1.10.jar

should be present in C:\Users\username\.m2\repository\org\kohsuke folder

Try to use some other maven version for these dependencies or manually download these jars and place them in the above folder structure.

Hope that helps you.

dangi13
  • 1,275
  • 1
  • 8
  • 11
  • i placed the jar files but still seeing same logs. the project is not getting picked up – Aditya Jul 23 '18 at 10:15
  • are using "mvn clean install' to build or you directly first cleaning using eclipse and then installing it. What is that you are trying to run? – dangi13 Jul 23 '18 at 10:25
  • am using mvn clean install. Trying to run the selenium cucumber scripts – Aditya Jul 23 '18 at 10:29
  • you can have a look at this thread https://stackoverflow.com/questions/2021771/surefire-is-not-picking-up-junit-4-tests it might help you – dangi13 Jul 23 '18 at 10:39