人长大了,过年都觉得没什么意思了。今天大年初一就在家了。有点无聊。下午在弄Linux,本来装了centos minial 可是文字界面,网络连接搞不定。然后就转到ubuntu server 了,之所以这样做,是因为本来用linux也是为了做服务器用,而且服务器版开机不起其他进程的话,占用的内存很少。因为不需要桌面。
今天我想分享的是使用maven插件部署we项目到tomcat 7 中运行。之前如果我们没有使用maven,那么我想很多人都是使用的eclipse自带的run on server中选择tomcat,将web项目部署到tomcat中实现自动部署和运行。我想maven本身强大也在于,我们可以写很多插件(plugin)来扩展maven的功能,实现各种自动化的操作。下面进入正题。
Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.0:deploy (default-cli) on project my-webapp: Cannot invoke Tomcat manager: Server returned HTTP response code: 403 for URL:
Although hardly a comprehensive list, these are the most common default lifecycle phases executed.
validate: validate the project is correct and all necessary information is available
compile: compile the source code of the project
test: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package: take the compiled code and package it in its distributable format, such as a JAR.
integration-test: process and deploy the package if necessary into an environment where integration tests can be run
verify: run any checks to verify the package is valid and meets quality criteria
install: install the package into the local repository, for use as a dependency in other projects locally
deploy: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
There are two other Maven lifecycles of note beyond the default list above. They are
clean: cleans up artifacts created by prior builds
site: generates site documentation for this project
log4j:WARN No appenders could be found for logger (org.springframework.osgi.extender.internal.activator.ContextLoaderListener). log4j:WARN Please initialize the log4j system properly.
jvm 1 | 2011-12-29 22:59:40 WARN [er_start_runner] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - No configuration file in place, copying the default one and continuing with it.