Fork me on GitHub

tycho-cleancode:cleanup

Full name:

org.eclipse.tycho:tycho-cleancode-plugin:6.0.0-SNAPSHOT:cleanup

Description:

Applies Eclipse JDT code cleanup actions to Java source files in the project.

This mojo performs automated code cleanup operations on Java files using Eclipse's cleanup engine. It can apply a custom cleanup profile or use the project's existing cleanup settings. The cleanup operations may include formatting, organizing imports, removing unused code, adding missing annotations, and other code quality improvements.

The mojo can optionally update the project's cleanup profile and save action settings in the .settings/org.eclipse.jdt.ui.prefs file after cleanup is performed.


See also: CleanupPreferencesUpdater

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: process-sources.

Optional Parameters

Name Type Since Description
<application> String - No description.
User Property: tycho.eclipsebuild.application
<applyCleanupsIndividually> boolean - No description.
<baselines> List<Repository> - If configured, automatically sets a baseline for this project if api tools nature is enabled
User Property: baselines
<bundles> List<String> - No description.
<cleanUpProfile> Map<String,String> - Defines key value pairs of a cleanup profile, if not defined will use the project defaults
<debug> boolean - No description.
Default: false
User Property: tycho.eclipsebuild.debug
<eclipseRepository> Repository - No description.
<failOnResolutionError> boolean - No description.
Default: false
<features> List<String> - No description.
<ignores> List<String> - Specifies patterns of files that should be excluded
<local> boolean - Controls if the local target platform of the project should be used to resolve the eclipse application
Default: false
User Property: tycho.eclipsebuild.local
<printMarker> boolean - No description.
Default: true
User Property: tycho.eclipsebuild.printMarker
<reportFileName> File - No description.
Default: ${project.build.directory}/cleanups.md
User Property: tycho.cleanup.report
<skip> boolean - No description.
Default: false
User Property: tycho.eclipsebuild.skip
<updateProjectCleanupProfile> boolean - If enabled, the cleanup profile settings will be written to the project's org.eclipse.jdt.ui.prefs file after cleanup
User Property: updateProjectCleanupProfile
<updateProjectSaveActions> boolean - If enabled, the save action cleanup settings will be written to the project's org.eclipse.jdt.ui.prefs file after cleanup. Only updates if sp_cleanup.on_save_use_additional_actions=true is set in the file.
User Property: updateProjectSaveActions

Parameter Details

<application>

No description.
  • Type: java.lang.String
  • Required: No
  • User Property: tycho.eclipsebuild.application

<applyCleanupsIndividually>

No description.
  • Type: boolean
  • Required: No

<baselines>

If configured, automatically sets a baseline for this project if api tools nature is enabled
  • Type: java.util.List<org.apache.maven.model.Repository>
  • Required: No
  • User Property: baselines

<bundles>

No description.
  • Type: java.util.List<java.lang.String>
  • Required: No

<cleanUpProfile>

Defines key value pairs of a cleanup profile, if not defined will use the project defaults
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: No

<debug>

No description.
  • Type: boolean
  • Required: No
  • User Property: tycho.eclipsebuild.debug
  • Default: false

<eclipseRepository>

No description.
  • Type: org.apache.maven.model.Repository
  • Required: No

<failOnResolutionError>

No description.
  • Type: boolean
  • Required: No
  • Default: false

<features>

No description.
  • Type: java.util.List<java.lang.String>
  • Required: No

<ignores>

Specifies patterns of files that should be excluded
  • Type: java.util.List<java.lang.String>
  • Required: No

<local>

Controls if the local target platform of the project should be used to resolve the eclipse application
  • Type: boolean
  • Required: No
  • User Property: tycho.eclipsebuild.local
  • Default: false

<printMarker>

No description.
  • Type: boolean
  • Required: No
  • User Property: tycho.eclipsebuild.printMarker
  • Default: true

<reportFileName>

No description.
  • Type: java.io.File
  • Required: No
  • User Property: tycho.cleanup.report
  • Default: ${project.build.directory}/cleanups.md

<skip>

No description.
  • Type: boolean
  • Required: No
  • User Property: tycho.eclipsebuild.skip
  • Default: false

<updateProjectCleanupProfile>

If enabled, the cleanup profile settings will be written to the project's org.eclipse.jdt.ui.prefs file after cleanup
  • Type: boolean
  • Required: No
  • User Property: updateProjectCleanupProfile

<updateProjectSaveActions>

If enabled, the save action cleanup settings will be written to the project's org.eclipse.jdt.ui.prefs file after cleanup. Only updates if sp_cleanup.on_save_use_additional_actions=true is set in the file.
  • Type: boolean
  • Required: No
  • User Property: updateProjectSaveActions