zoukankan      html  css  js  c++  java
  • pom.xml配置

    1:头部引用

    <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">
    </project>

    2:添加数据源数据,并调用数据源的jar包

    <!-- 添加数据源 -->
    
    <repositories>
        <repository>
            <id>mvn-repo</id>
            <url>http://maven.nlpcn.org/</url>
        </repository>
    </repositories>
    
    <!-- 调用数据源的jar包 -->
    
    <dependencies>
        <dependency>
            <groupId>org.ansj</groupId>
            <artifactId>ansj_seg</artifactId>
            <version>5.0.1</version>
        </dependency>
    </dependencies>
    View Code

    3:设置Java的版本号

    <build>
        <plugins>
            <!-- 设置Java的版本号 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    View Code

    4:web.xml路径设置

    <build>
        <plugins>
            <!-- web.xml路径设置 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>webapp</directory>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>
    View Code

     5:指定属性

    <properties>
      <junit.version>3.8.1</junit.version><!-- 指定junit的版本 -->
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <jdk.version>1.7</jdk.version>
    </properties>

    ---------------------------------

    一步一步学习,不断成长。

  • 相关阅读:
    [ARC074C] RGB Sequence
    [SHOI2014] 概率充电器
    CF368B Sereja and Suffixes
    CF980D Perfect Groups
    Rainbow Roads(gym101617G)(DFS序,差分)
    Educational Codeforces Round 104 (Rated for Div. 2)(A~E)
    Floor and Mod(CF1485C)(数论)
    Longest Simple Cycle(CF1476C)(线性dp)
    Factories(Gym102222G)(树形dp+背包)
    Codeforces Round #699 (Div. 2)(A,B,C,D)
  • 原文地址:https://www.cnblogs.com/qypx520/p/5846566.html
Copyright © 2011-2022 走看看