Added missing @Deprecated/@deprecated annotations

@Deprecated annotatio is helpful to prevent usage of deprecated API.
For example: developer can see crossed out method/field name if this item
is deprecated.

This closes #985
This commit is contained in:
Andrey Bruykhov 2023-02-06 19:58:10 +03:00 committed by Michael Osipov
parent 769f2f3a47
commit ef3cf56b51
9 changed files with 11 additions and 1 deletions

View File

@ -62,6 +62,7 @@ public class DefaultProfileManager implements ProfileManager {
* @deprecated without passing in the system properties, the SystemPropertiesProfileActivator will not work * @deprecated without passing in the system properties, the SystemPropertiesProfileActivator will not work
* correctly in embedded environments. * correctly in embedded environments.
*/ */
@Deprecated
public DefaultProfileManager(PlexusContainer container) { public DefaultProfileManager(PlexusContainer container) {
this(container, null); this(container, null);
} }

View File

@ -40,6 +40,7 @@ public class InvalidProjectModelException extends ProjectBuildingException {
* @param validationResult * @param validationResult
* @deprecated use {@link File} constructor for pomLocation * @deprecated use {@link File} constructor for pomLocation
*/ */
@Deprecated
public InvalidProjectModelException( public InvalidProjectModelException(
String projectId, String pomLocation, String message, ModelValidationResult validationResult) { String projectId, String pomLocation, String message, ModelValidationResult validationResult) {
this(projectId, message, new File(pomLocation), validationResult); this(projectId, message, new File(pomLocation), validationResult);
@ -58,6 +59,7 @@ public class InvalidProjectModelException extends ProjectBuildingException {
* @param message * @param message
* @deprecated use {@link File} constructor for pomLocation * @deprecated use {@link File} constructor for pomLocation
*/ */
@Deprecated
public InvalidProjectModelException(String projectId, String pomLocation, String message) { public InvalidProjectModelException(String projectId, String pomLocation, String message) {
this(projectId, message, new File(pomLocation)); this(projectId, message, new File(pomLocation));
} }

View File

@ -23,7 +23,6 @@ import org.apache.maven.model.Model;
/** /**
* @author Jason van Zyl * @author Jason van Zyl
* @deprecated
*/ */
@Deprecated @Deprecated
public interface ModelInheritanceAssembler { public interface ModelInheritanceAssembler {

View File

@ -117,6 +117,7 @@ public abstract class AbstractStringBasedModelInterpolator extends AbstractLogEn
* *
* @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead. * @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead.
*/ */
@Deprecated
public Model interpolate(Model model, Map<String, ?> context, boolean strict) throws ModelInterpolationException { public Model interpolate(Model model, Map<String, ?> context, boolean strict) throws ModelInterpolationException {
Properties props = new Properties(); Properties props = new Properties();
props.putAll(context); props.putAll(context);

View File

@ -38,11 +38,13 @@ public interface ModelInterpolator {
/** /**
* @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead. * @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead.
*/ */
@Deprecated
Model interpolate(Model project, Map<String, ?> context) throws ModelInterpolationException; Model interpolate(Model project, Map<String, ?> context) throws ModelInterpolationException;
/** /**
* @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead. * @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead.
*/ */
@Deprecated
Model interpolate(Model model, Map<String, ?> context, boolean strict) throws ModelInterpolationException; Model interpolate(Model model, Map<String, ?> context, boolean strict) throws ModelInterpolationException;
Model interpolate(Model model, File projectDir, ProjectBuilderConfiguration config, boolean debugEnabled) Model interpolate(Model model, File projectDir, ProjectBuilderConfiguration config, boolean debugEnabled)

View File

@ -36,6 +36,7 @@ public class DefaultLifecycleMapping implements LifecycleMapping {
private Map<String, Lifecycle> lifecycleMap; private Map<String, Lifecycle> lifecycleMap;
/** @deprecated use lifecycles instead */ /** @deprecated use lifecycles instead */
@Deprecated
private Map<String, LifecyclePhase> phases; private Map<String, LifecyclePhase> phases;
/** /**

View File

@ -35,6 +35,7 @@ public class DuplicateProjectException extends Exception {
/** /**
* @deprecated use {@link #DuplicateProjectException(String, File, File, String)} * @deprecated use {@link #DuplicateProjectException(String, File, File, String)}
*/ */
@Deprecated
public DuplicateProjectException(String message) { public DuplicateProjectException(String message) {
this(null, null, null, message); this(null, null, null, message);
} }
@ -42,6 +43,7 @@ public class DuplicateProjectException extends Exception {
/** /**
* @deprecated use {@link #DuplicateProjectException(String, File, File, String)} * @deprecated use {@link #DuplicateProjectException(String, File, File, String)}
*/ */
@Deprecated
public DuplicateProjectException(String message, Exception e) { public DuplicateProjectException(String message, Exception e) {
super(message, e); super(message, e);
this.projectId = null; this.projectId = null;

View File

@ -72,6 +72,7 @@ public class ProjectBuildingException extends Exception {
/** /**
* @deprecated use {@link #getPomFile()} * @deprecated use {@link #getPomFile()}
*/ */
@Deprecated
public String getPomLocation() { public String getPomLocation() {
if (getPomFile() != null) { if (getPomFile() != null) {
return getPomFile().getAbsolutePath(); return getPomFile().getAbsolutePath();

View File

@ -29,6 +29,7 @@ import org.slf4j.Logger;
* @deprecated clients that do not require compatibility with Maven 3.2.3 and earlier should link to * @deprecated clients that do not require compatibility with Maven 3.2.3 and earlier should link to
* {@link JavaToolchainImpl} instead. * {@link JavaToolchainImpl} instead.
*/ */
@Deprecated
public class DefaultJavaToolChain extends JavaToolchainImpl { public class DefaultJavaToolChain extends JavaToolchainImpl {
public static final String KEY_JAVAHOME = JavaToolchainImpl.KEY_JAVAHOME; public static final String KEY_JAVAHOME = JavaToolchainImpl.KEY_JAVAHOME;