命令行太长.在带有maven的java项目中 [英] The command line is too long. in java project with maven

查看:39
本文介绍了命令行太长.在带有maven的java项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 maven-gwt 项目.它有很多依赖项,这在大型项目中很常见.我认为这是创建类路径的极限.我找到了一些关于限制的信息.允许使用 1023 个字符.但我需要图书馆.

当我想打包我的项目 mit Maven 时收到以下错误.

I have maven-gwt project. It has lots of dependencies which is usual by a large project. I think it is at the limit with creation of classpath. I found some information about the limitation. Allowed is 1023 Character. But I need the libraries.

I receive the following error when i want to package my project mit Maven.

The command line is too long.

我该如何解决这个问题?

How can I get around the problem.?

这是 Jenkins 中的扩展错误:

Here is the expanded error in Jenkins:

[INFO] --- maven-surefire-plugin:2.5:test (default-test) @ MyProject ---
[INFO] Surefire report directory: C:Documents and SettingsUser.jenkinsworkspaceMyproject	argetsurefire-reports
The command line is too long.
The command line is too long.

[ERROR] There are test failures.

推荐答案

我在这里找到了另一个解决方法 http://code.google.com/p/gwt-maven/issues/detail?id=88(我在更改 pom 以适应特定操作系统时遇到问题)

I found another workaround here http://code.google.com/p/gwt-maven/issues/detail?id=88 (I have problem with changing pom to fit a specific OS)

简而言之:使本地存储库的路径尽可能短.

In short: make path to local repository as short as possible.

"评论 40 来自 gaurav.a...@gmail.com,2009 年 3 月 23 日GWT 编译失败的问题的解决方法之一是 - 输入行是太长了."如下:

" Comment 40 by gaurav.a...@gmail.com, Mar 23, 2009 One of the fix to the problem of "GWT compilation fails due to- The input line is too long." is as follows:

  1. 更改 m2(maven) 存储库.你可能有你的行家存储库位于:C:Documents and SettingsMahcineNameABC.m2
  2. 从文件夹复制 settings.xml 文件apache-maven-2.0.8apache-maven-2.0.8conf 进入 C:Documents and SettingsMahcineNameABC.m2

settings.xml 中:

把标签改成<localRepository>M:</localRepository>.现在你的 m2 家就是一个虚拟的 M 盘.

change the tag as <localRepository>M:</localRepository>. Now your m2 home is a virtual M drive.

这将解决由于类路径中的条目过长而导致输入过长的问题变量,至少在 Win XP SP2 中.从comment#22 对输入进行组合和测试和#7.

This would fix the problem of long inputs due to very long entries in classpath variables, at least in Win XP SP2. The inputs are combined and tested from comment#22 and #7.

希望对你有帮助!

这在大多数情况下应该会有所帮助(并且直到项目结束 - 至少在我的情况下)

This should help in most cases (and 'til the end of project - at least in my case)

这篇关于命令行太长.在带有maven的java项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆