davidB / scala-maven-plugin

The scala-maven-plugin (previously maven-scala-plugin) is used for compiling/testing/running/documenting scala code in maven.
https://davidb.github.io/scala-maven-plugin/
The Unlicense
554 stars 150 forks source link

Maven 3.9.4 Validation Warnings #744

Closed kropptrevor closed 7 months ago

kropptrevor commented 7 months ago

When building a project that uses scala-maven-plugin with -Dmaven.plugin.validation=VERBOSE, I get the following warnings:

[WARNING]
[WARNING] Plugin [INTERNAL, EXTERNAL] validation issues were detected in following plugin(s)
[WARNING]
[WARNING]  * net.alchim31.maven:scala-maven-plugin:4.8.1
[WARNING]   Plugin EXTERNAL issue(s):
[WARNING]    * Plugin is a Maven 2.x plugin, which will be not supported in Maven 4.x
[WARNING]    * Plugin depends on the deprecated Maven 2.x compatibility layer, which will be not supported in Maven 4.x
[WARNING]    * Plugin mixes multiple Maven versions: [3.3.9, 2.2.1]
[WARNING]
[WARNING]
[WARNING] Fix reported issues by adjusting plugin configuration or by upgrading above listed plugins. If no upgrade available, please notify plugin maintainers about reported issues.
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [NONE, INLINE, SUMMARY, BRIEF, VERBOSE]
[WARNING]

pom.xml configuration:

<pluginManagement>
    <plugins>
        <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>4.8.1</version>
        </plugin>
    </plugins>
</pluginManagement>

<plugins>
    <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <configuration>
            <recompileMode>incremental</recompileMode>
            <args>
                <arg>-deprecation</arg>
                <arg>-explaintypes</arg>
                <arg>-target:jvm-1.8</arg>
            </args>
        </configuration>
        <executions>
            <execution>
                <?m2e execute onConfiguration?>
                <id>scala-compile-first</id>
                <phase>process-resources</phase>
                <goals>
                    <goal>add-source</goal>
                    <goal>compile</goal>
                </goals>
            </execution>
            <execution>
                <?m2e execute onConfiguration?>
                <id>scala-test-compile</id>
                <phase>process-test-resources</phase>
                <goals>
                    <goal>add-source</goal>
                    <goal>testCompile</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
</plugins>
slandelle commented 7 months ago

That was a very bad change introduced in maven 3.9.4 that was reverted in maven 3.9.5. Latest maven is 3.9.6.

kropptrevor commented 7 months ago

Thanks, that worked.