0

我的 maven pom 看起来像这样

<?xml version="1.0" encoding="UTF-8"?>
<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>

  <parent>
    <groupId>x</groupId>
    <artifactId>x</artifactId>
    <version>x</version>
  </parent>

  <groupId>x</groupId>
  <artifactId>x</artifactId>
  <packaging>pom</packaging>

  <repositories>
    <repository>
      <id>x</id>
      <url>x</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <build>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-web</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>xx.xx.xx</groupId>
                  <artifactId>xx</artifactId>
                  <version>xx</version>
                  <classifier>release</classifier>
                </artifactItem>

                <artifactItem>
                  <groupId>xx.xx.xx</groupId>
                  <artifactId>xx</artifactId>
                  <version>xx</version>
                  <type>war</type>
                </artifactItem>

                <artifactItem>
                  <groupId>xx.xx.xx</groupId>
                  <artifactId>xx</artifactId>
                  <version>xx</version>
                  <type>war</type>
                </artifactItem>
              </artifactItems>
              <outputDirectory>/target/output</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>

我想在执行构建之前删除提到的工件项目,以便它从存储库下载最新版本。

当前的行为是,如果本地存储库中存在版本,则不会检查是否存在较新的版本。

我尝试了 -U 选项 && 清除依赖项选项,但没有 wprk

4

0 回答 0