1

执行“mvn package”后出现此错误,我正在处理 CAS 和 Acitve Directory

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project cas-server-webapp: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: Plugin org.apache.maven.plugins:maven-war-plugin:2.1.1 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-war-plugin:jar:2.1.1 (): Failed to read artifact descriptor for org.apache.maven:maven-archiver:jar:2.4.1: Could not transfer artifact org.apache.maven:maven-archiver:pom:2.4.1 from/to mojo-snapshot (https://nexus.codehaus.org/content/repositories/codehaus-snapshots/): nexus.codehaus.org: Nom ou service inconnu: Unknown host nexus.codehaus.org: Nom ou service inconnu -> [Help 1]

4

1 回答 1

0

你可以确认包methom是否是'war',你可以在pom.xml中添加这个代码

<build>
   <plugins>
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
         <version>3.0.0</version>
         <configuration>
            <webXml>web\WEB-INF\web.xml</webXml>
            <warSourceDirectory>WebContent</warSourceDirectory> -->
         </configuration>
      </plugin>
   </plugins>
</build>

webXml 和 warSourceDirectory 用户自己的路线

于 2019-02-28T07:24:06.997 回答