You can import Create new project from eclipse using the existing build.xml, it shouldn't be too difficult. Try it out first.
Thanks for your reply.
I'm not sure that I understand you correct. Do you mean Import or Create ? and how can I use build.xml for this ?
From your Eclipse:
File -> New -> Project
Open up the 'Java' tree and choose:
Java Project from existing Ant buildfile
And then Click next
Then you specify the build.xml from the Seam examples.
Try it out. Hopefully it works :-D
I end up with a Java Project with only the java class files in, so this is not what I wan't.
Thanks for your reply.
Didn't it retrieve the library into the classpath too?
It didn't import the xhtml files and the configuration files. Therefore I can't run it on my the JBoss Server in Eclipse.
Yes of course. Since Eclipse doesn't know that it is a web application. You have to do that manually. :-D
I use MyEclipse so this may not be possible in normal eclipse; never tried...
Another way is to crack open the .ear that the build file produces and look at it.
This will give you a big clue as to where all the files are suppsed to go in the ear, ejb and war project that you will create in MyEclipse.
In MyEclipse, assuming you used the EJB3 wizard to create the EAR style project then the project(s) XXXEar, XXXEJB and XXXWAR will be created.
Copy the no class files from the
crackedear into the right places and pop the source in the right place.
To run the sucker all you do is deploy is the Ear as
explodedand run the sucker...
If you change something that requires a re-start (Bean Spec) then a wee window pops up and tells you to restart the server; which you do...
To deploy to a live server then select
packagedfor deployment (as apposed to exploded) and copy the xxxx.ear produced in your local server area to the remote (live) server deploy area.
It does mean you don't have to use Ant any more as you are levereging the capabilites of the MyEclipse deploy capabilities (You can still create Ant files (3 where 1 calls the other 2) and they are totaly trivial as the project is laid out in the right format already - I can supply these).
Just remember that .jars you put in the ear need to be only referenced in the EJB and WAR projects.. DONT add them again... this totally confuses things.
One day MyEclipse will add in conditional deployment and then it's a lot easier to pop in and out the test files :)
MyEclipse wont work with the JBoss tools at present though so you got to decide if you can do without these. As I have never used them I can't make that call for you.
I suppose if you wanted to go this way I could wink a new install so you could follow along.
Hope this helps.
Did you tell it to copy the files? I explicitly told it not to copy the files but to point to the project. That way, it knows about all of the files and I can still do additional seam-gen magic if I want to.
(I am using MyEclipse, but suspect that this is a feature of vanilla Eclipse, too. In fact, Dan specifically warns about this in Seam in Action, chapter 2.)