- Expand Servers directory as shown in your projects package view
- Create a new dir = instances
- Open Server view from -> Window -> Show Percpective -> Servers
- Double click on the server instance to view its config overview.
- On Configuration path: point it to "Servers/tc-6.0.32-config"
- From "Server Locations" select the radio button, select "Use custom location"
- Server path: point it to "Servers\tc-6.0.32-config\instances"
Note: Your final config overview should look something like this:
Now lets save it and ask Maven to generate the target output to our instances directory created above.
- Ctrl + S to save the changes.
- In your POM file add this line:
org.apache.maven.plugins maven-war-plugin ${war.plugin.version} ../Server/ts-6.0.32/instance/webapps/name_of_project_for_easy_identification [..] - Right click your Maven project select Run As -> build or alternatively execute:
clean install -X -Dmaven.test.skip.exec=true
- Select your Servers directory and refresh. Maven will push build files to both targets and your instances/webapps location described above.
- Finally Start your server and job done.
Wednesday 29 February 2012
Deploy to Tomcat instance on Eclipse - Steps for Maven enabled projects.
A while ago I was looking for an approach to enable Maven deploy Java web Applications to Tomcat server installed on my eclipse IDE. Did some googling around and did not find anything relevant to my search, and so came up with this approach.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment