4

$mvn test即使我这样做,在 64 位 Windows 上运行也会出现以下错误$mvn test -Dgwt.genParam=false

The command line is too long
4

1 回答 1

6

确保您使用的是版本2.16并且您有useManifestOnlyJar选项(如此所述)。

例如:

<project>
    [...]
    <build>
      <pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>

            <configuration>
                <useManifestOnlyJar>true</useManifestOnlyJar>
            </configuration>

          </plugin>
        </plugins>
      </pluginManagement>
    </build>
    [...]
</project>

这将创建带有重新创建类路径的清单的 jar(而不是通过CLASSPATH变量设置它,这是一种受 Windows 命令行限制问题影响的方法)。

于 2014-03-20T11:17:45.560 回答