当执行mvn exec: java
时,它无法正确解析配置参数,引发以下错误:
[错误]无法执行目标组织。科德豪斯。mojo:execmaven插件:1.2。1:project autotest程序上的java(默认cli):无法解析mojo org的配置。科德豪斯。mojo:execmaven插件:1.2。1:java:无法将配置值分配给java类型的数组。String:[-classpath,classpath{},-glue,com.company.test.cumber,-format,pretty,-format,html:C:\workspace\autotest\target]-
这是使用的插件配置(使用ApacheMaven 3.0.3):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<includeProjectDependencies>false</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
<executableDependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
</executableDependency>
<mainClass>cucumber.cli.Main</mainClass>
<commandlineArgs>-Dfile.encoding=UTF-8</commandlineArgs>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>--glue</argument>
<argument>com.company.test.cucumber</argument>
<argument>--format</argument>
<argument>pretty</argument>
<argument>--format</argument>
<argument>html:${project.basedir}\target</argument>
</arguments>
</configuration>
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</plugin>
如果你想使用
<executable>java</executable>
如果我理解正确,
exec:java
会自动添加无法覆盖的类路径。参数添加在主类之后exec:exec
更为通用,它执行带有任何参数的任何可执行文件,其中一个参数可以是
根据这里的exec:java文档,您必须:
删除代码
并使用
我建议从配置中删除空条目,然后重试。
<argument>-classpath</argument>
<classpath/>
原因在java目标中,基于文档不允许类路径。
顺便说一句:永远不要在你的maven pom中使用“\”。改用正斜杠。
问题内容: 更新到xcode 8 beta 6后,出现错误 无法将’()-> Void’类型的值分配给’(()-> Void)!’ 在以下func块的第三行: 关于修复的任何建议? 问题答案: 看来您的问题与此有关: SE-0103 尝试将您的方法标头追踪到: 与往常一样,来自新Beta的诊断消息是如此混乱和不足,但是将您的媒体资源设置为非可选将为您提供更多有用的信息。
问题内容: 这是我写该行时的错误: /ChatApp/ViewController.swift:27:42:无法将“ ViewController”类型的值分配给“ UITextFieldDelegate”类型的值? 这是我的Swift代码(ViewerController.swift): 问题答案: 该生产线将导致错误,因为你尝试分配作为的。 但是,你 是不是 一个。为了使您的课程成为此类委托,
在我的班级中,我有一个属性: 并希望将其设置为: 设置此设置时,我会得到错误
你好,我在小部件上的以下代码中出错 参数类型'List 这是我的代码 我的代码与上面的图表插件不兼容吗?如何解决这个问题?
我正在我的项目中使用AWS,我只想使在属性文件中可配置。 因此接受类似于的枚举值。 我尝试在中分配它: 这就是不行。它给了我这个: java.lang.IllegalStateException:无法将类型[java.lang.String]的值转换为所需类型[com.amazonaws.regions.regions]:找不到匹配的编辑器或转换策略
当我将接口的任何属性设置为可选时,我会在将其成员分配给其他变量时遇到如下错误: 我如何绕过这个错误?
我想使用@Value注释注入一个Double属性,例如: 并使用Spring特性占位符(特性文件): 我得到异常: org.springframework.beans。TypeMismatchException:无法将“java.lang.String”类型的值转换为所需的“java.land.Double”类型;嵌套异常是java.lang.NumberFormatException:对于输入字