执行mvn exec:java
时无法正确解析配置参数,抛出以下错误:
[错误] 无法在项目 autotest-programmes 上执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli):无法解析 mojo org.codehaus.mojo:exec-maven 的配置-plugin:1.2.1:java:无法将配置值分配给 java.lang.String 类型的数组:[-classpath,Classpath {},--glue,com.company.test.cucumber,--format,pretty,- -format, html:C:\workspace\autotest\target] -> [帮助 1]
这是使用的插件配置(使用 Apache Maven 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>