1. POM.xml文件中,使用某个jar包,依赖该如何写?
可以从以下查询:
http://mvnrepository.com
http://search.maven.org
2. Maven Web工程,自动部署到Tomcat。将以下添加到 POM.xml。
cargo插件官网: http://cargo.codehaus.org
<build>
<finalName>spring</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.2.3</version>
<configuration>
<container>
<containerId>tomcat6x</containerId>
<home>/usr/local/apache-tomcat-6.0.41</home>
</container>
<!--可以选择standalone和existing两种模式-->
<configuration>
<type>standalone</type>
<home>${project.build.directory}/platform</home>
</configuration>
</configuration>
<executions>
<execution>
<id>cargo-run</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>