Get rid of deprecated method in the v4 Session interface (#1292)

This commit is contained in:
Guillaume Nodet 2023-10-20 07:54:44 +02:00 committed by GitHub
parent 16888062d0
commit a734e2a336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 28 deletions

View File

@ -101,20 +101,6 @@ public interface Session {
@Nonnull
Path getRootDirectory();
/**
* @deprecated use {@link #getRootDirectory()} instead
*/
@Nonnull
@Deprecated
Path getMultiModuleProjectDirectory();
/**
* @deprecated use {@link #getTopDirectory()} instead
*/
@Deprecated
@Nonnull
Path getExecutionRootDirectory();
@Nonnull
List<Project> getProjects();

View File

@ -140,18 +140,6 @@ public class DefaultSession extends AbstractSession {
return mavenSession.getStartTime().toInstant();
}
@Nonnull
@Override
public Path getMultiModuleProjectDirectory() {
return mavenSession.getRequest().getMultiModuleProjectDirectory().toPath();
}
@Nonnull
@Override
public Path getExecutionRootDirectory() {
return getTopDirectory();
}
@Override
public Path getRootDirectory() {
return mavenSession.getRequest().getRootDirectory();

View File

@ -54,7 +54,7 @@ import org.codehaus.plexus.component.configurator.expression.TypeAwareExpression
* <tr><td><code>settings</code></td> <td></td> <td>{@link Session#getSettings()}</td></tr>
* <tr><td><code>settings.*</code></td> <td></td> <td></td></tr>
* <tr><td><code>basedir</code></td> <td></td>
* <td>{@link Session#getExecutionRootDirectory()} or
* <td>{@link Session#getTopDirectory()} or
* <code>System.getProperty( "user.dir" )</code> if null</td></tr>
* <tr><td><code>mojoExecution</code></td> <td></td> <td>the actual {@link MojoExecution}</td></tr>
* <tr><td><code>mojo</code></td> <td>(since Maven 3)</td><td>same as <code>mojoExecution</code></td></tr>
@ -112,7 +112,7 @@ public class PluginParameterExpressionEvaluatorV4 implements TypeAwareExpression
}
if (basedir == null) {
basedir = session.getExecutionRootDirectory();
basedir = session.getTopDirectory();
}
if (basedir == null) {