zoukankan      html  css  js  c++  java
  • Maven POM 模板[z]

    https://juejin.im/post/5cc826a5f265da03a33c443a

    [z]https://juejin.im/post/5cc826a5f265da03a33c443a

    SpringBoot POM:

    https://start.spring.io

    单独项目的 POM 模板:

     
    <?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/maven-v4_0_0.xsd">
    
        <modelVersion>4.0.0</modelVersion>
        <groupId>[GROUP ID]</groupId>
        <artifactId>[ARTIFACT_ID]</artifactId>
        <packaging>jar</packaging>
        <version>0.0.1-SNAPSHOT</version>
    
        <!-- 基本属性和自定义属性 -->
        <properties>
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
    
        <!-- 依赖关系 -->
        <dependencies>
        </dependencies>
    
        <build>
            <plugins>
              
                <!-- 如果需要对源代码打包 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
    
                <!-- 如果需要打包的时候拷贝依赖库 -->
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                
                <!-- 如果项目需要分发到仓库 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
    
        <!-- 项目分发的仓库配置 -->
        <distributionManagement>
            <repository>
                <id>nexus-releases</id>
                <name>public</name>
                <url>http://[repository-server]/nexus/content/repositories/releases/</url>
            </repository>
            <snapshotRepository>
                <id>nexus-snapshots</id>
                <name>Snapshots</name>
                <url>http://[repository-server]/nexus/content/repositories/snapshots/</url>
            </snapshotRepository>
        </distributionManagement>
    </project>
  • 相关阅读:
    接口(interface)的使用于注意事项
    构造方法
    MySQL数据库软件
    final与static的作用
    区分like和in
    list,set,map各有什么异同?
    简述 Overload 与 Override
    标识符的基础知识
    类的继承关系
    MySQL常见索引失效
  • 原文地址:https://www.cnblogs.com/jjj250/p/10825701.html
Copyright © 2011-2022 走看看