zoukankan      html  css  js  c++  java
  • Maven 使用笔记

    • maven dependency中scope=compile 和 provided区别:http://blog.51cto.com/supercharles888/981316
    • maven profile切换正式环境和测试环境 https://www.cnblogs.com/nfcm/p/7550772.html
    • maven打包 mvn clean package -P dev -Dmaven.test.skip=true
    • maven修改war包名
    <build>
        <finalName>自定义war包名</finalName>
    </build>
    • 修改maven默认编译JDK
    <profile> 
      <id>jdk-1.8</id> 
      <activation> 
        <activeByDefault>true</activeByDefault> 
        <jdk>1.8</jdk> 
      </activation> 
      <properties> 
        <maven.compiler.source>1.8</maven.compiler.source> 
        <maven.compiler.target>1.8</maven.compiler.target> 
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> 
      </properties> 
    </profile>
    • Maven 阿里云镜像配置 settings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
    <!-- 阿里云仓库 -->
    <mirror>
    <id>alimaven</id>
    <mirrorOf>central</mirrorOf>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>
    
    <!-- 中央仓库1 -->
    <mirror>
    <id>repo1</id>
    <mirrorOf>central</mirrorOf>
    <name>Human Readable Name for this Mirror.</name>
    <url>http://repo1.maven.org/maven2/</url>
    </mirror>
    
    <!-- 中央仓库2 -->
    <mirror>
    <id>repo2</id>
    <mirrorOf>central</mirrorOf>
    <name>Human Readable Name for this Mirror.</name>
    <url>http://repo2.maven.org/maven2/</url>
    </mirror>
    </mirrors> 
    </settings>
    • 配置私有仓库地址
      <profiles>
            <profile>
                <id>jdk-1.8</id>
                <activation>
                    <jdk>1.8</jdk>
                </activation>
                <repositories>
                    <repository>
                        <id>mvnrepository</id>
                        <name>Repository for JDK 1.8 builds</name>
                        <url>http://maven.xxx.com/nexus/content/groups/public/</url>
                        <layout>default</layout>
                        <snapshots>
                            <enabled>true</enabled>
                            <updatePolicy>always</updatePolicy>
                        </snapshots>
                    </repository>
                </repositories>
            </profile>
        </profiles>
  • 相关阅读:
    Visual Studio 2008 可扩展性开发(一):VS概览
    CButtonST使用技巧: CButtonST简介
    Doxygen + Graphviz + Htmlhelp, 成为文档好手
    Django的多数据库处理(垂直分库和水平分库)
    赫曼米勒中国| 设计,让世界更美好。
    maccman/juggernaut
    aptget y install buildessential
    QT分析之WebKit(三)
    Django的多数据库支持,太酷了~
    我们的征途是星辰大海#
  • 原文地址:https://www.cnblogs.com/fqybzhangji/p/9700755.html
Copyright © 2011-2022 走看看