I have been using tomee in eclipse. There's no need to copy any jars around,
or to specify the "Use tomcat installation" option. You can create a tomee
server in eclipse and keep the default "Use workspace metadata (does not
modify tomcat installation)" option. I just repeated the steps with the
latest build and it works. The steps i use are...
1. Download and install the Apache TomEE Web Profile server
(http://people.apache.org/~dblevins/staging-081/openejb-4.0.0/). For my
installation i extracted the zip file to "C:\Program
Files\apache-tomee-webprofile-1.0.0". Copy any database connector jar files
your webapp needs into the <tomee_install>/lib folder (eg.
mysql-connector-java-5.1.14-bin.jar if you connect to mysql database).
2. In eclipse, click on the Servers tab, right click and select
New->Server.
3. Select Apache->Tomcat v7.0 Server and click "Next >"
4. Set the "Tomcat installation directory" to the location of your
Apache TomEE Web Profile server installation (C:\Program
Files\apache-tomee-webprofile-1.0.0). Click Next.
5. Add your webapp to the server. Click "Finish".
6. In the Servers tab, double click on your server to open up the
"Overview" page. Click on the "modules" tab
7. Click "Add External Web Module". In the "Add Web Module" dialog, for
document base, browse to <tomee_install_dir>/webapps/tomee (ie. C:\Program
Files\apache-tomee-webprofile-1.0.0\webapps\tomee). Set Path: to "/tomee".
Uncheck "Auto reloading enabled". Click OK.
8. Click on the <your webapp> module and click the "Edit..." button.
Uncheck the "Auto reloading enabled" checkbox and click OK. Then click the
save button in eclipse so the server configuration gets saved.
9. On the server "Overview" page, click "Open launch configuration".
In the "Edit launch configuration properties" dialog box, click the
"Arguments" tab. Add whatever vm arguments you want to the "VM arguments"
text field (eg. -Xmx256M -XX:MaxPermSize=256M).
10. Copy the tomee.xml and logging.properties files from the
<apache_tomee_install_dir>\conf folder into the folder created in eclipse
for your server configuration files (eg.
<eclipse_workdir>\Servers\apache-tomee-webprofile-1.0.0 at
localhost-config). In eclipse, click on the Servers folder and hit F5 to
refresh. These files will now be displayed in eclipse.
11. In eclipse, click on your webapp project, then select
"Project->clean". Hit OK. This will cause eclipse to clean and rebuild your
web application ready to deploy to the tomee server.
12. In the Servers tab, right click on the server and select "Publish".
13. Start the server.
I had a minor issue going from beta2 to 1.0.0 caused by a persistence.xml
file that i had in my webapp project which referenced a jar file that also
contained a persistence.xml. In beta2 you needed the persistence.xml to be
in your webapp project. In tomee 1.0.0 it scans jars in WEB-INF/lib and
finds persistence.xml files contained within them. It was easy to resolve
by just deleting my webapps persistence.xml file.
--
View this message in context:
http://openejb.979440.n4.nabble.com/Problem-deploying-REST-Examples-on-Eclipse-tp4582815p4585104.html
Sent from the OpenEJB User mailing list archive at Nabble.com.