Skip to content

requireManagedDeps profile property not resolving #355

@delanym

Description

@delanym

With the rule <requireManagedDeps/> I get this error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.2:enforce (default) on project parent: 
[ERROR] Rule 10: org.codehaus.mojo.extraenforcer.dependencies.EnforceManagedDepsRule(requireManagedDeps) failed with message:
[ERROR] The following 1 dependencies are NOT using a managed version:
[ERROR] 
[ERROR]   - org.checkerframework:checker-qual:jar

Which I assumed was because the dep.anno.checkframework property was defined in the base project configuration, so I moved the property definition to the profile where it is used

<profile>
      <id>checker</id>
      <activation>
        <property>
          <name>checker</name>
        </property>
      </activation>
      <properties>
        <dep.anno.checkframework>3.53.1</dep.anno.checkframework>
      </properties>
      <dependencies>
        <dependency>
          <groupId>org.checkerframework</groupId>
          <artifactId>checker-qual</artifactId>
          <version>${dep.anno.checkframework}</version>
          <scope>provided</scope>
        </dependency>
      </dependencies>

and it still fails.

I see https://www.mojohaus.org/extra-enforcer-rules/requireManagedDeps.html i can turn off profile validation, but i don't want to do that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions