C4 Using Maven (Cont.)



















Deploy your project automatically to Tomcat

If you feel really annoying to copy
your war file that generated by Maven, you can use the tomcat plugin with
tomcat:deploy goal.

I have been struggling for quite a
long time to run it as, I didn’t realise that I couldn’t use the default tomcat
admin account, but I have to specify it myself (not so sure why the default one
couldn’t work and kept getting the “cannot invoke tomcat manager” error). As
you see in the code above, I have specified the username and password in the
server tag. In pair, I also need to specify the plugin configuration in the pom
file to apply that sever setting.












As you can see from the commented
tags, the configuration also provides you the opportunity to specify the war
file or directory that you want to deploy from.


This entry was posted in Maven. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s