Maven活动配置文件来源外部。

4
当我尝试获取我的Maven项目的活动配置文件时,我键入以下内容:
mvn help:active-profiles

正如文档所述(http://maven.apache.org/guides/introduction/introduction-to-profiles.html)。 但这就是我得到的:

Active Profiles for Project 'com.mycompany.app:my-app:jar:1.0-SNAPSHOT': 

The following profiles are active:

- testProfile (source: external)

“source: external”是什么意思?因为我在.m2文件夹中的settings.xml文件中设置了配置文件,所以根据文档应该是:
(source: settings.xml)
1个回答

1

源是配置文件定义的位置。外部源表示配置文件定义在settings.xml或profiles.xml中。

请阅读this文章。相关章节为:“如何确定构建过程中使用了哪些配置文件?”源可以是项目的pom.xml、父项目的pom.xml或maven的settings.xml。


1
链接与我发布的那个相同。但是文章中仍然没有提到有“external”选项,它只说源应该是pom.xml或settings.xml。这让我感到困惑,它所谓的“external”是什么意思? - FraK
“Source external”的意思是配置文件在settings.xml或profiles.xml中定义。在文档中搜索“Profiles in external files”。 - aviad
听起来是对的,但是它不应该说“external”,而应该说“settings.xml”,就像例子中一样。 - FraK

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接