<?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> <groupId>com.bjsxt</groupId> <artifactId>nexusweb</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <distributionManagement> <repository> <!--需要与settings.xml 中server 的id 相同--> <id>releases</id> <name>Nexus Release Repository</name> <url>http://192.168.0.101:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <!--需要与settings.xml 中server 的id 相同--> <id>snapshots</id> <name>Nexus Snapshot Repository</name> <url>http://192.168.0.101:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <path>/</path> <port>8080</port> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.1.2</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
上传源码报如下错误
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project nexusweb: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
上传源码的时候报错 不知道什么情况 请老师指点下