简体   繁体   English

运行Maven项目的多个“实例”-无法执行目标org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean

[英]Running multiple 'instances' of maven project - Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean

I am trying to run multiple instances of the same maven project using netbeans. 我正在尝试使用Netbeans运行同一Maven项目的多个实例。 There is only 1 main class in the project. 该项目中只有1个主要课程。 This is the error I get: 这是我得到的错误:


Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project Client: Failed to clean project: Failed to delete C:\\x\\x\\x\\Client\\target\\Client-1.0-SNAPSHOT.jar -> [Help 1] 无法在项目客户端上执行目标org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean(默认清除):无法清除项目:无法删除C:\\ x \\ x \\ x \\ Client \\ target \\ Client-1.0-SNAPSHOT.jar-> [帮助1]

To see the full stack trace of the errors, re-run Maven with the -e switch. 要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。 Re-run Maven using the -X switch to enable full debug logging. 使用-X开关重新运行Maven以启用完整的调试日志记录。

For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 有关错误和可能的解决方案的更多信息,请阅读以下文章:[帮助1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


I realise that I cannot run more than one instances because maven cannot clean/delete the jar file while it is already in use. 我意识到我不能运行多个实例,因为当maven已经在使用中时,maven无法清理/删除该jar文件。 However, I need to get this working; 但是,我需要使它起作用。 to implement and test multi-threading and synchronisation. 实现和测试多线程和同步。

Anyone know a solution or a workaround? 有人知道解决方案或解决方法吗? Thanks. 谢谢。

Why would you like to run the build in parallel for the same project? 您为什么要为同一项目并行运行构建? Just build once mvn clean package and start your resulting jar several times via java -jar ...target/Client-1.0-SNAPSHTO.jar from different console windows. 只需构建一次mvn clean package ,然后通过java -jar ...target/Client-1.0-SNAPSHTO.jar从不同的控制台窗口多次启动生成的jar。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven - 未能执行目标 org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean - Maven - Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean 无法执行目标org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean - Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean 如何解决“无法在项目上执行目标 org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean)”? - How to solve "Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project"? Maven 无法执行目标 org.apache.maven.plugins:maven-clean-plugin:2.5:clean 无法删除 access_log - Maven Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean Failed to delete access_log 如何修复Maven异常:[错误]无法执行目标org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean - How to fix maven exception : [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean 无法在项目 spring-boot-keycloak 上执行目标 org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) - Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project spring-boot-keycloak Maven 全新安装:无法执行目标 org.apache.maven.plugins:maven-resources-plugin:3.20。 - Maven clean install: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources 无法执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test on project XYZ - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test on project XYZ Maven:插件 org.apache.maven.plugins:maven-clean-plugin:2.5 或其依赖项之一无法解析 - Maven : Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved 无法执行目标org.apache.maven.plugins:maven - Failed to execute goal org.apache.maven.plugins:maven
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM