Configure Tomcat servers for Maven:
Open ~/.m2/settings.xml (if it doesn't exist, create it), add the following lines:
Live, Learn, Work And Share
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<!-- Omit the irrelevant information here -->
<server>
<id>Tomcat7</id>
<username>tomcat</username>
<!-- Change this password -->
<password>mypassword</password>
</server>
<!-- Omit the irrelevant information here -->
</servers>
</settings>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<server>Tomcat7</server>
<!-- Change the name of your server -->
<url>http://example.com:8080/manager/text</url>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
</configuration>
</plugin>
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="mypassword" roles="manager-gui,manager-script"/>
</tomcat-users>
Không có nhận xét nào:
Đăng nhận xét