maven tomcat

์ƒ์„ฑ์ผ: 2021๋…„ 11์›” 24์ผ ์˜คํ›„ 3:29

ํ†ฐ์บฃ7๋กœ๋จ, ์•„๋ž˜์ฒ˜๋Ÿผ ์„ธํŒ…ํ•ด์ฃผ๊ณ  ํ†ฐ์บฃ ์„œ๋ฒ„์žฌ๊ธฐ๋™ํ•˜๋ฉด ํ†ฐ์บฃ์— ๋ฐฐํฌ ํ’€๋ฆผ

pom.xml

			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.0</version>
				<configuration>
					<url>http://127.0.0.1:8080/manager/text</url>
					<server>TomcatServer</server>
					<path>/${project.build.finalName}</path>
					<username>admin</username>
					<password>password1234</password>  
				</configuration>
			 </plugin>
์—๋Ÿฌ๋‚˜์„œ ์ถ”๊ฐ€ํ•จ
<dependency>
		    <groupId>org.apache.maven.plugins</groupId>
		    <artifactId>maven-war-plugin</artifactId>
		    <version>2.2</version>
		</dependency>

~/.m2/settings.xml

<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>
      <server>
         <id>TomcatServer</id>
         <username>admin</username>
         <password>password1234</password>
      </server>
   </servers>
</settings>

tomcat-users.xml

<role rolename="manager-script"/>
<user username="admin" password="password1234" roles="manager-script"/>

Last updated