有關於spacy,en使用的一些bug
環境變數
setx MAVEN_HOME = D:\maven
setx PATH = %MAVEN%\bin
Maven的JVM的引數
setx MAVEN_OPT = -Xms256m -Xmx512m
maven 日誌
1,conf/logging/simplelogger.properties
2,MAVEN_OPTS=-Dorg.slf4j.simpleLogger.showThreadName=true mvn
更多
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">
<!-- 本地儲存庫的路徑 -->
<localRepository>D:\SoftwareDevelopmentEnvironment\JavaSoftwareEnvironment\maven\LocalRepository</ localRepository>
<!-- 互動模式,命令列 -->
<interactiveMode>true</interactiveMode>
<!-- 離線 -->
<offline>false</offline>
<!-- 外掛組 -->
<pluginGroups></pluginGroups>
<!-- 代理 -->
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>
<!-- 伺服器 -->
<servers>
<!-- server
<server>
<id>deploymentRepo</id>
<username>repouser</username>
<password>repopwd</password>
</server>
-->
<!-- 使用私鑰登入到伺服器
<server>
<id>siteServer</id>
<privateKey>/path/to/private/key</privateKey>
<passphrase>optional; leave empty if not used.</passphrase>
</server>
-->
</servers>
<!-- 映象源 -->
<mirrors>
<mirror>
<id>huaweicloud</id>
<mirrorOf>*</mirrorOf>
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里雲公共倉庫</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<mirror>
<id>nexus-163</id>
<mirrorOf>*</mirrorOf>
<name>Nexus 163</name>
<url>http://mirrors.163.com/maven/repository/maven-public/</url>
</mirror>
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>central repo</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
<profiles>
<!-- profile
<profile>
<id>jdk-1.4</id>
<activation>
<jdk>1.4</jdk>
</activation>
<repositories>
<repository>
<id>jdk14</id>
<name>Repository for JDK 1.4 builds</name>
<url>http://www.myhost.com/maven/jdk14</url>
<layout>default</layout>
<snapshotPolicy>always</snapshotPolicy>
</repository>
</repositories>
</profile>
-->
<!--
<profile>
<id>env-dev</id>
<activation>
<property>
<name>target-env</name>
<value>dev</value>
</property>
</activation>
<properties>
<tomcatPath>/path/to/tomcat/instance</tomcatPath>
</properties>
</profile>
-->
</profiles>
<!-- activeProfiles
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
-->
</settings>
要注意的地方
settings.xml檔案可能存在兩個位置:
Maven預設: ${maven.home}/conf/settings.xml
使用者目錄下: ${user.home}/.m2/settings.xml
如果兩個檔案都存在,重複覆蓋,其中以使用者settings.xml為主,優先。
如果使用私鑰登入到伺服器,請確保省password。否則,金鑰將被忽略。
maven映象
id,name:此映象的唯一識別符號和使用者友好名稱。
在id用於區分mirror,並從所述挑選相應的證書連線到反射鏡時部。
url:此映象的基本URL。構建系統將使用此URL連線到儲存庫,而不是原始儲存庫URL。
mirrorOf:指定儲存庫。 中央倉庫central。
profile
構建編譯配置
指定使用環境
<activation>
<property>
<name>target-env</name>
<value>dev</value>
</property>
</activation>
匹配jdk版本
<id>jdk-1.4</id>
<activation>
<jdk>1.4</jdk>
</activation>
啟用環境,沒有找到就使用預設的
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
儲存庫
簡單說就是映象網站下,專案分類目錄,類如https://repo1.maven.org/maven2/HTTPClient/
updatePolicy:此元素指定應該嘗試進行更新的頻率。Maven會將本地POM的時間戳(儲存在儲存庫的maven-metadata檔案中)與遠端進行比較。選項包括:always,daily(預設),interval:X(其中X是分鐘內的整數)或never。
checksumPolicy:當Maven將檔案部署到儲存庫時,它還將部署相應的校驗和檔案。你的選擇是ignore,fail或者warn在丟失或不正確的校驗。
佈局:在以上對儲存庫的描述中,提到它們都遵循相同的佈局。這基本上是正確的。Maven 2的儲存庫具有預設佈局。但是,Maven
1.x具有不同的佈局。使用此元素可以指定是default還是legacy。
<repositories>
<repository>
<id>codehausSnapshots</id>
<name>Codehaus Snapshots</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://snapshots.maven.codehaus.org/maven2</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
</pluginRepositories>
我的配置
<?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">
<!-- 本地儲存庫的路徑 -->
<localRepository>D:\SoftwareDevelopmentEnvironment\JavaSoftwareEnvironment\maven\LocalRepository</localRepository>
<!-- 互動模式,命令列 -->
<interactiveMode>true</interactiveMode>
<!-- 離線 -->
<offline>false</offline>
<!-- 外掛組 -->
<pluginGroups></pluginGroups>
<!-- 代理 -->
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>
<!-- 伺服器 -->
<servers>
<!-- server
<server>
<id>deploymentRepo</id>
<username>repouser</username>
<password>repopwd</password>
</server>
-->
<!-- 使用私鑰登入到伺服器
<server>
<id>siteServer</id>
<privateKey>/path/to/private/key</privateKey>
<passphrase>optional; leave empty if not used.</passphrase>
</server>
-->
</servers>
<!-- 映象源 -->
<mirrors>
<mirror>
<id>huaweicloud</id>
<mirrorOf>*</mirrorOf>
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里雲公共倉庫</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<mirror>
<id>nexus-tencentyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus tencentyun</name>
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
</mirror>
<mirror>
<id>nexus-163</id>
<mirrorOf>*</mirrorOf>
<name>Nexus 163</name>
<url>http://mirrors.163.com/maven/repository/maven-public/</url>
</mirror>
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>central repo</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
</mirrors>
<!-- 構建環境 -->
<profiles>
<profile>
<id>default</id>
<activation>
<jdk>1.8</jdk>
</activation>
<repositories>
<repository>
<id>central</id>
<url>https://maven.aliyun.com/repository/central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jcenter</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>public</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>google</id>
<url>https://maven.aliyun.com/repository/google</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring</id>
<url>https://maven.aliyun.com/repository/spring</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-plugin</id>
<url>https://maven.aliyun.com/repository/spring-plugin</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache snapshots</id>
<url>https://maven.aliyun.com/repository/apache-snapshots</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>nexus-163</id>
<name>Nexus 163</name>
<url>http://mirrors.163.com/maven/repository/maven-public/</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus-163</id>
<name>Nexus 163</name>
<url>http://mirrors.163.com/maven/repository/maven-public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
</settings>