awhitford / lombok.maven

Maven Plugin for Project Lombok
http://projectlombok.org/
MIT License
110 stars 36 forks source link

[#103] Delomboking Fails with Multiple Source Folders #157

Open nils-christian opened 1 year ago

nils-christian commented 1 year ago

Signed-off-by: Nils Christian Ehmke nils-christian.ehmke@bmiag.de

awhitford commented 1 year ago

@nils-christian I don't like that this is a breaking change because it will unnecessarily impact a lot of folks. Can you please elaborate on why you need this? Did you consider specifying multiple executions? Something like:

  <build>
    <plugins>
      <plugin>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>delombok1</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>delombok</goal>
            </goals>
            <configuration>
              <formatPreferences>
                <javaLangAsFQN>skip</javaLangAsFQN>
              </formatPreferences>
              <sourceDirectory>${project.basedir}/src/main/lombok1</sourceDirectory>
              <verbose>true</verbose>
            </configuration>
          </execution>
          <execution>
            <id>delombok2</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>delombok</goal>
            </goals>
            <configuration>
              <formatPreferences>
                <javaLangAsFQN>skip</javaLangAsFQN>
              </formatPreferences>
              <sourceDirectory>${project.basedir}/src/main/lombok2</sourceDirectory>
              <verbose>true</verbose>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>