简体   繁体   English

在带有m2e的Eclipse中,“选择活动配置文件”和“运行配置:配置文件”有什么区别?

[英]What is the difference between “Select Active Profiles” and “Run Configuration: profiles” in Eclipse with m2e?

Currently I have a Maven project in Eclipse Luna. 目前,我在Eclipse Luna中有一个Maven项目。

I defined a profile in the pom.xml: 我在pom.xml中定义了一个配置文件:

    <profile>
        <id>prof</id>
        <properties>
            <deploy.local.backupDir>/cygdrive/c/Users/Ferrarim/Sandbox/FSD/backup</deploy.local.backupDir>
            <deploy.local.warDir>/cygdrive/c/Users/Ferrarim/Workspaces/eclipse-luna-fsd/fsd-backend/target</deploy.local.warDir>
        </properties>
    </profile>

I can find it under (right click on the project in Eclipse): Maven->Select Active profiles. 我可以在以下位置找到它(在Eclipse中右键单击该项目):Maven-> Select Active profile。

I can also create a Maven Run Configuration and put "prof" in the profiles option of the Run Configuration, but it's ignored during the build. 我还可以创建一个Maven运行配置,并将“教授”放入“运行配置”的个人档案选项中,但是在构建过程中将其忽略。

Can someone please explain the difference between the two approaches? 有人可以解释两种方法之间的区别吗?

I would like to the second approach (select profiles via Run Configuration) 我想第二种方法(通过“运行配置”选择配置文件)

The solution was to disable "Build Automatically" under Project menu in Eclipse. 解决方案是在Eclipse的“项目”菜单下禁用“自动构建”。 Obvious after thinking about it... 考虑后很明显...

Edit (to clarify): "Select Maven profiles" is used to choose which profiles are needed during the automatic Eclipse build. 编辑(澄清):“选择Maven概要文件”用于选择在自动Eclipse构建期间需要哪些概要文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM