zoukankan      html  css  js  c++  java
  • 通过Maven导出war包时报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project

    通过Maven导出war包时报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project Ocr: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] 

    原因是找不到web.xml,在pom文件中添加如下配置可以解决:

        <build>
            <plugins>
                <plugin>
                    <groupId>org.mybatis.generator</groupId>
                    <artifactId>mybatis-generator-maven-plugin</artifactId>
                    <version>1.3.7</version>
    <!--                 <configuration>
                        <configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile>
                        <verbose>true</verbose>
                        <overwrite>true</overwrite>
                    </configuration> -->
                    <dependencies>
                        <dependency>
                            <groupId>mysql</groupId>
                            <artifactId>mysql-connector-java</artifactId>
                            <version>5.1.42</version>
                        </dependency>
                    </dependencies>
    
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.2</version>
                    <configuration>
                        <webXml>WebContentWEB-INFweb.xml</webXml>
                    </configuration>
                </plugin>
    
            </plugins>
        </build>
  • 相关阅读:
    UIScrollView
    xcode debug
    ios 开发小技巧
    xcode调试
    Objective-C的反射机制
    git 命令
    iOS block的一些理解
    iOS 开发常用宏
    iOS 常用函数
    转:支付宝系统架构(内部架构图)
  • 原文地址:https://www.cnblogs.com/appium/p/13392012.html
Copyright © 2011-2022 走看看