我将现有的Maven项目导入Eclipse,然后将其部署到tomcat中。当我看一下文件夹/ WEB-INF / lib时,我没有找到任何JAR文件。
的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bookshop.main</groupId>
<artifactId>BookShop</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<spring.version>4.0.5.RELEASE</spring.version>
<junit.version>4.11</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
<version>4.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
<version>4.0.1.RELEASE</version>
</dependency>
</dependencies>
<build>
<finalName>BookShop</finalName>
</build>
</project>
引用“eclipse项目右键单击 - &gt;属性 - &gt;部署程序集 - &gt;添加 - &gt; Java构建路径”,它没有帮助。
你有什么想法吗?谢谢。
btw:我在重新部署时也收到以下错误消息:
无法重新部署,因为在取消部署阶段无法完全删除。
答案 0 :(得分:1)
错误是:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
我没有在maven repository.Sorry中看到这样的工件。