Skip to content

Maven resources plugin does not honour maven.test.skip flag #497

Description

@desruisseaux

Affected version

4.0.0-beta-2-SNAPSHOT

Bug description

The following integration test fails when Maven Resource Plugin 4.0.0-beta-2-SNAPSHOT is tested with Maven 4.0.0-rc-6:

This integration test has the following configuration in its pom.xml:

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>@project.version@</version>
          <configuration>
            <skip>true</skip>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

The ResourcesMojo class has the following field:

    /**
     * You can skip the execution of the plugin if you need to. Its use is NOT RECOMMENDED, but quite convenient on
     * occasion.
     *
     * @since 3.0.0
     */
    @Parameter(property = "maven.resources.skip", defaultValue = "false")
    private boolean skip;

The TestResourcesMojo class has the following field:

    /**
     * Set this to 'true' to bypass copying of test resources.
     * Its use is NOT RECOMMENDED, but quite convenient on occasion.
     * @since 2.6
     */
    @Parameter(property = "maven.test.skip", defaultValue = "false")
    private boolean skip;

I verified in the debugger that the skip flag is true in ResourcesMojo but not in TestResourcesMojo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions