开发者

How to exclude unit tests from the WAR in with Google App Engine plugin?

I am using the Google Application Engine 开发者_开发百科plugin for Eclipse 3.4, and I have added unit tests in my projects. The unit tests are in a source folder named tests, separated from the source folder src. But, in the war/classes that is generated, the tests classes are present.

Is there anyway not to put test classes in the generated war/classes directory?

Thanks.


I usually tend to solve these issues with maven, since it really plays well with eclipse using m2eclipse, for instance.

However, without relying upon the red army of build process managers, here is a possible hint : Go in your project properties, and in "java build path" open the "source" tab. in this tab, you can either have one output folder for all source folders, or one output folder for each source folder. So, check "Allow output folders for source folders", thend efine one output folder for your src/main/java, say .... war/classes, then define one output folder for your src/main/test folder, say test/classes. This way, your classes and test classes won't be in the same output.

EDIT : added some maven infos

I however strongly suggests you to use maven build instead of pure IDE ones, since they reveal to be far more robust. I think my friends at dooapp have some infos about that point. Anyway I know there are infos available to build a GAE application using maven.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜