我需要使用maven部署服务器tomcat,但由于连接我有错误..我不明白
Tomcat的user.xml
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-script"/>
<user username="admin" password="password" roles="manager-script"/>
行家/ settings.xml中
<server>
<id>TomcatServer</id>
<username>admin</username>
<password>password</password>
</server>
和pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd“&GT; 4.0.0 战争 com.epitech.area 区域 1.0-SNAPSHOT
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>web\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>TomcatServer</server>
<path></path>
<username>admin</username>
<password>password</password>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.github.scribejava</groupId>
<artifactId>scribejava-apis</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>[4.0,)</version>
</dependency>
</dependencies>
mvn错误
mvn tomcat:deploy
[INFO] --- tomcat-maven-plugin:1.1:deploy (default-cli) @ Area ---
[INFO] Deploying war to http://localhost:8080/Area
[INFO] ---------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------
[INFO] Total time: 2.630 s
[INFO] Finished at: 2017-10-24T18:07:13+02:00
[INFO] Final Memory: 18M/60M
[INFO] ---------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-
plugin:1.1:deploy (default-cli) on project Area: Cannot invoke Tomcat
manager: Connection refused (Connection refused) -> [Help 1]
我不清楚为什么,你能帮助我吗,Maven对我来说非常模糊。
我的端口未被使用,当我在IntelliJ中使用工件运行时,我的应用程序已启动。
我需要一个带有Maven的.war