For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 5 replies, 4 voices, and was last updated 20 years, 1 month ago by
Alex Hamer.
-
AuthorPosts
-
jccartwrightMemberHello All,
what is the preferred setup for managing JUnit tests in a webapp? I would like to have manage the business object unit tests along with the rest of the project.
Previously, I used ant to manage the project and had a directory struture like:
/project
/src
/java (java src heirarchy. struts classes as well as business objects
/test (parallel test package heirarchy)
/resource/build (generated webapp)
/WEB-INF
/classes
/lib/test (contains test classes and output)
Is a similar heirarchy supported/recommended using myeclipse?
Thanks!
— john
January 13, 2005 at 11:18 pm #222763
Riyad KallaMemberActually no, the best setup for MyEclipse (and any other IDE as well) is to use an exploded WAR format, basically:
/<Project Root> /src <Java Source> /docs <License docs, readme, etc.> /api <Generated Javadoc> /webroot <Web root set in MyEclipse> /META-INF <Any context.xml or important files> /WEB-INF /classes <Output dir from source dir> /lib <All libraries your app needs go here>
You can keep your build script in your project root. You can do the test dir if you still want it and feel free to add any more dirs you need, but the ones above will give you the best out-of-box experience since it directly maps to the web application format specified by Sun, so most all IDEs will pick these layout up right away without a problem.
January 13, 2005 at 11:37 pm #222764
jccartwrightMember@support-rkalla wrote:
Actually no, the best setup for MyEclipse (and any other IDE as well) is to use an exploded WAR format, basically:
/<Project Root> /src <Java Source> /docs <License docs, readme, etc.> /api <Generated Javadoc> /webroot <Web root set in MyEclipse> /META-INF <Any context.xml or important files> /WEB-INF /classes <Output dir from source dir> /lib <All libraries your app needs go here>
You can keep your build script in your project root. You can do the test dir if you still want it and feel free to add any more dirs you need, but the ones above will give you the best out-of-box experience since it directly maps to the web application format specified by Sun, so most all IDEs will pick these layout up right away without a problem.
Hi Riyad,
thanks for your prompt reply. Doesn’t this “exploded WAR format” end up with the all the test src mingled with the other src, and all the test classes (which one doesn’t want in the webapp distribution war) mixed in with the other classes?
This seems to be different than the structure Maven uses by default – is this a problem? Or to digress a little, does Maven coexist with MyEclipse comfortably? I have the mevenide plugin for eclipse, but it’s not clear to me how they work together.
Thanks again for your help and advice – I’m obviously a newcomer to eclipse/MyEclipse.
— john
January 14, 2005 at 12:25 am #222765
Riyad KallaMemberDoesn’t this “exploded WAR format” end up with the all the test src mingled with the other src, and all the test classes (which one doesn’t want in the webapp distribution war) mixed in with the other classes?
Yes the way I have it above it does, you can create another source dir from the project root like /test to contain just the test classes, the key is the structure of the webroot folder.
This seems to be different than the structure Maven uses by default – is this a problem?
I don’t know what Maven uses by default, but ME is one of the more (most?) flexible IDEs out there, you can probably get it working with some tinkering.
does Maven coexist with MyEclipse comfortably? I have the mevenide plugin for eclipse, but it’s not clear to me how they work together.
Me neither, but I know Maven integration is somewhere on our Todo list… one of our developers is the creator of a MavenIDE plugin for Eclipse.
July 3, 2005 at 10:54 pm #232234
dwmegill@miracosta.eduMemberI vote for Maven integration!
July 8, 2005 at 1:46 pm #232590
Alex HamerMemberHi all,
Are you currently using Maven? How did you setup your directory structure in MyEclipse? Did you follow the Maven directory convention? Im still debating if I can use Maven for my upcoming project as Im not too sure of the benefit of using it along side MyEclipse. Any advice would be great.
jade
-
AuthorPosts