openhab-core icon indicating copy to clipboard operation
openhab-core copied to clipboard

Deprecation warnings when building with Maven 3.9.x

Open wborn opened this issue 2 years ago • 1 comments

Recent Maven versions log warnings when using deprecated features.


When the Karaf Maven plug-in is used many of these warnings show up:

[WARNING] Parameter 'localRepository' is deprecated core expression; Avoid use of ArtifactRepository type. If you need access to local repository, switch to '${repositorySystemSession}' expression and get LRM from it instead.

I've created KARAF-7685 for this.


Another deprecation warning being logged is:

[WARNING] Parameter 'compilerArguments' is deprecated: use {@link #compilerArgs} instead.

That can be fixed by passing these arguments in the config using

              <arg>-annotationpath</arg>
              <arg>CLASSPATH</arg>
              <arg>-classpath</arg>
              <arg>${project.build.directory}/dependency</arg>

However that will likely cause issues when developing with Eclipse, because the lastNPE plug-in does not take these args into consideration (https://github.com/lastnpe/eclipse-external-annotations-m2e-plugin/issues/11).

wborn avatar Apr 01 '23 08:04 wborn

However that will likely cause issues when developing with Eclipse, because the lastNPE plug-in does not take these args into consideration (https://github.com/lastnpe/eclipse-external-annotations-m2e-plugin/issues/11).

I did some testing and debugging and found that there won't be any issues when adapting our configuration. There will only be issues with the Eclipse lastNPE plug-in when configuring the compiler with a properties file, i.e.:

<compilerArguments>
    <properties>...<properties>
</compilerArguments>

In our case the EEAs gets configured via configureRawClasspath(..).

wborn avatar Aug 26 '23 14:08 wborn