Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the '-Amapstruct.unmappedTargetPolicy' config of maven-compiler-plugin #148

Open
WangXiaoJin opened this issue Jul 15, 2023 · 1 comment

Comments

@WangXiaoJin
Copy link

When I use the -Amapstruct.unmappedTargetPolicy=IGNORE config in maven-compiler-plugin , mapstruct-idea don't understand this config, and the IDEA still throw warn msg 'Unmapped target properties'.

pom.xml

<pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <parameters>true</parameters>
            <annotationProcessorPaths>
              <path>
                <groupId>com.github.therapi</groupId>
                <artifactId>therapi-runtime-javadoc-scribe</artifactId>
                <version>${therapi-runtime-javadoc-scribe.version}</version>
              </path>
              <path>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <version>${spring-boot.version}</version>
              </path>
              <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
              </path>
              <path>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${mapstruct.version}</version>
              </path>
            </annotationProcessorPaths>
            <showWarnings>true</showWarnings>
          </configuration>
          <executions>
            <execution>
              <id>default-compile</id>
              <goals>
                <goal>compile</goal>
              </goals>
              <configuration>
                <compilerArgs>
                  <arg>
                    -Amapstruct.unmappedTargetPolicy=IGNORE
                  </arg>
                </compilerArgs>
              </configuration>
            </execution>
          </executions>
        </plugin>
    </plugins>
</pluginManagement>

image

@filiphr
Copy link
Member

filiphr commented Jul 29, 2023

This is a good enhancement for the project. Are you interested in contributing this to the project @WangXiaoJin?

I am not sure how we can access the maven compiler compiler arguments and how this works with gradle projects. So if someone has an idea, please let us know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants