• 如何用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>
  • 相关阅读:
    《SQL初学者指南》——第1章 关系型数据库和SQL
    《SQL初学者指南》——第1章 关系型数据库和SQL
    快讯:Oracle自治事务处理数据库发布和19c路线图
    NoReverseMatch: u'polls' is not a registered namespace
    Tomcat配置图片保存路径,图片不保存在项目路径下
    请慎用java的File#renameTo(File)方法
    sentinel monitor mymaster 10.10.17.200 6379 1 1个哨兵同意就切换
    静默错误:Oracle 数据库是如何应对和处理的 ?
    如何对Node.js默认下载路径进行修改
    “我卖一个群可以赚2万,但这个项目,死了!”
  • 原文地址:https://www.cnblogs.com/juniorMa/p/14332707.html
Copyright © 2020-2023  润新知