zoukankan      html  css  js  c++  java
  • 如何用Maven打war包

      我的控制台代码就是打的war包

      

    <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/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <parent>
            <groupId>com.suning.framework</groupId>
            <artifactId>snf-parent</artifactId>
            <!-- <version>3.0.8-SNAPSHOT</version> -->
            <version>4.0.6</version>
        </parent>
    
        <groupId>com.suning.rdrs</groupId>
        <artifactId>rdrs_admin</artifactId>
        <packaging>war</packaging>
        <version>0.0.1-SNAPSHOT</version>
        <name>RDRS_ADMIN_SYSTEM</name>
        <url>http://maven.apache.org</url>
    
    
        <properties>
            <!--maven properties -->
            <maven.test.skip>false</maven.test.skip>
            <downloadSources>true</downloadSources>
            <!-- compiler settings properties -->
            <java_source_version>1.8</java_source_version>
            <java_target_version>1.8</java_target_version>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <file_encoding>UTF-8</file_encoding>
            <spring-version>4.3.9.RELEASE</spring-version>
            <jacoco.version>0.7.7.201606060606</jacoco.version>
            <rdrs-share.version>2.2.0.08-SNAPSHOT</rdrs-share.version>
        </properties>
    
        <dependencies>
    
        ...                
        </dependencies>
    
        <profiles>
            <profile>
                <id>dev</id>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
                <build>
                    <filters>
                        <filter>vars/vars.dev.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>sit</id>
                <build>
                    <filters>
                        <filter>vars/vars.sit.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>pre</id>
                <build>
                    <filters>
                        <filter>vars/vars.pre.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>prod</id>
                <build>
                    <filters>
                        <filter>vars/vars.prod.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>pst</id>
                <build>
                    <filters>
                        <filter>vars/vars.pst.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>poca</id>
                <build>
                    <filters>
                        <filter>vars/vars.poca.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>xgpre</id>
                <build>
                    <filters>
                        <filter>vars/vars.xgpre.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>sit2</id>
                <build>
                    <filters>
                        <filter>vars/vars.sit2.properties</filter>
                    </filters>
                </build>
            </profile>
            <profile>
                <id>preyg</id>
                <build>
                    <filters>
                        <filter>vars/vars.xgpreyg.properties</filter>
                    </filters>
                </build>
            </profile>
        </profiles>
    
        <build>
            <finalName>rdrs-admin</finalName>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <useDefaultDelimiters>false</useDefaultDelimiters>
                        <delimiters>
                            <delimiter>$[*]</delimiter>
                        </delimiters>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
    
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
    
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <outputFileNameMapping>@{artifactId}@-@{baseVersion}@.@{extension}@</outputFileNameMapping>
                    </configuration>
                </plugin>
            </plugins>
    
            <resources>
                <resource>
                    <directory>${basedir}/src/main/resources</directory>
                    <filtering>true</filtering>
                    <includes>
                        <include>**/*.*</include>
                    </includes>
                </resource>
    
                <resource>
                    <directory>${basedir}/src/main/java</directory>
                    <includes>
                        <include>**/*.xml</include>
                    </includes>
                </resource>
            </resources>
        </build>
    </project>
  • 相关阅读:
    前端笔试题目总结——应用JavaScript函数递归打印数组到HTML页面上
    HTM5新增结构化元素&非结构化元素&新增属性详解
    HTML 5 与HTML 4 的区别
    HTML5框架、背景和实体、XHTML的使用规范
    百度前端笔试题目--css 实现一个带尖角的正方形
    HTML5表单提交和PHP环境搭建
    HTML5列表、块、布局
    HTML5 格式化、样式、链接、表格
    2020-09-13助教一周总结(第二周)
    2020-09-10上课小结
  • 原文地址:https://www.cnblogs.com/juniorMa/p/14332707.html
Copyright © 2011-2022 走看看