简体   繁体   English

使用Maven发行Grails项目

[英]Issue building Grails project with Maven

I'm creating a "Mavenised" Grails project but am having trouble running the maven install goal on the project. 我正在创建一个“ Mavenised” Grails项目,但是在该项目上运行maven安装目标遇到了麻烦。

To create the project I've used the following archetype: grails-maven-archetype 为了创建项目,我使用了以下原型: grails-maven-archetype

It has built my project structure correctly and set up all the necessary configuration files (pom.xml etc) 它正确建立了我的项目结构,并设置了所有必要的配置文件(pom.xml等)

However, when I run mvn install on this I get the following error: 但是,当我对此运行mvn install时,出现以下错误:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.206s
[INFO] Finished at: Thu Mar 15 10:40:15 GMT 2012
[INFO] Final Memory: 65M/366M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-test (default) on project MyApp: Unable to start Grails: java.lang.reflect.InvocationTargetException: Native Library C:\Users\<username>\AppData\Local\Temp\jline_.dll already loaded in another classloader -> [Help 1]

However when I run the grails goals that this is trying to run individually eg mvn grails:maven-compile they work and I am able to fully build the project. 但是,当我运行试图单独运行的grails目标时,例如mvn grails:maven-compile它们可以工作,并且我能够完全构建该项目。

I am guessing when running mvn install the process is locking the jline_.dll and not releasing it before trying to read it in again in the next goal. 我猜想在运行mvn install时,该过程将锁定jline_.dll而不释放它,然后再尝试在下一个目标中再次读取它。

Has anyone seen this issue before? 有人看过这个问题吗? Any advice on how to get around this? 关于如何解决这个问题的任何建议?

I really need mvn install to build the project correctly so I can set up effective build scripts. 我确实需要mvn install才能正确构建项目,以便可以设置有效的构建脚本。

Thanks! 谢谢!

The 2.0.1 version doesn't work on Windows machines. 2.0.1版本在Windows计算机上不起作用。 Known issue. 已知问题。 Sorry about that, you will need to wait for 2.0.2 抱歉,您需要等待2.0.2

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM