blob: 3cd0bd8d7be7ce7a0ed7d718110c09123e455594 [file] [log] [blame]
= TomEE and Eclipse using Webby
:jbake-type: page
:jbake-status: published
If you want to use Eclipse and WTP (the classic way), please read this xref:tomee-and-eclipse.adoc[docs].
If you intends to run a Maven WAR project, you can adopt link:https://github.com/tesla/m2eclipse-webby[m2eclipse-webby], because it will be more efficient. In this case, follow this docs.
== Prerequisite
Download and install both Apache TomEE (1.7.2 minimum) and Eclipse IDE (not JavaEE version, because Webby doesn't work if link:https://www.eclipse.org/m2e-wtp[m2eclipse-WTP] is present).
=== m2eclipse
The next thing you need is link:http://www.eclipse.org/m2e[m2eclipse] plugin.
If you doesn't have it in your eclipse package, install it like another plugin.
=== Webby
. Then you need to install link:https://github.com/tesla/m2eclipse-webby[m2eclipse-webby]
. In eclipse, select menu "Help" / "Install new software", and type this URL : https://repository.takari.io/content/sites/m2e.extras/m2eclipse-webby/0.2.2/N/LATEST/
. Select Web Application Launcher for M2Eclipse / Webby Core
. Click Finish and continue the classic installation way.
. Restart eclipse.
== Setting up eclipse project
. Create new Maven project or import an existing one (only War project are accepted with Webby).
. Add new Debug configuration (Right click on the project / Debug As / Debug Configuration)
. Select Launch Type "Webby", right click "New"
. Browse your project if it not present
. Type an optionnal context root
. Select container "tomee1x" and select "Installed" as type (the only way who works right now)
. Browse your tomEE installation in "Home" section
. Optionnal : change port and timeout values.
. Click "Apply", and "Debug" to start TomEE.
== Webby capabilities
* Webby manage code hot replacement if you don't change method signature and so on... If other case you need to restart it.
* Webby manage hot jsp replacement too.
* If you want to see Webby status Click menu "Widows" / "Show View" / "Other" / "Webby" / "Webapps". You can start and stop webby in this panel.
* If you need to start 2 or more Webby in the same time, you need to change port to at least 3 numbers more. Example : 8080 and 8084 (other value are reserved by Webby automatically).
* If you have an error "timeout ..." during Webby start, you can change the Webby timeout in debug configurations (Note : this error will not stop Webby, it's just a warning).
* In opposite to m2eclipse-WTP, Webby will not "publish" all of your project dependencies. It makes just a link to your Maven local repositories. You can see the entire list of dependencies in Webby start console.
* If you want to "publish" you code in Webby, just start it and it works.