The build-helper plugin indeed solved the problem. Thanks @Joe for the comment.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/wrappers</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…