1

I was tasked to update a project with Maven 3.0 / Java 8 to Maven 3.6 / Java 12. To my best knowledge I did just that, changing all kinds of dependencies. Now when running the build the integration-test phase seems to be missing.

For example, the following plug-in is not called any longer during clean verify:

<plugin>
    <groupId>com.google.code.maven-replacer-plugin</groupId>
    <artifactId>maven-replacer-plugin</artifactId>
    <version>1.4.1</version>
    <executions>
        <execution>
            <id>do-magic</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>replace</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
            <!-- ... -->
    </configuration>
</plugin>

I can easily search the build log for do-magic, so I can confirm it's called in Java 8 but not in Java 12 (even though there might be some other changes I'm not aware of right now).

The debug output is:

[DEBUG] Goal:          com.google.code.maven-replacer-plugin:maven-replacer-plugin:1.4.1:replace (do-magic)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <!-- same as above-->
</configuration>

So there is no information on why it is not executed.

I tried calling the goal integration-test manually, still the plug-in is not called. There is no additional information either.

I have no idea where to look for the source of the problem. I wouldn't even know where to disable integration tests like this (except for maybe maven.test.skip, which removes the test module from the reactor altogether, so it's not that).

Can anybody shed some light on this issue?

Ruslan López
  • 4,433
  • 2
  • 26
  • 37
Stefan S.
  • 3,950
  • 5
  • 25
  • 77

1 Answers1

0

The problem isn't that the integration-test phase is skipped, it's that suddenly maven-surefire-plugin decided it wants to execute the tests as well. That fails, because the pre-integration-test phase is needed for the tests.

I have no idea why that suddenly happened, so here is a pseudo fix that disables Surefire again:

<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
            <!-- We run integration tests with failsafe! -->
            <skip>true</skip>
    </configuration>
</plugin>
Stefan S.
  • 3,950
  • 5
  • 25
  • 77