Groovy 类文件未包含在部署中
我有两个java项目,A和B,A依赖于B。在项目B中,我添加了一个groovy类(Foo.groovy)和一个使用groovy类的java类(Bar.java)。在 MyEclipse 中,Foo.class 位于 bin-groovy 中,我可以从 MyEclipse 中正常运行。但是,当MyEclipse将项目A部署到tomcat时,它不包含Foo.class文件,因此Bar.java无法运行。如果我手动将 Foo.class 复制到 tomcat,它就可以正常工作。这只是 MyEclipse 的问题吗?这让我发疯,因为所需要做的就是将 groovy 类中的 .class 文件包含在部署中,这似乎应该是一个简单的配置,但我还没有找到解决方案。
I have two java projects, A and B, A depends on B. In project B I've added a groovy class (Foo.groovy) and a java class (Bar.java) that uses the groovy class. In MyEclipse, Foo.class is in bin-groovy, and I can run things from MyEclipse just fine. However, when MyEclipse deploys project A to tomcat, it does not include the Foo.class file so Bar.java can't run. If I manually copy Foo.class to tomcat, it works just fine. Is this just a MyEclipse issue? It's driving me crazy because all that needs to happen is to have the .class files from the groovy classes get included on a deploy, it seems like that should be an easy configuration, but I have not found a solution for this yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
源结构中丢失的文件在哪里?它们是在 grails-app 还是 src/groovy 中?
当您通过 CL 部署时会发生什么(即 grails war 或类似命令)
Where are the missing files in the source structure? Are they in grails-app or src/groovy?
When you deploy via CL what happens (i.e. grails war or similar command)