Julia Boes schrieb am 25.08.2020 19:39 (GMT +07:00):

> Brief update: It turns out that mvn clean and install have to be run
> separately due to a problem with the shade plugin, so
> 
> $ mvn clean && mvn install
> 
> works with the 2 added profiles and JDK 14.

This seems to be unrelated to your problem, but anyway, just in case you
are referring to the fact that Maven Shade will try to re-shade an
already shaded JAR, showing lots of warnings for duplicate classes, I
remember I had that too in the past and this helps avoid it:

<plugin>
  <artifactId>maven-jar-plugin</artifactId>
  <configuration>
    <!-- Re-create original JAR in order to avoid re-shading already shaded JAR 
in non-clean builds -->
    <forceCreation>true</forceCreation>
  </configuration>
</plugin>

Just in case you also create a shaded source JAR like me, you also want to use:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-source-plugin</artifactId>
  <configuration>
    <!-- Re-create original source JAR in order to avoid re-shading already 
shaded JAR in non-clean builds -->
    <forceCreation>true</forceCreation>
  </configuration>
</plugin>


> However, I see the same compilation error as mentioned before when
> running with JDK 11.

I will look into it and reply separately.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to