Не удалось найти цель 'java -Dexe c .mainClass = com.mystique.application.Main_Runner' | Дженкинс - PullRequest
0 голосов
/ 01 апреля 2020

Попытался собрать и запустить мой локальный проект Cucumber в Дженкинсе, выполнив 2 этапа сборки. 1st шаг прошел успешно clean install, но 2nd шагов (exe c: java -Dexe c .mainClass = "com.mystique.application.Main_Runner") выдает присоединенную ошибку.

Журналы:

Building in workspace C:\Users\807240\.jenkins\workspace\Cucumber
[Cucumber] $ cmd.exe /C "C:\Soumen\Softwares\apache-maven-3.6.1\bin\mvn.cmd -f C:/Soumen/Cucumber_WorkspacePhoton/Cucumber/pom.xml -s C:\Soumen\Softwares\apache-maven-3.6.1\conf\settings.xml -gs C:\Soumen\Softwares\apache-maven-3.6.1\conf\settings.xml clean install && exit %%ERRORLEVEL%%"
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< com.opencredo:cucumber-jvm-parallel >-----------------
[INFO] Building cucumber-jvm-parallel 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for info.cukes:cucumber-java:jar:1.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.directory.studio:org.apache.commons.codec:jar:1.8 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.yaml:snakeyaml:jar:1.8 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The artifact junit:junit-dep:jar:4.11 has been relocated to junit:junit:jar:4.11
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cucumber-jvm-parallel ---
[INFO] Deleting C:\Soumen\Cucumber_WorkspacePhoton\Cucumber\target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cucumber-jvm-parallel ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Soumen\Cucumber_WorkspacePhoton\Cucumber\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cucumber-jvm-parallel ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cucumber-jvm-parallel ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cucumber-jvm-parallel ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 101 source files to C:\Soumen\Cucumber_WorkspacePhoton\Cucumber\target\test-classes
[WARNING] /C:/Soumen/Cucumber_WorkspacePhoton/Cucumber/src/test/java/com/mystique/roomsteps/RunTests.java: Some input files use unchecked or unsafe operations.
[WARNING] /C:/Soumen/Cucumber_WorkspacePhoton/Cucumber/src/test/java/com/mystique/roomsteps/RunTests.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-surefire-plugin:2.19:test (default-test) @ cucumber-jvm-parallel ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cucumber-jvm-parallel ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: C:\Soumen\Cucumber_WorkspacePhoton\Cucumber\target\cucumber-jvm-parallel-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ cucumber-jvm-parallel ---
[INFO] Installing C:\Soumen\Cucumber_WorkspacePhoton\Cucumber\target\cucumber-jvm-parallel-1.0-SNAPSHOT.jar to C:\Soumen\MavenRepo\com\opencredo\cucumber-jvm-parallel\1.0-SNAPSHOT\cucumber-jvm-parallel-1.0-SNAPSHOT.jar
[INFO] Installing C:\Soumen\Cucumber_WorkspacePhoton\Cucumber\pom.xml to C:\Soumen\MavenRepo\com\opencredo\cucumber-jvm-parallel\1.0-SNAPSHOT\cucumber-jvm-parallel-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.053 s
[INFO] Finished at: 2020-04-01T18:36:10+05:30
[INFO] ------------------------------------------------------------------------
[Cucumber] $ cmd.exe /C "C:\Soumen\Softwares\apache-maven-3.6.1\bin\mvn.cmd -f C:/Soumen/Cucumber_WorkspacePhoton/Cucumber/pom.xml -s C:\Soumen\Softwares\apache-maven-3.6.1\conf\settings.xml -gs C:\Soumen\Softwares\apache-maven-3.6.1\conf\settings.xml exec:java-Dexec.mainClass=com.mystique.application.Main_Runner && exit %%ERRORLEVEL%%"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.496 s
[INFO] Finished at: 2020-04-01T18:36:16+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'java-Dexec.mainClass=com.mystique.application.Main_Runner' in plugin org.codehaus.mojo:exec-maven-plugin:1.5.0 among available goals exec, help, java -> [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/MojoNotFoundException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE

enter image description here

1 Ответ

0 голосов
/ 01 апреля 2020

вы пропускаете пробел между exe c: java и -Dexe c .mainClass = "com.mystique.application.Main_Runner"

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...