Spring Tool Suite 3.9.5.RELEASE

时间:2018-08-13 11:45:33

标签: pom.xml

文件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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.xantrix.webapp</groupId>
  <artifactId>Test1</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>

  <properties>
    <org.springframework-version>4.0.0.RELEASE</org.springframework-version>
  </properties>

  <dependencies>
     <!-- Spring -->
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-core</artifactId>
       <version>$(org.springframework.version)</version>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-webmvc</artifactId>
       <version>$(org.springframework.version)</version>
     </dependency>
  </dependencies>

  <build>
     <pluginManagement>
       <plugins>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-compiler-plugin</artifactId>
             <version>3.2</version>
             <configuration>
               <source>1.8</source>
               <target>1.8</target>
             </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.4</version>
            <configuration>
              <warSourceDirectory>src/main/webapp/</warSourceDirectory>
              <warName>Test1</warName>
              <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
          </plugin>
       </plugins>
     </pluginManagement>
     <finalName>Test1</finalName>
  </build>
</project>

在依赖项上,我遇到类型“缺少工件org.springframework:spring-core:jar:$(org.springframework.version)”的错误。 文件Jar尚未下载。对我来说,问题是来自文件POM.XML的配置。他们错误地认为,错误可能是由于Jar文件损坏导致的。

0 个答案:

没有答案