Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javac在Hudson上莫名其妙地失败了_Java_Maven_Jenkins_Ant_Hudson - Fatal编程技术网

Javac在Hudson上莫名其妙地失败了

Javac在Hudson上莫名其妙地失败了,java,maven,jenkins,ant,hudson,Java,Maven,Jenkins,Ant,Hudson,我们的应用程序是由Ant脚本构建的。在我的最新作品中,我最近加入了Maven。现在Hudson的构建过程在没有任何解释的情况下完成编译任务时失败了 哈德逊大厦: [echo] Using Maven Repo at ../.maven/repo/ [javac] Compiling 134 source files to C:\Users\administrator1\.hudson\jobs\SAP_RC\workspace\current\classes BUILD FAILED C:\U

我们的应用程序是由Ant脚本构建的。在我的最新作品中,我最近加入了Maven。现在Hudson的构建过程在没有任何解释的情况下完成编译任务时失败了

哈德逊大厦:

[echo] Using Maven Repo at ../.maven/repo/
[javac] Compiling 134 source files to C:\Users\administrator1\.hudson\jobs\SAP_RC\workspace\current\classes

BUILD FAILED
C:\Users\administrator1\.hudson\jobs\SAP_RC\workspace\current\build.xml:68: Error running C:\Program Files (x86)\Java\jdk1.8.0_66\bin\javac.exe compiler
<javac classpathref="lib" destdir="${classesDir}" debug="true" debuglevel="lines,vars,source" verbose="true" fork="true" nowarn="true" memoryMaximumSize="320m" srcdir="${srcDir}" includeantruntime="false"  />
Ant脚本:

[echo] Using Maven Repo at ../.maven/repo/
[javac] Compiling 134 source files to C:\Users\administrator1\.hudson\jobs\SAP_RC\workspace\current\classes

BUILD FAILED
C:\Users\administrator1\.hudson\jobs\SAP_RC\workspace\current\build.xml:68: Error running C:\Program Files (x86)\Java\jdk1.8.0_66\bin\javac.exe compiler
<javac classpathref="lib" destdir="${classesDir}" debug="true" debuglevel="lines,vars,source" verbose="true" fork="true" nowarn="true" memoryMaximumSize="320m" srcdir="${srcDir}" includeantruntime="false"  />

我特别将Maven repo包含在类路径中,这就是它莫名其妙地失败的时候。当我删除Maven repo时,构建抛出一个编译错误,抱怨它找不到Maven依赖项。这让我怀疑我达到了类路径长度的限制


我这样做是因为我不确定将Maven依赖项包含到类路径中的正确方法是什么。如果有更好的方法,请告诉我,我将专门为此提出一个新问题。

似乎我的文件集中的通配符就是罪魁祸首

<path id="lib">
        <fileset dir="${env.maven_repo}">
            <include name="*/**"/>
        </fileset>
</path>

我将**更改为*.jar,构建过程不再(莫名其妙地)失败