Jenkins插件生成错误

Jenkins插件生成错误,jenkins,Jenkins,我不想修改名为部署插件的詹金斯插件。如果我安装了插件,InjectedTest将运行到FileSystemException中: C:\Users\froth\AppData\Local\Temp\hudson2805772493654455072test\secret.key: 这是一个非常重要的项目 安德伦·普罗泽斯·维尔温德·维德 英文: C:\Users\froth\AppData\Local\Temp\hudson2805772493654455072test\secret.key:进

我不想修改名为部署插件的詹金斯插件。如果我安装了插件,InjectedTest将运行到FileSystemException中:

C:\Users\froth\AppData\Local\Temp\hudson2805772493654455072test\secret.key: 这是一个非常重要的项目 安德伦·普罗泽斯·维尔温德·维德

英文:

C:\Users\froth\AppData\Local\Temp\hudson2805772493654455072test\secret.key:进程无法访问该文件,因为它正被 另一个过程

我认为这只是VM或Windows7的读/写问题。有人知道如何解决这个问题吗

PS:这是堆栈跟踪:


T
-------------------------------------------------------
运行hudson.plugins.deploy.glassfish.GlassFish2xAdapterTest
运行hudson.plugins.deploy.glassfish.GlassFish3xAdapterTest
测试运行:2,失败:0,错误:0,跳过:0,运行时间:0.229秒-在hudson.plugins.deploy.glassfish.GlassFish2xAdapterTest中
运行hudson.plugins.deploy.glassfish.GlassFishAdapterTest
测试运行:1,失败:0,错误:0,跳过:0,运行时间:0.012秒-在hudson.plugins.deploy.glassfish.GlassFishAdapterTest中
正在运行hudson.plugins.deploy.PasswordProtectedAdapterCargoTest
测试运行:3,失败:0,错误:0,跳过:0,运行时间:0.251秒-在hudson.plugins.deploy.glassfish.GlassFish3xAdapterTest中
运行hudson.plugins.deploy.tomcat.Tomcat7xAdapterTest
测试运行:2,失败:0,错误:0,跳过:0,运行时间:0.004秒-在hudson.plugins.deploy.tomcat.Tomcat7xAdapterTest中
运行注入测试
测试运行:1,失败:0,错误:0,跳过:0,运行时间:0.251秒-在hudson.plugins.deploy.PasswordProtectedAdapterCargoTest中

测试运行:8次,失败:0次,错误:2次,跳过:0次,所用时间:12.069秒我在Windows 7上遇到了相同的问题,并对此进行了进一步分析

不过,作为一种临时解决方法,您可以通过向pom.xml添加以下内容来禁用注入测试:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>InjectedTest.java</exclude>
                </excludes>
            </configuration>
        </plugin>
    </plugins>
</build>

org.apache.maven.plugins
maven surefire插件
InjectedTest.java

作为一种临时解决方案,将父pom的版本更改为1.539(从上一个答案中打开的问题的第一条注释开始),可以通过编译解决问题;它在我身上运行得非常好,无需跳过测试。

我在第二台装有windows8的pc上也做了同样的事情。它工作得很好…我已经被困在这一天了。。真正的解决办法是什么?我不能只是禁用测试。。。
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>InjectedTest.java</exclude>
                </excludes>
            </configuration>
        </plugin>
    </plugins>
</build>