简体   繁体   English

无法将 java.lang.String 类型的值为 '"~@ignored"' 的配置条目 'tags' 分配给 java.util.List -> [Help 1] 类型的属性

[英]Cannot assign configuration entry 'tags' with value '"~@ignored"' of type java.lang.String to property of type java.util.List -> [Help 1]

I have a Automation test scripts which are running fine Jenkins Master but on slaves it is giving below error:我有一个自动化测试脚本,它运行良好的 Jenkins Master,但在从站上它给出了以下错误:

11:47:50 [ERROR] Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners (generateRunners) on project riverbed-automation-tests: Unable to parse configuration of mojo com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners for parameter tags: Cannot assign configuration entry 'tags' with value '"~@ignored"' of type java.lang.String to property of type java.util.List -> [Help 1]
11:47:50 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners (generateRunners) on project riverbed-automation-tests: Unable to parse configuration of mojo com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners for parameter tags: Cannot assign configuration entry 'tags' with value '"~@ignored"' of type java.lang.String to property of type java.util.List
11:47:50    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221)
11:47:50    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
11:47:50    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
11:47:50    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
11:47:50    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
11:47:50    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
11:47:50    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
11:47:50    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
11:47:50    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
11:47:50    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
11:47:50    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
11:47:50    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
11:47:50    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:47:50    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:47:50    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:47:50    at java.lang.reflect.Method.invoke(Method.java:498)
11:47:50    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
11:47:50    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
11:47:50    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
11:47:50    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)

this Cucumber java junit project with Serenity .这个带有Serenity Cucumber java junit项目。 Only difference between master and slave is that Xvfb (headless browser) is working on Master but not on Slave, but since it looks a Maven or Cucumber error I doubt Xvfb has anything to with it. master 和 slave 之间的唯一区别是Xvfb (无头浏览器)在 Master 上工作而不是在 Slave 上工作,但由于它看起来是 Maven 或 Cucumber 错误,我怀疑Xvfb与它有什么关系。

What am I doing wrong?我究竟做错了什么?

Check https://github.com/temyers/cucumber-jvm-parallel-plugin There is stated: 检查https://github.com/temyers/cucumber-jvm-parallel-plugin内容如下:

As of cucumber-jvm:4.0.0 parallel execution is supported natively by cucumber. 从cumul-jvm:4.0.0版本开始,cucumber本地支持并行执行。 As such, upgrading to Cucumber 4.0.0 is recommended and this plugin is no longer maintained. 因此,建议升级到Cucumber 4.0.0,并且不再维护此插件。

So consider leave cucumber-jvm-parallel-plugin 因此,请考虑让黄瓜-jvm-parallel-plugin

It looks like you have in your pom.xml something like 看起来您的pom.xml类似

<tags>"~@ignore"</tags>

try to change it to 尝试将其更改为

    <tags>
      <tag>~@ignore</tag>
    </tags>

BTW proper new style is now not @ignore check https://github.com/cucumber/cucumber/tree/master/tag-expressions#migrating-from-old-style-tags 顺便说一句BTW正确的新样式现在not @ignore检查https://github.com/cucumber/cucumber/tree/master/tag-expressions#migrating-from-old-style-tags

The problem is maven version问题是maven版本

Following format for list/set is support in maven 3.3.9 and onward versions but in lower versions it not supported. maven 3.3.9及更高版本支持以下列表/集格式,但在较低版本中不支持。

<tags>val1,val2,val3...</tags>

But in maven version less than 3.3.9 , above is not supported但是在低于3.3.9 maven 版本中,不支持以上

To fix make it backward compatible修复使其向后兼容

<tags>
    <tag>val1</tag>
    <tag>val2</tag>
    .....
</tags>

PS: for more details check this link PS:欲了解更多详情,请查看链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 [无法将类型&#39;java.lang.String []&#39;的属性值转换为属性的必需类型&#39;java.util.List&#39; - [Failed to convert property value of type 'java.lang.String[]' to required type 'java.util.List' for property 无法将 java.lang.String[] 类型的属性值转换为所需的类型 java.util.List - Failed to convert property value of type java.lang.String[] to required type java.util.List 无法将“java.lang.String”类型的属性值转换为属性“transactions”所需的类型“java.util.List” - Failed to convert property value of type 'java.lang.String' to required type 'java.util.List' for property 'transactions' 无法将java.lang.String强制转换为java.util.List - java.lang.String cannot be cast to java.util.List JSF h:selectOneMenu故障:java.lang.IllegalArgumentException无法将类型类java.lang.String的“字符串”转换为接口java.util.List - JSF h:selectOneMenu trouble: java.lang.IllegalArgumentException Cannot convert “string” of type class java.lang.String to interface java.util.List java.lang.ClassCastException:java.lang.String[] 不能转换为 java.util.List - java.lang.ClassCastException: java.lang.String[] cannot be cast to java.util.List class java.lang.String cannot be cast to class java.util.List (java.lang.String and java.util.List are in module java.base of loader 'bootstrap') - class java.lang.String cannot be cast to class java.util.List (java.lang.String and java.util.List are in module java.base of loader 'bootstrap') 错误:放置(java.lang.string,列表<string> ) 中的 hashmap 不能应用于 (java.util.list<java.lang.string> )</java.lang.string></string> - Error: put(java.lang.string, list<string>) in hashmap cannot be applied to (java.util.list<java.lang.string>) 我看到错误:Java类java.util.ArrayList和Java类型java.util.List的消息正文编写器<java.lang.String> - I am seeing the error: A message body writer for Java class java.util.ArrayList, and Java type java.util.List<java.lang.String> 无法将类型&#39;java.lang.String&#39;的属性值转换为必需类型&#39;java.util.Date&#39; - Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM