bilgvvn
10 years agoOccasional Contributor
MAVEN/JENKINS issue
Hi,
I was trying to setup and run my project using Maven on Jenkins, i am getting an error and not sure what might be the problem. Here 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 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>My App</name>
<groupId>maven.test</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>Test</description>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<!--Adding dependency-->
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections-maven</artifactId>
<version>0.9.9-RC2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.13</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.13</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.13</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.9-RC1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
<exclusions>
<exclusion>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>1.7.0</version>
<executions>
<execution>
<id>Full_run</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>C:\JenkinsWorkspace\Clean\Projdev1-soapui-project.xml</projectFile>
<outputFolder>${basedir}\Mreports</outputFolder>
<testSuite>TestSuite_1</testSuite>
<junitReport>true</junitReport>
<exportwAll>true</exportwAll>
<printReport>true</printReport>
<testFailIgnore>true</testFailIgnore>
</configuration>
</execution>
</executions>
<configuration>
<readyApiProperties>
<property>
<name>soapui.home</name>
<value>C:/Program Files/SmartBear/ReadyAPI-1.4.1/bin</value>
</property>
<property>
<name>soapui.scripting.library</name>
<value>C:/Workspace/soapui-integration-tests/Library</value>
</property>
</readyApiProperties>
<!--soapuiProperties>
<property>
<name>soapui.home</name>
<value>C:/Program Files/SmartBear/ReadyAPI-1.4.1/bin</value>
</property>
<property>
<name>soapui.scripting.library</name>
<value>C:/Workspace/soapui-integration-tests/Library</value>
</property>
</soapuiProperties-->
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<outputDirectory>${project.build.directory}/reports</outputDirectory>
<reportsDirectories>
<reportsDirectories>${project.build.directory}/reports</reportsDirectories>
</reportsDirectories>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
And when i try run using -mvn pom.xml here is the error message i get
C:\JenkinsWorkspace\Clean>mvn pom.xml [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building My App 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.139 s [INFO] Finished at: 2016-05-11T12:17:24-04:00 [INFO] Final Memory: 5M/123M [INFO] ------------------------------------------------------------------------ [ERROR] Unknown lifecycle phase "pom.xml". You must specify a valid lifecycle ph ase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin- artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate , initialize, generate-sources, process-sources, generate-resources, process-res ources, compile, process-classes, generate-test-sources, process-test-sources, g enerate-test-resources, process-test-resources, test-compile, process-test-class es, test, prepare-package, package, pre-integration-test, integration-test, post -integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-si te, site, post-site, site-deploy. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase NotFoundException
when i run using -mvn clean test
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
[ERROR] java.lang.RuntimeException: Guice error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.518 s
[INFO] Finished at: 2016-05-11T12:27:11-04:00
[INFO] Final Memory: 24M/169M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.smartbear:ready-api-maven-plugin:1.7.0:test (
Full_run) on project my-app: Ready! API Test(s) failed: Ready! API Test(s) faile
d:
[ERROR] Guice error
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
Thanks,
B.
Issue has been fixed. There was problem with Maven.