【发布时间】:2017-03-06 01:31:11
【问题描述】:
我正在尝试在全局级别设置自定义输出目录,而不会弄乱每个项目的 pom.xml 文件。
我创建了~/.m2/settings.xml:
<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">
<profiles>
<profile>
<id>test-target</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<directory>/tmp/test</directory>
</build>
</profile>
</profiles>
</settings>
但是我在运行mvn clean install时遇到错误
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'build' (position: START_TAG seen ...</activation>\r\n <build>... @16:13) @ /home/guest/.m2/settings.xml, line 16, column 13
[WARNING]
【问题讨论】:
标签: maven