超级开发模式的多个源文件夹 [英] Multiple source folders for Super Dev Mode
问题描述
问题
是否有任何方法 Codeserver 接受-src标志中的多个目录?
详情 我使用常规开发模式通过以下* .gwt.xml文件编译我的代码: 小工具/ Widgets.gwt.xml 但每次我尝试在Codeserver(SuperDevMode)中运行时,都会说它不能找到com.my.project.Widgets包中的类。 我使用以下参数运行SuperDevMode: 但我猜我需要这样的东西: 仅供参考 < 更新 没有工作:(
我试图将我的源代码分隔到这样的文件夹中:
$ b
$ b $ s
< module>
<继承了name ='com.google.gwt.user.User'/>
< inherits name =com.my.project.Widget/>
< entry-point class =com.my.project.Test/>
< / module>
<模块>
<继承了name ='com.google.gwt.user.User'/>
<继承了name =com.my.project.Widgets/>
< / module>
-src src / com.my.Project.MyProject
-src src / com.my.Project.MyProject widgets / com。 my.Project.Widgets
我知道你可以使用软件包来组织课程,但我更愿意将它们放在单独的源文件夹中,所以稍后我可以轻松地将它们重新打包到单独的jar中。
刚刚尝试添加[module]:
-src src / com.my.Project.MyProject com.my.Project.Widgets
J您可以根据需要多次传递 -src
多次:
- src src / -src widgets /
模块最后在命令行上显示,所有源文件夹和类路径:
-src src / -src widgets / com.my.Project.MyProject
请注意,只有<入口点>
(或继承具有<入口点>
的模块)可以在命令行上以这种方式传递;没有入口点,模块只是一个库,可以被其他模块继承,而不是应用程序。
注意,你也可以添加所有的源代码文件夹添加到classpath,而不是使用 -src
。
Problem
Is there any way Codeserver accept more than one dir in the -src flag?
Details
I'm trying to separate my source code into folders like this:
- src
- widgets
- utility
- main
I got the regular dev mode to compile my code via the following *.gwt.xml files:
src/MyProject.gwt.xml
<module>
<inherits name='com.google.gwt.user.User' />
<inherits name="com.my.project.Widget"/>
<entry-point class="com.my.project.Test" />
</module>
widgets/Widgets.gwt.xml
<module>
<inherits name='com.google.gwt.user.User' />
<inherits name="com.my.project.Widgets"/>
</module>
But every time I try to run in the Codeserver (SuperDevMode), it will say it can't find classes in com.my.project.Widgets package.
I'm running SuperDevMode using the following arguments:
-src src/ com.my.Project.MyProject
But I'm guessing I need something like:
-src src/ com.my.Project.MyProject widgets/ com.my.Project.Widgets
FYI
I know you can organize the classes using packages but I would prefer to have them in separate source folders, so later on I can easily repackage them into separate jars.
Update
Just tried adding the [module]:
-src src/ com.my.Project.MyProject com.my.Project.Widgets
Didn't work :(
Just pass -src
as many times as you need it:
-src src/ -src widgets/
The modules comes last on the command line, and are looked up in all source folders and the classpath:
-src src/ -src widgets/ com.my.Project.MyProject
Note that only modules with an <entry-point>
(or inheriting a module that has an <entry-point>
) can be passed that way on the command line; without entry-point the module is only a "library" to be inherited by other modules, not an "application".
Note, you could also just add all your source folders to the classpath, instead of using -src
.
这篇关于超级开发模式的多个源文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!