从另一个GWT引用GWT项目 - 问题 [英] Referencing a GWT project from another GWT one - Problems
问题描述
我已经在Eclipse中引入了iServe(它有多个模块)作为单独的Maven项目引用其他项目,并可以通过Runas - > Web应用程序在开发模式下成功运行它。
如果我这样做,并通过控制台运行另一个项目为mvn gwt:run,我通过iServe调用启动PetalsMBP。但是,这意味着这两个程序必须按原样运行,而无需相互通信。
我还将第二个项目作为一个java项目成功导入eclipse(转换成Maven一个导致问题 - 各种生命周期配置),但是每当我尝试添加通过属性iServe - > Java构建路径 - >项目,虽然它不会立即导致任何错误,我不能启动iServe了。它产生以下错误:
执行命令行时发生异常
无法运行程序C:\Program Files\Java\ jre7\bin\javaw.exe(目录C:... iserve-sal-gwt-1.0.0-SNAPSHOT):CreateProcess error = 206,文件名或扩展名太长我的问题是否与PetalsBPM不是Eclipse中的Maven项目有关(我怀疑)吗?
我做错了,即这不是从另一个引用项目的方式?我应该添加对第一个项目(iServe)gwt.xml文件的引用吗?
有没有办法做我想要的,而不必将第二个项目作为jar并从iServe调用?我不愿意,因为每当我做一个微小的变化生产一个罐子不是完全有效率!
P.S:第二个项目是具有入口点的常规GWT项目,而不仅仅是一个模块。我应该删除这个吗?
更新:试图找出错误的根源,我试图简化问题,所以我执行了以下动作:
- 我创建了两个新的简单GWT项目,并尝试引用一个
从另一个。工作得很好 - 我引用了我实际想要
的项目,使用(PetalsBPM)从我刚刚创建的简单的。我也从原来的一个I
想要使用的(iServe)引用了一个新的简单项目。也可以正常工作。 - 尝试做我实际上
想做的事情,复制2和3的设置。生成相同的错误
CreateProcess error = 206,文件名或扩展名太长如果
我引用PetalsBPM(当我从引用的
项目中删除它时不会)
所以,我尝试了切换工作区。我在C:\中创建了一个新工作区,并将实际项目移动到那里。仍然没有工作。 (
任何更多的想法?
然后,我在google-groups中找到了一个解决方案/解释,解决了我的问题
我发布了一个错误创建进程,错误= 206,路径太长等
这个网站(StackOverflow)真的帮助了我一千次
感谢大家! em> 解决方案/解释 :
(来自Stephen Johnson的回复)
...)如果你使用eclipse插件去Project | Properties,选择
Google \ App Engine \ ORM,并且只包含你想要增强的
类的目录,默认情况下整个项目
,以便包含大量不必要的文件。(...)
链接 :
原始帖子@ google-groups
I am already using an open source GWT project (iServe) and I would like to integrate into it another open source GWT project (PetalsBPM), by which I mean being able to call it and reference its methods.
I have imported iServe in Eclipse (it has multiple modules) as separate Maven projects referencing its other and can run it successfully through Runas -> Web application in development mode.
If I do that and run the other project through the console as mvn gwt:run, I call initiate PetalsMBP through iServe. However, that means that the two programs have to run as is, without communication with each other.
I have also imported the second project into eclipse as a java project successfully (converting into a Maven one causes problems - various lifecycle configurations ones), but whenever I try to add to to iServe through Properties -> Java Build Path -> Projects, although it does not cause any errors immediately, I cannot launch iServe anymore. It produces the following error:
"Exception occurred executing command line. Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:...iserve-sal-gwt-1.0.0-SNAPSHOT"): CreateProcess error=206, The filename or extension is too long"
Are my problems related to the fact that PetalsBPM is not a Maven project in Eclipse (I doubt it)? Am I doing something wrong, i.e., this is not the way to reference a project from another one? should I add a reference to the first project's (iServe) gwt.xml file? Is there a way to do what I want without having to wrap the second project as a jar and calling it from iServe? I would prefer not to, since producing a jar every time I make a slight change is not exactly efficient!
P.S: The second project is a regular GWT project with an entrypoint, not just a module. Should I remove this?
UPDATE: Trying to figure out the source of this error, I attempted to simplify the problem, so I performed the following moves:
- I created two new simple GWT projects and tried to reference one from the other. Worked fine
- I referenced the project I actually want to use (PetalsBPM) from the simple one I just created. Also works fine.
- I referenced the new simple project from the original one I want to use (iServe). Also works fine.
- Tried doing what I actually want to do, copying the settings from 2&3. Produces the same error "CreateProcess error=206, The filename or extension is too long" if I reference PetalsBPM (does not when I remove it from the referenced projects)
So, I tried switching workspaces. I created a new workspace in C:\, and moved the actual projects there. Still it did not work. :(
Any more ideas?
I met the same type of error "Create Process, error=206, path too long etc." a hundred times. Then, I found a solution/explanation in google-groups, it solved my problem. I post the content and link as it might help others. This website (StackOverflow) really helped me a thousand times. Thanks to you all !
solution/explanation : (Response from Stephen Johnson)
(...) if you're using eclipse plugin go to Project | Properties, choose Google \ App Engine \ ORM and only include directories that you have classes that you want enhanced. By default it does the entire project so that includes a lot of needless files. (...)
Link : original post @ google-groups
这篇关于从另一个GWT引用GWT项目 - 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!