How to ignore the Java Source directory during Maven Compilation?

前端 未结 5 2010
傲寒
傲寒 2020-12-13 19:59

I am trying to use the Lombok Maven Plugin to ensure the correct creation of Javadocs when using Lombok.

Lombok Maven introduces a new code generation goal, just pri

5条回答
  •  轮回少年
    2020-12-13 20:36

    Create a new Maven profile, and in the new profile, just redefine the sources:

    target/generated-sources/delombok
    

    Alternatively

    1. Build helper: there's a build helper which seems to provide this functionality, but I have not used this before.
    2. Hack: there's a hack described here, but the author recommends against it, and besides: if you're going to take the time to modify your POM and create this hack, you may as well do things The Right Way and implement a profile.

提交回复
热议问题