Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ final Charset charset() {
* If non-empty, the project {@code <Source>} elements are ignored. This configuration option
* should be used only when there is a need to override the project configuration.
*
* @deprecated Replaced by the project-wide {@code <sources>} element.
* @deprecated replaced by the project-wide {@code <sources>} element
*/
@Parameter
@Deprecated(since = "4.0.0")
Expand Down Expand Up @@ -270,8 +270,7 @@ final Charset charset() {
* <p>Note that {@code -J} options should be specified only if {@link #fork} is set to {@code true}.</p>
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-J">javac -J</a>
*
* @deprecated Use {@link #compilerArgs} instead.
* @deprecated use {@link #compilerArgs} instead
*/
@Parameter
@Deprecated(since = "4.0.0")
Expand Down Expand Up @@ -354,9 +353,8 @@ final Charset charset() {
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-processor-path">javac -processorpath</a>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#annotation-processing">javac Annotation Processing</a>
* @since 3.5
*
* @deprecated Replaced by ordinary dependencies with {@code <type>} element set to
* {@code processor}, {@code classpath-processor} or {@code modular-processor}.
* @deprecated replaced by ordinary dependencies with {@code <type>} element set to
* {@code processor}, {@code classpath-processor} or {@code modular-processor}
*/
@Parameter
@Deprecated(since = "4.0.0")
Expand All @@ -372,8 +370,7 @@ final Charset charset() {
* </p>
*
* @since 3.12.0
*
* @deprecated This flag is ignored.
* @deprecated this flag is ignored.
* Replaced by ordinary dependencies with {@code <type>} element set to
* {@code processor}, {@code classpath-processor} or {@code modular-processor}.
*/
Expand Down Expand Up @@ -432,8 +429,7 @@ final Charset charset() {
*
* @see #debuglevel
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-g">javac -g</a>
*
* @deprecated Setting this flag to {@code false} is replaced by {@code <debuglevel>none</debuglevel>}.
* @deprecated setting this flag to {@code false} is replaced by {@code <debuglevel>none</debuglevel>}
*/
@Deprecated(since = "4.0.0")
@Parameter(property = "maven.compiler.debug", defaultValue = "true")
Expand Down Expand Up @@ -462,7 +458,8 @@ final Charset charset() {

/**
* Whether to optimize the compiled code using the compiler's optimization methods.
* @deprecated This property is ignored.
*
* @deprecated this property is ignored
*/
@Deprecated(forRemoval = true)
@Parameter(property = "maven.compiler.optimize")
Expand Down Expand Up @@ -533,7 +530,7 @@ final Charset charset() {
*
* <p>expression="${project.build.finalName}"</p>
*
* @deprecated Bundling many class files into a single file should be done by other plugins.
* @deprecated bundling many class files into a single file should be done by other plugins
*/
@Parameter
@Deprecated(since = "4.0.0", forRemoval = true)
Expand All @@ -545,8 +542,7 @@ final Charset charset() {
* <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>).
*
* @since 3.12.0
*
* @deprecated Not used by the compiler plugin since it does not generate archive.
* @deprecated not used by the compiler plugin since it does not generate archive
*/
@Deprecated(since = "4.0.0", forRemoval = true)
@Parameter(defaultValue = "${project.build.outputTimestamp}")
Expand Down Expand Up @@ -630,8 +626,7 @@ final Charset charset() {
* Whether to enable/disable incremental compilation feature.
*
* @since 3.1
*
* @deprecated Replaced by {@link #incrementalCompilation}.
* @deprecated replaced by {@link #incrementalCompilation}.
* A value of {@code true} in this old property is equivalent to {@code "dependencies,sources,rebuild-on-add"}
* in the new property, and a value of {@code false} is equivalent to {@code "classes"}.
*/
Expand Down Expand Up @@ -753,9 +748,8 @@ final EnumSet<IncrementalBuild.Aspect> incrementalCompilationConfiguration() {
* Version of the compiler to use if {@link #fork} is set to {@code true}.
* Examples! "1.3", "1.5".
*
* @deprecated This parameter is no longer used by the underlying compilers.
*
* @see #fork
* @deprecated this parameter is no longer used by the underlying compilers
*/
@Deprecated(since = "4.0.0", forRemoval = true)
@Parameter(property = "maven.compiler.compilerVersion")
Expand All @@ -767,8 +761,7 @@ final EnumSet<IncrementalBuild.Aspect> incrementalCompilationConfiguration() {
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.compiler/javax/tools/package-summary.html">New API</a>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/api/jdk.compiler/com/sun/tools/javac/package-summary.html">Legacy API</a>
* @since 3.13
*
* @deprecated Ignored because the compiler plugin now always use the {@code javax.tools} API.
* @deprecated ignored because the compiler plugin now always use the {@code javax.tools} API
*/
@Deprecated(since = "4.0.0", forRemoval = true)
@Parameter(property = "maven.compiler.forceLegacyJavacApi")
Expand All @@ -778,8 +771,7 @@ final EnumSet<IncrementalBuild.Aspect> incrementalCompilationConfiguration() {
* Whether to use legacy compiler API.
*
* @since 3.0
*
* @deprecated Ignored because {@code java.lang.Compiler} has been deprecated and removed from the JDK.
* @deprecated ignored because {@code java.lang.Compiler} has been deprecated and removed from the JDK
*/
@Deprecated(since = "4.0.0", forRemoval = true)
@Parameter(property = "maven.compiler.forceJavacCompilerUse")
Expand All @@ -797,17 +789,15 @@ final EnumSet<IncrementalBuild.Aspect> incrementalCompilationConfiguration() {
* Note this parameter value depends on the OS/JDK you are using, but the default value should work on most of env.
*
* @since 2.5
*
* @deprecated Not supported anymore. The reuse of {@link JavaFileManager} instance is plugin implementation details.
* @deprecated not supported anymore. The reuse of {@link JavaFileManager} instance is plugin implementation details.
*/
@Deprecated(since = "4.0.0", forRemoval = true)
@Parameter(property = "maven.compiler.compilerReuseStrategy")
protected String compilerReuseStrategy;

/**
* @since 2.5
*
* @deprecated Deprecated as a consequence of {@link #compilerReuseStrategy} deprecation.
* @deprecated deprecated as a consequence of {@link #compilerReuseStrategy} deprecation
*/
@Deprecated(since = "4.0.0", forRemoval = true)
@Parameter(property = "maven.compiler.skipMultiThreadWarning")
Expand Down Expand Up @@ -860,7 +850,7 @@ final EnumSet<IncrementalBuild.Aspect> incrementalCompilationConfiguration() {
* Path to a file where to cache information about the last incremental build.
* This is used when "incremental" builds are enabled for detecting additions
* or removals of source files, or changes in plugin configuration.
* This file should be in the output directory and can be deleted at any time
* This file should be in the output directory and can be deleted at any time.
*/
@Parameter(
defaultValue =
Expand Down Expand Up @@ -1048,10 +1038,8 @@ final List<SourceDirectory> getSourceDirectories(final Path outputDirectory) thr
*
* @return the module name in a previous execution of the compiler plugin, or {@code null} if none
* @throws IOException if this method needs to walk through directories and that operation failed
*
* @see CompilerMojo#addImplicitDependencies(ToolExecutor)
*
* @deprecated For compatibility with the previous way to build multi-release JAR file.
* @deprecated for compatibility with the previous way to build multi-release JAR file.
* May be removed after we drop support of the old way to do multi-release.
*/
@Deprecated(since = "4.0.0")
Expand Down Expand Up @@ -1172,9 +1160,9 @@ public void execute() throws MojoException {
*
* @param listener where to send compilation warnings, or {@code null} for the Maven logger
* @return the task to execute for compiling the project using the configuration in this <abbr>MOJO</abbr>
* @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>
* @throws IOException if an error occurred while creating the output directory or scanning the source directories
* @throws MavenException if an error occurred while fetching dependencies
* @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>
*/
public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException {
var executor = new ToolExecutor(this, listener);
Expand Down Expand Up @@ -1255,7 +1243,7 @@ public JavaCompiler compiler() throws MojoException {
* The {@link #release} parameter is excluded because it is handled in a special way
* in order to support the compilation of multi-version projects.
*
* @param compiler the tools to use for verifying the validity of options
* @param compiler the tools to use for verifying the validity of options
* @return the options after validation
*/
public Options parseParameters(final OptionChecker compiler) {
Expand Down Expand Up @@ -1467,9 +1455,9 @@ final String parseModuleInfoName(Path source) throws IOException {
* {@return all dependencies grouped by the path types where to place them}. If the module-path contains
* any filename-based dependency and this MOJO is compiling the main code, then a warning will be logged.
*
* @param hasModuleDeclaration whether to allow placement of dependencies on the module-path.
* @param hasModuleDeclaration whether to allow placement of dependencies on the module-path
* @throws IOException if an I/O error occurred while fetching dependencies
* @throws MavenException if an error occurred while fetching dependencies for a reason other than I/O.
* @throws MavenException if an error occurred while fetching dependencies for a reason other than I/O
*/
final DependencyResolverResult resolveDependencies(boolean hasModuleDeclaration) throws IOException {
DependencyResolver resolver = session.getService(DependencyResolver.class);
Expand Down Expand Up @@ -1531,9 +1519,8 @@ final DependencyResolverResult resolveDependencies(boolean hasModuleDeclaration)
*
* @param addTo the modifiable map and lists where to append more paths to annotation processor dependencies
* @throws MojoException if an error occurred while resolving the dependencies
*
* @deprecated Replaced by ordinary dependencies with {@code <type>} element set to
* {@code processor}, {@code classpath-processor} or {@code modular-processor}.
* @deprecated replaced by ordinary dependencies with {@code <type>} element set to
* {@code processor}, {@code classpath-processor} or {@code modular-processor}
*/
@Deprecated(since = "4.0.0")
final void resolveProcessorPathEntries(Map<PathType, List<Path>> addTo) throws MojoException {
Expand Down Expand Up @@ -1760,7 +1747,7 @@ private void writeDebugFile(final ToolExecutor executor, final Options configura
* The check for the project directory tree (starting from the root of all sub-projects) is for avoiding
* to relativize the paths to JAR files in the Maven local repository for example.
*
* @param file the path to make relative to the base directory
* @param file the path to make relative to the base directory
* @return the given path, potentially relative to the base directory
*/
private Path relativize(Path file) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ private ByteCodeTransformer() {}
*
* @param originalBytecode the byte code to patch
* @return the patched byte code, or {@code null} if no change is needed
*
* @see <a href="https://issues.apache.org/jira/browse/MCOMPILER-542">MCOMPILER-542</a>
* @see <a href="https://bugs.openjdk.org/browse/JDK-8318913">JDK-8318913</a>
* @see #MODULE_VERSION_FIX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CompilationTaskSources {
/**
* Creates a new compilation task.
*
* @param files the files to compile.
* @param files the files to compile
*/
CompilationTaskSources(List<Path> files) {
this.files = files;
Expand All @@ -47,9 +47,9 @@ class CompilationTaskSources {
* Executes the compilation task. Subclasses can override this method is they need to perform
* pre-compilation or post-compilation tasks.
*
* @param task the compilation task
* @return whether the compilation was successful.
* @throws IOException if an initialization or cleaner task was required and failed.
* @param task the compilation task
* @return whether the compilation was successful
* @throws IOException if an initialization or cleaner task was required and failed
*/
boolean compile(JavaCompiler.CompilationTask task) throws IOException {
return task.call();
Expand Down
24 changes: 10 additions & 14 deletions src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ public class CompilerMojo extends AbstractCompilerMojo {
* </p>
*
* @since 3.7.1
*
* @deprecated Replaced by specifying the {@code <targetVersion>} value inside a {@code <source>} element.
* @deprecated replaced by specifying the {@code <targetVersion>} value inside a {@code <source>} element
*/
@Parameter
@Deprecated(since = "4.0.0")
Expand Down Expand Up @@ -164,7 +163,7 @@ public class CompilerMojo extends AbstractCompilerMojo {
* When using the recommended {@code <sources>} approach, the plugins are designed to work
* with the directory layout produced by {@code javac} instead of fighting against it.
*
* @deprecated For compatibility with the previous way to build multi-release JAR file.
* @deprecated for compatibility with the previous way to build multi-release JAR file.
* May be removed after we drop support of the old way to do multi-release.
*/
@Deprecated(since = "4.0.0")
Expand All @@ -182,7 +181,7 @@ public CompilerMojo() {
* If {@link #skipMain} is {@code true}, then this method logs a message and does nothing else.
* Otherwise, this method executes the steps described in the method of the parent class.
*
* @throws MojoException if the compiler cannot be run.
* @throws MojoException if the compiler cannot be run
*/
@Override
public void execute() throws MojoException {
Expand All @@ -209,7 +208,7 @@ public void execute() throws MojoException {
/**
* Parses the parameters declared in the <abbr>MOJO</abbr>.
*
* @param compiler the tools to use for verifying the validity of options
* @param compiler the tools to use for verifying the validity of options
* @return the options after validation
*/
@Override
Expand Down Expand Up @@ -281,9 +280,9 @@ protected String getDebugFileName() {
* Creates a new task for compiling the main classes.
*
* @param listener where to send compilation warnings, or {@code null} for the Maven logger
* @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>
* @return the task to execute for compiling the main code using the configuration in this <abbr>MOJO</abbr>
* @throws IOException if an error occurred while creating the output directory or scanning the source directories
* @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>
*/
@Override
public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException {
Expand All @@ -301,8 +300,7 @@ public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> li
*
* @param roots root directories of the sources to compile
* @throws IOException if this method needed to read a module descriptor and failed
*
* @deprecated For compatibility with the previous way to build multi-release JAR file.
* @deprecated for compatibility with the previous way to build multi-release JAR file.
* May be removed after we drop support of the old way to do multi-release.
*/
@Override
Expand All @@ -328,8 +326,7 @@ final boolean hasModuleDeclaration(final List<SourceDirectory> roots) throws IOE
* By convention, {@link SourceVersion#RELEASE_0} stands for the base version.
*
* @throws IOException if this method needs to walk through directories and that operation failed
*
* @deprecated For compatibility with the previous way to build multi-release JAR file.
* @deprecated for compatibility with the previous way to build multi-release JAR file.
* May be removed after we drop support of the old way to do multi-release.
*/
@Deprecated(since = "4.0.0")
Expand Down Expand Up @@ -367,11 +364,10 @@ private TreeMap<SourceVersion, Path> getOutputDirectoryPerVersion() throws IOExc
* module name, with no executor to modify. The module name found by this method is specific to
* the way that projects are organized when {@link #multiReleaseOutput} is {@code true}.</p>
*
* @param executor the executor where to add implicit dependencies, or {@code null} if none
* @param executor the executor where to add implicit dependencies, or {@code null} if none
* @return the module name, or {@code null} if none
* @throws IOException if this method needs to walk through directories and that operation failed
*
* @deprecated For compatibility with the previous way to build multi-release JAR file.
* @deprecated for compatibility with the previous way to build multi-release JAR file.
* May be removed after we drop support of the old way to do multi-release.
*/
@Deprecated(since = "4.0.0")
Expand Down Expand Up @@ -433,7 +429,7 @@ private String addImplicitDependencies(final ToolExecutor executor) throws IOExc
/**
* {@return the module name in a previous execution of the compiler plugin, or {@code null} if none}.
*
* @deprecated For compatibility with the previous way to build multi-release JAR file.
* @deprecated for compatibility with the previous way to build multi-release JAR file.
* May be removed after we drop support of the old way to do multi-release.
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
*
* @author Andreas Gudian
* @since 3.4
*
* @deprecated Used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated.
* @deprecated used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated
*/
@Deprecated(since = "4.0.0")
public final class DependencyCoordinate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Simple representation of a Maven dependency exclusion.
*
* @deprecated Used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated.
* @deprecated used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated
*/
@Deprecated(since = "4.0.0")
public final class DependencyExclusion {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ final class DiagnosticLogger implements DiagnosticListener<JavaFileObject> {
/**
* Makes the given file relative to the base directory.
*
* @param file the path to make relative to the base directory
* @param file the path to make relative to the base directory
* @return the given path, potentially relative to the base directory
*/
private String relativize(String file) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class ForkedCompiler extends ForkedTool implements JavaCompiler {
/**
* Creates a new forked compiler.
*
* @param mojo the MOJO from which to get the configuration
* @param mojo the MOJO from which to get the configuration
*/
ForkedCompiler(final AbstractCompilerMojo mojo) {
super(mojo);
Expand Down
Loading
Loading