Skip to content

mvn spring-boot:run ignores resource filtering #980

@slavus

Description

@slavus

Hi,
When you run

mvn spring-boot:run -P dev

it ignores maven resource filtering. I have application.properties file with following entry

spring.profiles.active = ${active.profiles}

In my pom.xml I have

    <profile>
      <id>dev</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>

      <properties>
        <active.profiles>dev</active.profiles>
      </properties>
    </profile>

When i do classic mvn package evertyhing works as expected
application.properties becomes:

spring.profiles.active = dev

When I run Application class from eclipse with profile set in m2e plugin, everything also works as expected.

Any ideas why mvn spring-boot:run -P dev ignores resource filtering. ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions