How do I satisfy new milestone 6 warnings elicited by the maven plugin?

I understand from the migration guide that getPomDirName(), setPomDirName(), getPomDir() are all deprecated, but I am not calling those methods. I am just using the Gradle-bundled maven plugin in the documented way and I get the following warnings:

The MavenPluginConvention.getPomDirName() method is deprecated and will be removed in the next version of Gradle. You should use the getMavenPomDir() method instead.
The MavenPluginConvention.getPomDir() method is deprecated and will be removed in the next version of Gradle. You should use the getMavenPomDir() method instead.

How do I satisfy?

Which other plugins do you use? Maybe one of them calls a deprecated method.

Looks to me like a problem with Gradle core or with the Gradle-supplied maven plugin.

Problem occurs if you simply reference ‘project.properties’ after applying the maven plugin. Here is a test case build file:

defaultTasks 'noop'
task noop << { }
  apply plugin: 'maven'
  println 'Properties count = ' + project.properties.size()

You can eliminate the warnings by just commenting out the maven plugin.

By accessing all properties, you also access the deprecated ones. Try to access only the properties you need, with Project.property().

Based on that, I guess that the Maven plugin is adding deprecated properties then.

I already apply criteria to the properties that I work with, but I need to iterate to test the criteria. The effected item is a general plugin and I don’t require my users to use specific property names.

Project.getProperties is a public method: http://www.gradle.org/current/docs/javadoc/org/gradle/api/Project.html#getProperties() I should not be spanked for invoking a method in Gradle’s public API. It is Gradle system bug if simply invoking a public method generates warning messages about items in the Gradle distribution itself. I didn’t add any deprecated properties, so the problem is with Gradle.

Based on that, I guess that the Maven plugin is adding deprecated properties then.

Not sure what you mean by that.

I didn’t add any deprecated properties, so the problem is with Gradle.

Feel free to create an issue, or, even better, a pull request.

Re: Not sure what you meant by that.

You explained to me that by accessing .properties, one accesses deprecated properties too. Since no warning is produced unless the maven plugin is applied, I think it’s safe to deduce: Based on that, I guess that the Maven plugin is adding deprecated properties then. No?

Yes, MavenPluginConvention is added by the Maven plugin.

FYI: It seems that one somewhat unintuitive way of getting this warning is by using the gradle-artifactory plugin. With M6 and by using both the ‘maven’ plugin and the ‘artifactory’ plugin (version 2.0.7) and running a “gradle build” we get:

The MavenPluginConvention.getPomDirName() method is deprecated and will be removed in the next version of Gradle. You should use the getMavenPomDir() method instead.
The MavenPluginConvention.getPomDir() method is deprecated and will be removed in the next version of Gradle. You should use the getMavenPomDir() method instead.

I will ping the jfrog guys on this and see if the above is correct or if I missed something here.