From 8150c62749a637a98fbb9489fb8162034956220b Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 23 Dec 2022 20:03:44 +0100 Subject: [PATCH] [MNG-7650] Reformat --- .../maven/settings/GlobalSettingsTest.java | 5 ++- .../maven/api/DependencyCoordinate.java | 1 + .../main/java/org/apache/maven/api/Event.java | 1 + .../org/apache/maven/api/LocalRepository.java | 1 + .../org/apache/maven/api/MojoExecution.java | 1 + .../main/java/org/apache/maven/api/Node.java | 1 + .../java/org/apache/maven/api/Project.java | 1 + .../org/apache/maven/api/ResolutionScope.java | 1 + .../main/java/org/apache/maven/api/Scope.java | 1 + .../java/org/apache/maven/api/Session.java | 1 + .../org/apache/maven/api/SessionData.java | 1 + .../java/org/apache/maven/api/Toolchain.java | 1 + .../api/plugin/annotations/Component.java | 1 + .../maven/api/plugin/annotations/Execute.java | 1 + .../maven/api/plugin/annotations/Mojo.java | 1 + .../api/plugin/annotations/Parameter.java | 1 + .../ArtifactCoordinateFactoryRequest.java | 4 +- .../maven/api/services/ArtifactDeployer.java | 1 + .../api/services/ArtifactDeployerRequest.java | 5 ++- .../api/services/ArtifactFactoryRequest.java | 4 +- .../maven/api/services/ArtifactInstaller.java | 1 + .../services/ArtifactInstallerRequest.java | 5 ++- .../maven/api/services/ArtifactManager.java | 1 + .../maven/api/services/ArtifactResolver.java | 1 + .../api/services/ArtifactResolverRequest.java | 5 ++- .../api/services/ArtifactResolverResult.java | 1 + .../maven/api/services/BaseRequest.java | 1 + .../services/DependencyCollectorRequest.java | 5 ++- .../services/DependencyCollectorResult.java | 1 + .../DependencyCoordinateFactoryRequest.java | 5 ++- .../api/services/LocalRepositoryManager.java | 1 + .../org/apache/maven/api/services/Lookup.java | 1 + .../maven/api/services/ProjectBuilder.java | 1 + .../api/services/ProjectBuilderRequest.java | 5 ++- .../api/services/ProjectBuilderResult.java | 1 + .../maven/api/services/ProjectManager.java | 1 + .../apache/maven/api/services/Prompter.java | 1 + .../maven/api/services/RepositoryFactory.java | 1 + .../maven/api/services/SettingsBuilder.java | 1 + .../api/services/SettingsBuilderRequest.java | 5 ++- .../api/services/SettingsBuilderResult.java | 1 + .../org/apache/maven/api/services/Source.java | 1 + .../maven/api/services/ToolchainManager.java | 1 + .../services/ToolchainsBuilderRequest.java | 5 ++- .../api/services/ToolchainsBuilderResult.java | 1 + .../apache/maven/api/services/Transport.java | 1 + .../maven/api/services/xml/XmlFactory.java | 1 + .../api/services/xml/XmlReaderRequest.java | 1 + .../api/services/xml/XmlWriterRequest.java | 1 + .../java/org/apache/maven/api/xml/Dom.java | 1 + .../modello/plugin/velocity/Helper.java | 1 + .../plugin/velocity/ModelloVelocityMojo.java | 1 + .../plugin/velocity/VelocityGenerator.java | 1 + .../org/apache/maven/artifact/Artifact.java | 1 + .../apache/maven/artifact/ArtifactUtils.java | 1 + .../maven/artifact/DefaultArtifact.java | 1 + .../repository/ArtifactRepository.java | 1 + .../AbstractArtifactResolutionException.java | 1 + .../resolver/ArtifactNotFoundException.java | 1 + .../resolver/ArtifactResolutionException.java | 1 + .../MultipleArtifactsNotFoundException.java | 1 + .../versioning/DefaultArtifactVersion.java | 4 +- .../OverConstrainedVersionException.java | 1 + .../artifact/versioning/VersionRange.java | 1 + .../maven/artifact/ArtifactUtilsTest.java | 13 ++++--- .../maven/artifact/DefaultArtifactTest.java | 8 ++-- .../versioning/ComparableVersionIT.java | 5 ++- .../versioning/ComparableVersionTest.java | 7 ++-- .../DefaultArtifactVersionTest.java | 4 +- .../artifact/versioning/VersionRangeTest.java | 9 +++-- maven-bom/pom.xml | 2 +- .../building/DefaultProblemCollectorTest.java | 6 +-- .../maven/building/DefaultProblemTest.java | 6 +-- .../apache/maven/building/FileSourceTest.java | 7 ++-- .../building/ProblemCollectorFactoryTest.java | 7 ++-- .../maven/building/StringSourceTest.java | 5 ++- .../apache/maven/building/UrlSourceTest.java | 7 ++-- .../artifact/deployer/ArtifactDeployer.java | 1 + .../deployer/DefaultArtifactDeployer.java | 1 + .../artifact/installer/ArtifactInstaller.java | 1 + .../installer/DefaultArtifactInstaller.java | 1 + .../artifact/manager/DefaultWagonManager.java | 1 + .../maven/artifact/manager/WagonManager.java | 1 + .../repository/DefaultArtifactRepository.java | 1 + .../DefaultArtifactRepositoryFactory.java | 1 + .../DefaultRepositoryMetadataManager.java | 1 + .../metadata/GroupRepositoryMetadata.java | 1 + .../repository/metadata/MetadataBridge.java | 1 + .../artifact/resolver/ArtifactCollector.java | 1 + .../artifact/resolver/ArtifactResolver.java | 1 + .../resolver/DebugResolutionListener.java | 1 + .../resolver/DefaultArtifactResolver.java | 1 + .../resolver/UnresolvedArtifacts.java | 1 + .../resolver/filter/OrArtifactFilter.java | 1 + .../versioning/ManagedVersionMap.java | 1 + .../profiles/DefaultMavenProfilesBuilder.java | 1 + .../maven/profiles/DefaultProfileManager.java | 1 + .../maven/profiles/MavenProfilesBuilder.java | 1 + .../apache/maven/profiles/ProfileManager.java | 1 + .../profiles/ProfilesConversionUtils.java | 1 + .../activation/FileProfileActivator.java | 1 + .../SystemPropertyProfileActivator.java | 1 + .../project/DefaultMavenProjectBuilder.java | 1 + .../DefaultProjectBuilderConfiguration.java | 1 + .../project/InvalidProjectModelException.java | 1 + .../maven/project/MavenProjectBuilder.java | 1 + .../org/apache/maven/project/ModelUtils.java | 1 + .../project/ProjectBuilderConfiguration.java | 1 + .../apache/maven/project/ProjectUtils.java | 1 + .../AbstractStringBasedModelInterpolator.java | 1 + .../BuildTimestampValueSource.java | 1 + .../interpolation/ModelInterpolator.java | 1 + .../PathTranslatingPostProcessor.java | 1 + .../RegexBasedModelInterpolator.java | 1 + .../StringSearchModelInterpolator.java | 1 + .../project/path/DefaultPathTranslator.java | 1 + .../repository/DefaultMirrorSelector.java | 1 + .../repository/MetadataResolutionRequest.java | 1 + .../repository/MetadataResolutionResult.java | 1 + .../maven/repository/MirrorSelector.java | 1 + .../UserLocalArtifactRepository.java | 1 + .../repository/VersionNotFoundException.java | 1 + .../legacy/DefaultUpdateCheckManager.java | 1 + .../legacy/DefaultWagonManager.java | 1 + .../legacy/LegacyRepositorySystem.java | 1 + .../legacy/TransferListenerAdapter.java | 1 + .../repository/legacy/UpdateCheckManager.java | 1 + .../maven/repository/legacy/WagonManager.java | 1 + .../DefaultArtifactRepositoryFactory.java | 1 + .../DefaultLegacyArtifactCollector.java | 1 + .../resolver/LegacyArtifactCollector.java | 1 + .../AbstractVersionTransformation.java | 1 + .../transform/ArtifactTransformation.java | 1 + .../ArtifactTransformationManager.java | 1 + .../DefaultArtifactTransformationManager.java | 1 + .../transform/SnapshotTransformation.java | 1 + .../repository/metadata/ArtifactMetadata.java | 1 + .../metadata/ClasspathContainer.java | 1 + .../DefaultClasspathTransformation.java | 1 + .../DefaultGraphConflictResolver.java | 1 + .../repository/metadata/MetadataGraph.java | 1 + .../metadata/MetadataResolution.java | 1 + .../metadata/MetadataResolutionRequest.java | 1 + .../repository/metadata/MetadataSource.java | 1 + .../plugin/ExpressionDocumenter.java | 1 + .../AbstractArtifactComponentTestCase.java | 12 +++--- .../deployer/ArtifactDeployerTest.java | 12 +++--- .../SimpleArtifactMetadataSource.java | 6 ++- .../factory/DefaultArtifactFactoryTest.java | 5 ++- .../installer/ArtifactInstallerTest.java | 8 ++-- .../artifact/metadata/TestMetadataSource.java | 8 ++-- .../MavenArtifactRepositoryTest.java | 4 +- .../ArtifactResolutionExceptionTest.java | 5 ++- .../resolver/ArtifactResolverTest.java | 10 +++-- .../resolver/DefaultArtifactResolverTest.java | 6 ++- .../artifact/resolver/TestFileWagon.java | 1 + .../resolver/TestTransferListener.java | 1 + .../filter/AndArtifactFilterTest.java | 7 ++-- .../resolver/filter/FilterHashEqualsTest.java | 5 ++- .../resolver/filter/OrArtifactFilterTest.java | 7 ++-- .../filter/ScopeArtifactFilterTest.java | 6 +-- .../artifact/testutils/TestFileManager.java | 9 +++-- .../transform/TransformationManagerTest.java | 8 ++-- .../manager/DefaultProfileManagerTest.java | 8 ++-- .../project/AbstractMavenProjectTestCase.java | 6 ++- .../project/ClasspathArtifactResolver.java | 6 ++- .../maven/project/EmptyLifecycleExecutor.java | 1 + .../project/EmptyLifecyclePluginAnalyzer.java | 1 + .../project/LegacyLocalRepositoryManager.java | 1 + .../maven/project/ProjectClasspathTest.java | 9 +++-- .../maven/project/TestArtifactResolver.java | 1 + .../project/TestMavenRepositorySystem.java | 1 + .../maven/project/TestProjectBuilder.java | 6 ++- .../AbstractProjectInheritanceTestCase.java | 5 ++- .../t00/ProjectInheritanceTest.java | 4 +- .../t01/ProjectInheritanceTest.java | 4 +- .../t02/ProjectInheritanceTest.java | 9 +++-- .../t03/ProjectInheritanceTest.java | 5 ++- .../t04/ProjectInheritanceTest.java | 9 +++-- .../t05/ProjectInheritanceTest.java | 9 +++-- .../t06/ProjectInheritanceTest.java | 9 +++-- .../t07/ProjectInheritanceTest.java | 11 +++--- .../t08/ProjectInheritanceTest.java | 9 +++-- .../t09/ProjectInheritanceTest.java | 13 ++++--- .../t10/ProjectInheritanceTest.java | 9 +++-- .../t11/ProjectInheritanceTest.java | 7 ++-- .../t12/ProjectInheritanceTest.java | 7 ++-- .../t12scm/ProjectInheritanceTest.java | 5 ++- .../path/DefaultPathTranslatorTest.java | 5 ++- .../repository/DefaultMirrorSelectorTest.java | 4 +- .../LegacyRepositorySystemTest.java | 12 +++--- .../maven/repository/MirrorProcessorTest.java | 12 +++--- .../legacy/DefaultUpdateCheckManagerTest.java | 14 ++++--- .../legacy/DefaultWagonManagerTest.java | 18 +++++---- .../legacy/LegacyRepositorySystemTest.java | 8 ++-- .../maven/repository/legacy/StringWagon.java | 6 ++- .../DefaultArtifactCollectorTest.java | 12 +++--- .../AbstractConflictResolverTest.java | 8 ++-- .../DefaultClasspathTransformationTest.java | 7 ++-- ...aultGraphConflictResolutionPolicyTest.java | 4 +- .../DefaultGraphConflictResolverTest.java | 7 ++-- .../metadata/TestMetadataSource.java | 8 ++-- maven-core/pom.xml | 2 +- .../apache/maven/ArtifactFilterManager.java | 1 + .../maven/DefaultArtifactFilterManager.java | 8 ++-- .../java/org/apache/maven/DefaultMaven.java | 10 +++-- .../DefaultProjectDependenciesResolver.java | 8 ++-- .../apache/maven/MavenExecutionException.java | 1 + .../maven/ProjectDependenciesResolver.java | 1 + .../java/org/apache/maven/ReactorReader.java | 12 +++--- .../org/apache/maven/RepositoryUtils.java | 1 + .../java/org/apache/maven/SessionScoped.java | 9 +++-- .../artifact/InvalidRepositoryException.java | 1 + .../factory/DefaultArtifactFactory.java | 1 + .../manager/ArtifactHandlerManager.java | 1 + .../DefaultArtifactHandlerManager.java | 8 ++-- .../providers/EarArtifactHandlerProvider.java | 1 + .../providers/EjbArtifactHandlerProvider.java | 1 + .../EjbClientArtifactHandlerProvider.java | 1 + .../providers/JarArtifactHandlerProvider.java | 1 + .../JavaSourceArtifactHandlerProvider.java | 1 + .../JavadocArtifactHandlerProvider.java | 1 + .../MavenPluginArtifactHandlerProvider.java | 1 + .../providers/PomArtifactHandlerProvider.java | 1 + .../providers/RarArtifactHandlerProvider.java | 1 + .../TestJarArtifactHandlerProvider.java | 1 + .../providers/WarArtifactHandlerProvider.java | 1 + .../metadata/ArtifactMetadataSource.java | 1 + .../artifact/metadata/ResolutionGroup.java | 1 + .../repository/DefaultRepositoryRequest.java | 1 + .../LegacyLocalRepositoryManager.java | 1 + .../repository/MavenArtifactRepository.java | 1 + .../layout/DefaultRepositoryLayout.java | 1 + .../metadata/AbstractRepositoryMetadata.java | 1 + .../metadata/RepositoryMetadataManager.java | 1 + .../metadata/io/DefaultMetadataReader.java | 6 ++- .../metadata/io/MetadataReader.java | 1 + .../resolver/ArtifactResolutionRequest.java | 1 + .../resolver/ArtifactResolutionResult.java | 1 + .../DefaultResolutionErrorHandler.java | 5 ++- .../artifact/resolver/ResolutionNode.java | 1 + .../resolver/filter/AndArtifactFilter.java | 1 + .../filter/ExcludesArtifactFilter.java | 1 + .../filter/ExclusionArtifactFilter.java | 1 + .../resolver/filter/ExclusionSetFilter.java | 1 + .../filter/IncludesArtifactFilter.java | 1 + .../maven/bridge/MavenRepositorySystem.java | 8 ++-- .../ArtifactClassRealmConstituent.java | 1 + .../maven/classrealm/ClassRealmManager.java | 1 + .../classrealm/DefaultClassRealmManager.java | 8 ++-- .../internal/DefaultBeanConfigurator.java | 6 ++- .../EnhancedComponentConfigurator.java | 1 + .../eventspy/internal/EventSpyDispatcher.java | 6 ++- .../exception/DefaultExceptionHandler.java | 6 ++- .../apache/maven/execution/BuildSummary.java | 1 + .../DefaultBuildResumptionAnalyzer.java | 6 ++- .../DefaultBuildResumptionDataRepository.java | 6 ++- .../DefaultMavenExecutionRequest.java | 1 + ...DefaultMavenExecutionRequestPopulator.java | 8 ++-- .../DefaultMavenExecutionResult.java | 1 + .../execution/MavenExecutionRequest.java | 1 + .../maven/execution/MavenExecutionResult.java | 1 + .../apache/maven/execution/MavenSession.java | 1 + .../maven/execution/ProfileActivation.java | 4 +- .../maven/execution/ProjectActivation.java | 4 +- .../execution/ProjectDependencyGraph.java | 1 + .../execution/ProjectExecutionEvent.java | 1 + .../maven/execution/ReactorManager.java | 1 + .../execution/scope/MojoExecutionScoped.java | 9 +++-- .../scope/internal/MojoExecutionScope.java | 11 +++--- .../MojoExecutionScopeCoreModule.java | 1 + .../maven/extension/internal/CoreExports.java | 9 +++-- .../internal/CoreExportsProvider.java | 4 +- .../internal/CoreExtensionEntry.java | 1 + .../maven/graph/DefaultGraphBuilder.java | 10 +++-- .../graph/DefaultProjectDependencyGraph.java | 1 + .../graph/FilteredProjectDependencyGraph.java | 1 + .../apache/maven/graph/ProjectSelector.java | 1 + .../ConsumerModelSourceTransformer.java | 1 + ...DefaultRepositorySystemSessionFactory.java | 8 ++-- .../aether/LoggingRepositoryListener.java | 1 + .../aether/MavenChainedWorkspaceReader.java | 1 + .../internal/aether/ResolverLifecycle.java | 5 ++- .../aether/ReverseTreeRepositoryListener.java | 5 ++- .../maven/internal/impl/AbstractNode.java | 1 + .../maven/internal/impl/AbstractSession.java | 5 ++- .../maven/internal/impl/DefaultArtifact.java | 5 ++- .../impl/DefaultArtifactCoordinate.java | 5 ++- .../DefaultArtifactCoordinateFactory.java | 7 ++-- .../impl/DefaultArtifactDeployer.java | 10 +++-- .../internal/impl/DefaultArtifactFactory.java | 7 ++-- .../impl/DefaultArtifactInstaller.java | 7 ++-- .../internal/impl/DefaultArtifactManager.java | 6 ++- .../impl/DefaultArtifactResolver.java | 12 +++--- .../internal/impl/DefaultDependency.java | 5 ++- .../impl/DefaultDependencyCollector.java | 10 +++-- .../impl/DefaultDependencyCoordinate.java | 5 ++- .../DefaultDependencyCoordinateFactory.java | 10 +++-- .../maven/internal/impl/DefaultEvent.java | 1 + .../internal/impl/DefaultLocalRepository.java | 6 ++- .../impl/DefaultLocalRepositoryManager.java | 4 +- .../maven/internal/impl/DefaultLog.java | 5 ++- .../maven/internal/impl/DefaultLookup.java | 6 ++- .../impl/DefaultMessageBuilderFactory.java | 4 +- .../internal/impl/DefaultModelXmlFactory.java | 8 ++-- .../internal/impl/DefaultMojoExecution.java | 1 + .../maven/internal/impl/DefaultNode.java | 1 + .../maven/internal/impl/DefaultProject.java | 1 + .../internal/impl/DefaultProjectBuilder.java | 8 ++-- .../internal/impl/DefaultProjectManager.java | 6 ++- .../maven/internal/impl/DefaultPrompter.java | 6 ++- .../impl/DefaultRepositoryFactory.java | 4 +- .../maven/internal/impl/DefaultSession.java | 5 ++- .../internal/impl/DefaultSessionFactory.java | 1 + .../internal/impl/DefaultSettingsBuilder.java | 8 ++-- .../impl/DefaultSettingsXmlFactory.java | 6 ++- .../impl/DefaultToolchainManager.java | 8 ++-- .../impl/DefaultToolchainsBuilder.java | 8 ++-- .../impl/DefaultToolchainsXmlFactory.java | 6 ++- .../maven/internal/impl/DefaultTransport.java | 8 ++-- .../impl/DefaultTransportProvider.java | 10 +++-- .../internal/impl/DefaultTypeRegistry.java | 5 ++- .../internal/impl/DefaultVersionParser.java | 10 +++-- .../maven/internal/impl/EventSpyImpl.java | 4 +- .../maven/internal/impl/WrapperNode.java | 1 + .../lifecycle/DefaultLifecycleExecutor.java | 8 ++-- .../maven/lifecycle/DefaultLifecycles.java | 8 ++-- .../lifecycle/LifeCyclePluginAnalyzer.java | 1 + .../org/apache/maven/lifecycle/Lifecycle.java | 1 + .../LifecycleExecutionException.java | 4 +- .../maven/lifecycle/LifecycleExecutor.java | 1 + .../lifecycle/LifecycleMappingDelegate.java | 1 + .../maven/lifecycle/MavenExecutionPlan.java | 1 + .../internal/BuildListCalculator.java | 6 ++- .../CompoundProjectExecutionListener.java | 1 + .../DefaultExecutionEventCatapult.java | 1 + ...faultLifecycleExecutionPlanCalculator.java | 8 ++-- .../DefaultLifecycleMappingDelegate.java | 8 ++-- .../DefaultLifecyclePluginAnalyzer.java | 10 +++-- ...DefaultLifecycleTaskSegmentCalculator.java | 8 ++-- .../DefaultMojoExecutionConfigurator.java | 8 ++-- .../DefaultProjectArtifactFactory.java | 4 +- .../lifecycle/internal/DependencyContext.java | 1 + .../lifecycle/internal/ExecutionPlanItem.java | 1 + .../internal/LifecycleDebugLogger.java | 6 ++- .../internal/LifecycleDependencyResolver.java | 6 ++- .../LifecycleExecutionPlanCalculator.java | 1 + .../internal/LifecycleModuleBuilder.java | 6 ++- .../internal/LifecyclePluginResolver.java | 6 ++- .../lifecycle/internal/LifecycleStarter.java | 6 ++- .../LifecycleTaskSegmentCalculator.java | 1 + .../internal/MojoDescriptorCreator.java | 8 ++-- .../lifecycle/internal/MojoExecutor.java | 10 +++-- .../internal/ProjectArtifactFactory.java | 1 + .../lifecycle/internal/ProjectBuildList.java | 1 + .../lifecycle/internal/ProjectIndex.java | 1 + .../lifecycle/internal/ProjectSegment.java | 1 + .../internal/ReactorBuildStatus.java | 1 + .../lifecycle/internal/builder/Builder.java | 1 + .../internal/builder/BuilderCommon.java | 8 ++-- .../ConcurrencyDependencyGraph.java | 1 + .../multithreaded/MultiThreadedBuilder.java | 8 ++-- .../multithreaded/ThreadOutputMuxer.java | 1 + .../singlethreaded/SingleThreadedBuilder.java | 4 +- .../mapping/DefaultLifecycleMapping.java | 6 +-- .../lifecycle/mapping/LifecycleMojo.java | 1 + .../lifecycle/mapping/LifecyclePhase.java | 1 + .../providers/AbstractLifecycleProvider.java | 4 +- .../AbstractLifecycleMappingProvider.java | 6 ++- .../DefaultLifecycleBindingsInjector.java | 8 ++-- .../maven/plugin/BuildPluginManager.java | 1 + .../org/apache/maven/plugin/CacheUtils.java | 1 + .../plugin/CompoundMojoExecutionListener.java | 1 + .../plugin/DebugConfigurationListener.java | 1 + .../plugin/DefaultBuildPluginManager.java | 8 ++-- .../plugin/DefaultExtensionRealmCache.java | 6 ++- .../plugin/DefaultMojosExecutionStrategy.java | 4 +- .../plugin/DefaultPluginArtifactsCache.java | 6 ++- .../plugin/DefaultPluginDescriptorCache.java | 6 ++- .../maven/plugin/DefaultPluginRealmCache.java | 6 ++- .../maven/plugin/ExtensionRealmCache.java | 1 + .../maven/plugin/MavenPluginManager.java | 1 + .../MavenPluginPrerequisitesChecker.java | 1 + .../apache/maven/plugin/MojoExecution.java | 1 + .../maven/plugin/MojosExecutionStrategy.java | 1 + .../maven/plugin/PluginArtifactsCache.java | 1 + .../maven/plugin/PluginDescriptorCache.java | 1 + .../apache/maven/plugin/PluginManager.java | 1 + .../maven/plugin/PluginNotFoundException.java | 1 + .../plugin/PluginParameterException.java | 1 + .../PluginParameterExpressionEvaluator.java | 1 + .../PluginParameterExpressionEvaluatorV4.java | 1 + .../apache/maven/plugin/PluginRealmCache.java | 1 + ...bstractMavenPluginParametersValidator.java | 1 + .../plugin/internal/DefaultLegacySupport.java | 4 +- .../internal/DefaultMavenPluginManager.java | 8 ++-- .../internal/DefaultMavenPluginValidator.java | 4 +- .../DefaultPluginDependenciesResolver.java | 8 ++-- .../plugin/internal/DefaultPluginManager.java | 4 +- .../internal/DeprecatedPluginValidator.java | 1 + .../MavenPluginJavaPrerequisiteChecker.java | 1 + .../MavenPluginMavenPrerequisiteChecker.java | 1 + .../plugin/internal/MavenPluginValidator.java | 1 + .../maven/plugin/internal/MojoLogWrapper.java | 4 +- .../internal/PluginDependenciesResolver.java | 1 + .../ReadOnlyPluginParametersValidator.java | 1 + .../ValidatingConfigurationListener.java | 1 + .../prefix/DefaultPluginPrefixRequest.java | 1 + .../NoPluginFoundForPrefixException.java | 1 + .../plugin/prefix/PluginPrefixRequest.java | 1 + .../internal/DefaultPluginPrefixResolver.java | 8 ++-- .../version/DefaultPluginVersionRequest.java | 1 + .../plugin/version/PluginVersionRequest.java | 1 + .../PluginVersionResolutionException.java | 1 + .../DefaultPluginVersionResolver.java | 8 ++-- .../DefaultDependencyResolutionResult.java | 1 + .../project/DefaultMavenProjectHelper.java | 6 ++- .../project/DefaultModelBuildingListener.java | 1 + .../maven/project/DefaultProjectBuilder.java | 8 ++-- .../project/DefaultProjectBuildingHelper.java | 8 ++-- .../DefaultProjectBuildingRequest.java | 1 + .../project/DefaultProjectBuildingResult.java | 1 + .../DefaultProjectDependenciesResolver.java | 8 ++-- .../project/DefaultProjectRealmCache.java | 6 ++- .../project/DependencyResolutionResult.java | 1 + .../project/ExtensionDescriptorBuilder.java | 1 + .../InvalidProjectVersionException.java | 1 + .../apache/maven/project/MavenProject.java | 1 + .../apache/maven/project/ProjectBuilder.java | 1 + .../maven/project/ProjectBuildingHelper.java | 1 + .../maven/project/ProjectBuildingRequest.java | 1 + .../maven/project/ProjectBuildingResult.java | 1 + .../maven/project/ProjectModelResolver.java | 1 + .../maven/project/ProjectRealmCache.java | 1 + .../apache/maven/project/ProjectSorter.java | 1 + .../maven/project/ReactorModelPool.java | 1 + .../artifact/ActiveProjectArtifact.java | 1 + .../artifact/ArtifactWithDependencies.java | 1 + .../project/artifact/AttachedArtifact.java | 1 + .../artifact/DefaultMavenMetadataCache.java | 6 ++- .../artifact/DefaultMetadataSource.java | 1 + .../DefaultProjectArtifactsCache.java | 6 ++- .../InvalidDependencyVersionException.java | 1 + .../project/artifact/MavenMetadataCache.java | 1 + .../project/artifact/MavenMetadataSource.java | 8 ++-- .../project/artifact/PluginArtifact.java | 1 + .../project/artifact/ProjectArtifact.java | 1 + .../artifact/ProjectArtifactMetadata.java | 1 + .../artifact/ProjectArtifactsCache.java | 1 + .../collector/DefaultProjectsSelector.java | 8 ++-- .../MultiModuleCollectionStrategy.java | 8 ++-- .../collector/PomlessCollectionStrategy.java | 6 ++- .../collector/ProjectCollectionStrategy.java | 1 + .../project/collector/ProjectsSelector.java | 1 + .../RequestPomCollectionStrategy.java | 8 ++-- .../maven/project/path/PathTranslator.java | 1 + .../properties/internal/EnvironmentUtils.java | 1 + .../DelegatingLocalArtifactRepository.java | 1 + .../maven/repository/RepositorySystem.java | 1 + .../metadata/ArtifactMetadataSource.java | 1 + .../DefaultMetadataResolutionRequest.java | 1 + .../metadata/MetadataResolutionRequest.java | 1 + .../legacy/metadata/ResolutionGroup.java | 1 + .../internal/DefaultRuntimeInformation.java | 8 ++-- .../session/scope/internal/SessionScope.java | 9 +++-- .../scope/internal/SessionScopeModule.java | 3 +- .../settings/DefaultMavenSettingsBuilder.java | 6 ++- .../maven/settings/MavenSettingsBuilder.java | 1 + .../maven/settings/SettingsUtilsV4.java | 1 + .../maven/toolchain/DefaultToolchain.java | 1 + .../toolchain/DefaultToolchainManager.java | 10 +++-- .../DefaultToolchainManagerPrivate.java | 8 ++-- .../toolchain/DefaultToolchainsBuilder.java | 6 ++- .../maven/toolchain/ToolchainManager.java | 1 + .../maven/toolchain/ToolchainPrivate.java | 1 + .../maven/toolchain/ToolchainsBuilder.java | 1 + .../toolchain/java/JavaToolchainFactory.java | 6 ++- .../toolchain/java/JavaToolchainImpl.java | 1 + .../AbstractCoreMavenComponentTestCase.java | 6 ++- .../org/apache/maven/DefaultMavenTest.java | 16 ++++---- .../maven/MavenLifecycleParticipantTest.java | 7 ++-- .../test/java/org/apache/maven/MavenTest.java | 1 + .../ProjectDependenciesResolverTest.java | 12 +++--- .../artifact/handler/ArtifactHandlerTest.java | 8 ++-- .../filter/ExclusionArtifactFilterTest.java | 11 +++--- .../DefaultBeanConfiguratorPathTest.java | 5 ++- .../DefaultBeanConfiguratorTest.java | 5 ++- .../DefaultExceptionHandlerTest.java | 5 ++- .../DefaultBuildResumptionAnalyzerTest.java | 11 +++--- ...aultBuildResumptionDataRepositoryTest.java | 15 ++++---- ...ultMavenExecutionRequestPopulatorTest.java | 6 ++- .../execution/DefaultMavenExecutionTest.java | 9 +++-- .../internal/MojoExecutionScopeTest.java | 9 +++-- .../maven/graph/DefaultGraphBuilderTest.java | 33 +++++++++-------- .../DefaultProjectDependencyGraphTest.java | 5 ++- .../maven/graph/ProjectSelectorTest.java | 33 +++++++++-------- .../internal/MultilineMessageHelperTest.java | 5 ++- .../ConsumerModelSourceTransformerTest.java | 1 + .../ReverseTreeRepositoryListenerTest.java | 15 ++++---- .../internal/impl/PropertiesAsMapTest.java | 13 ++++--- .../apache/maven/internal/impl/TestApi.java | 8 ++-- .../internal/impl/TestRepositorySystem.java | 8 ++-- .../lifecycle/DefaultLifecyclesTest.java | 16 ++++---- .../DelegatingMojoExecutionListener.java | 6 ++- .../DelegatingProjectExecutionListener.java | 6 ++- .../EmptyLifecyclePluginAnalyzer.java | 1 + .../LifecycleExecutorSubModulesTest.java | 5 ++- .../lifecycle/LifecycleExecutorTest.java | 16 ++++---- .../lifecycle/MavenExecutionPlanTest.java | 9 +++-- .../MojoExecutionXPathContainer.java | 1 + .../internal/BuildListCalculatorTest.java | 9 +++-- .../ConcurrencyDependencyGraphTest.java | 19 +++++----- .../LifecycleDependencyResolverTest.java | 8 ++-- .../LifecycleExecutionPlanCalculatorTest.java | 4 +- .../internal/LifecycleModuleBuilderTest.java | 8 ++-- ...ifecycleTaskSegmentCalculatorImplTest.java | 7 ++-- .../lifecycle/internal/PhaseRecorderTest.java | 7 ++-- .../internal/ProjectBuildListTest.java | 8 ++-- .../internal/builder/BuilderCommonTest.java | 9 +++-- .../ConcurrencyDependencyGraphTest.java | 5 ++- .../multithreaded/ThreadOutputMuxerTest.java | 5 ++- .../internal/stub/BuildPluginManagerStub.java | 1 + .../internal/stub/CompletionServiceStub.java | 1 + .../internal/stub/DefaultLifecyclesStub.java | 9 +++-- .../stub/LifeCyclePluginAnalyzerStub.java | 1 + .../LifecycleExecutionPlanCalculatorStub.java | 1 + .../LifecycleTaskSegmentCalculatorStub.java | 1 + .../internal/stub/MojoExecutorStub.java | 4 +- .../stub/ProjectDependenciesResolverStub.java | 1 + .../stub/ProjectDependencyGraphStub.java | 1 + .../stub/ProjectDependencyGraphStubTest.java | 7 ++-- .../lifecycle/mapping/LifecyclePhaseTest.java | 9 +++-- .../maven/plugin/PluginManagerTest.java | 10 +++-- .../plugin/PluginParameterExceptionTest.java | 5 ++- ...luginParameterExpressionEvaluatorTest.java | 14 ++++--- .../internal/DefaultLegacySupportTest.java | 5 ++- ...avenPluginJavaPrerequisiteCheckerTest.java | 4 +- .../internal/MavenPluginValidatorTest.java | 8 ++-- .../project/AbstractMavenProjectTestCase.java | 4 +- .../DefaultMavenProjectBuilderTest.java | 27 +++++++------- .../maven/project/EmptyLifecycleExecutor.java | 1 + .../project/EmptyProjectBuildingHelper.java | 1 + .../ExtensionDescriptorBuilderTest.java | 17 +++++---- .../project/LegacyLocalRepositoryManager.java | 1 + .../maven/project/MavenProjectTest.java | 13 ++++--- .../maven/project/PomConstructionTest.java | 26 +++++++------ .../maven/project/ProjectBuilderTest.java | 37 ++++++++++--------- ...jectBuildingResultWithLocationMatcher.java | 4 +- ...ildingResultWithProblemMessageMatcher.java | 4 +- .../project/ProjectModelResolverTest.java | 15 ++++---- .../maven/project/ProjectSorterTest.java | 11 +++--- .../maven/project/TestMetadataSource.java | 4 +- .../DefaultMavenMetadataCacheTest.java | 7 ++-- .../DefaultProjectArtifactsCacheTest.java | 5 ++- .../artifact/MavenMetadataSourceTest.java | 1 + .../CanonicalProjectBuilderTest.java | 7 ++-- .../maven/project/harness/PomTestWrapper.java | 1 + .../harness/Xpp3DomAttributeIterator.java | 1 + .../harness/Xpp3DomAttributePointer.java | 1 + .../project/harness/Xpp3DomNodeIterator.java | 1 + .../project/harness/Xpp3DomNodePointer.java | 1 + .../harness/Xpp3DomPointerFactory.java | 1 + .../repository/TestRepositoryConnector.java | 1 + .../TestRepositoryConnectorFactory.java | 1 + .../repository/TestRepositorySystem.java | 8 ++-- .../DefaultRuntimeInformationTest.java | 11 +++--- .../PomConstructionWithSettingsTest.java | 8 ++-- .../maven/settings/SettingsUtilsTest.java | 7 ++-- .../DefaultToolchainManagerPrivateTest.java | 15 ++++---- .../DefaultToolchainManagerTest.java | 13 ++++--- .../maven/toolchain/DefaultToolchainTest.java | 13 ++++--- .../RequirementMatcherFactoryTest.java | 4 +- .../java/org/apache/maven/cli/CLIManager.java | 1 + .../apache/maven/cli/CLIReportingUtils.java | 5 ++- .../java/org/apache/maven/cli/CliRequest.java | 1 + .../java/org/apache/maven/cli/MavenCli.java | 13 ++++--- .../SettingsXmlConfigurationProcessor.java | 10 +++-- .../cli/event/DefaultEventSpyContext.java | 1 + .../maven/cli/event/ExecutionEventLogger.java | 9 +++-- .../BootstrapCoreExtensionManager.java | 6 ++- .../logging/Slf4jConfigurationFactory.java | 1 + .../maven/cli/logging/Slf4jStdoutLogger.java | 1 + .../UnsupportedSlf4jBindingConfiguration.java | 1 + .../AbstractMavenTransferListener.java | 1 + .../ConsoleMavenTransferListener.java | 1 + .../transfer/Slf4jMavenTransferListener.java | 1 + .../sisu/plexus/PlexusXmlBeanConverter.java | 20 +++++----- .../cli/CLIManagerDocumentationTest.java | 1 + .../maven/cli/CLIReportingUtilsTest.java | 4 +- .../apache/maven/cli/CleanArgumentTest.java | 4 +- .../org/apache/maven/cli/MavenCliTest.java | 37 ++++++++++--------- .../cli/event/ExecutionEventLoggerTest.java | 13 ++++--- .../cli/transfer/FileSizeFormatTest.java | 7 ++-- .../model/building/ArtifactModelSource.java | 1 + .../building/BuildModelSourceTransformer.java | 6 ++- .../DefaultBuildPomXMLFilterFactory.java | 1 + .../model/building/DefaultModelBuilder.java | 12 +++--- .../building/DefaultModelBuilderFactory.java | 1 + .../building/DefaultModelBuildingRequest.java | 1 + .../building/DefaultModelBuildingResult.java | 1 + .../DefaultModelProblemCollector.java | 1 + .../model/building/DefaultModelProcessor.java | 8 ++-- .../DefaultModelSourceTransformer.java | 1 + .../building/DefaultTransformerContext.java | 1 + .../maven/model/building/FileModelSource.java | 1 + .../model/building/FileToRawModelMerger.java | 1 + .../building/FilterModelBuildingRequest.java | 1 + .../maven/model/building/ModelBuilder.java | 1 + .../building/ModelBuildingException.java | 1 + .../model/building/ModelBuildingRequest.java | 1 + .../model/building/ModelBuildingResult.java | 1 + .../maven/model/building/ModelData.java | 1 + .../ModelProblemCollectorRequest.java | 1 + .../model/building/ModelProblemUtils.java | 1 + .../building/ModelSourceTransformer.java | 1 + .../apache/maven/model/building/Result.java | 8 ++-- .../model/building/TransformerContext.java | 1 + .../maven/model/building/UrlModelSource.java | 1 + .../DefaultDependencyManagementImporter.java | 6 ++- .../DependencyManagementImporter.java | 1 + .../DefaultInheritanceAssembler.java | 6 ++- .../AbstractStringBasedModelInterpolator.java | 4 +- .../BuildTimestampValueSource.java | 1 + .../DefaultModelVersionProcessor.java | 4 +- .../interpolation/ModelInterpolator.java | 1 + .../interpolation/ModelVersionProcessor.java | 1 + .../PathTranslatingPostProcessor.java | 1 + .../StringVisitorModelInterpolator.java | 8 ++-- .../UrlNormalizingPostProcessor.java | 1 + .../maven/model/io/DefaultModelReader.java | 8 ++-- .../maven/model/io/DefaultModelWriter.java | 6 ++- .../apache/maven/model/io/ModelReader.java | 1 + .../apache/maven/model/io/ModelWriter.java | 1 + .../model/locator/DefaultModelLocator.java | 3 +- .../DefaultDependencyManagementInjector.java | 6 ++- .../DefaultPluginManagementInjector.java | 6 ++- .../maven/model/merge/MavenModelMerger.java | 1 + .../normalization/DefaultModelNormalizer.java | 6 ++- .../path/DefaultModelPathTranslator.java | 8 ++-- .../model/path/DefaultModelUrlNormalizer.java | 1 + .../model/path/DefaultPathTranslator.java | 3 +- .../maven/model/path/ModelPathTranslator.java | 1 + ...ProfileActivationFilePathInterpolator.java | 4 +- .../DefaultPluginConfigurationExpander.java | 4 +- .../DefaultReportConfigurationExpander.java | 1 + .../DefaultProfileActivationContext.java | 4 +- .../model/profile/DefaultProfileInjector.java | 6 ++- .../model/profile/DefaultProfileSelector.java | 8 ++-- .../maven/model/profile/ProfileSelector.java | 1 + .../activation/FileProfileActivator.java | 4 +- .../JdkVersionProfileActivator.java | 6 ++- .../OperatingSystemProfileActivator.java | 1 + .../activation/PropertyProfileActivator.java | 1 + .../maven/model/resolution/ModelResolver.java | 1 + .../superpom/DefaultSuperPomProvider.java | 8 ++-- .../validation/DefaultModelValidator.java | 8 ++-- .../model/building/ComplexActivationTest.java | 9 +++-- .../DefaultModelBuilderFactoryTest.java | 9 +++-- .../building/DefaultModelBuilderTest.java | 7 ++-- .../model/building/FileModelSourceTest.java | 11 +++--- .../building/FileToRawModelMergerTest.java | 7 ++-- .../building/SimpleProblemCollector.java | 1 + .../DefaultInheritanceAssemblerTest.java | 9 +++-- .../AbstractModelInterpolatorTest.java | 9 +++-- .../MavenBuildTimestampTest.java | 5 ++- .../model/merge/MavenModelMergerTest.java | 7 ++-- .../model/path/DefaultUrlNormalizerTest.java | 4 +- .../AbstractProfileActivatorTest.java | 5 ++- .../activation/FileProfileActivatorTest.java | 5 ++- .../JdkVersionProfileActivatorTest.java | 1 + .../PropertyProfileActivatorTest.java | 1 + .../validation/DefaultModelValidatorTest.java | 9 +++-- .../BuildToRawPomXMLFilterFactory.java | 1 + .../model/transform/CiFriendlyXMLFilter.java | 1 + .../model/transform/FastForwardFilter.java | 1 + .../model/transform/ModulesXMLFilter.java | 1 + .../model/transform/ParentXMLFilter.java | 1 + .../RawToConsumerPomXMLFilterFactory.java | 1 + .../transform/ReactorDependencyXMLFilter.java | 1 + .../transform/RelativePathXMLFilter.java | 1 + .../model/transform/pull/BufferingParser.java | 1 + .../transform/pull/NodeBufferingParser.java | 1 + .../maven/model/transform/pull/XmlUtils.java | 1 + .../transform/AbstractXMLFilterTests.java | 1 + .../transform/CiFriendlyXMLFilterTest.java | 4 +- .../transform/ConsumerPomXMLFilterTest.java | 5 ++- .../model/transform/ModulesXMLFilterTest.java | 4 +- .../model/transform/ParentXMLFilterTest.java | 5 ++- .../ReactorDependencyXMLFilterTest.java | 5 ++- .../transform/RelativePathXMLFilterTest.java | 4 +- .../maven/model/io/xpp3/MavenXpp3Reader.java | 1 + .../model/io/xpp3/MavenXpp3ReaderEx.java | 1 + .../maven/model/io/xpp3/MavenXpp3Writer.java | 1 + .../model/io/xpp3/MavenXpp3WriterEx.java | 1 + .../maven/model/ActivationFileTest.java | 4 +- .../apache/maven/model/ActivationOSTest.java | 4 +- .../maven/model/ActivationPropertyTest.java | 4 +- .../apache/maven/model/ActivationTest.java | 4 +- .../org/apache/maven/model/BuildTest.java | 4 +- .../apache/maven/model/CiManagementTest.java | 4 +- .../apache/maven/model/ContributorTest.java | 4 +- .../maven/model/DependencyManagementTest.java | 4 +- .../apache/maven/model/DependencyTest.java | 4 +- .../maven/model/DeploymentRepositoryTest.java | 4 +- .../org/apache/maven/model/DeveloperTest.java | 4 +- .../model/DistributionManagementTest.java | 4 +- .../org/apache/maven/model/ExclusionTest.java | 4 +- .../org/apache/maven/model/ExtensionTest.java | 4 +- .../maven/model/IssueManagementTest.java | 4 +- .../org/apache/maven/model/LicenseTest.java | 4 +- .../apache/maven/model/MailingListTest.java | 4 +- .../org/apache/maven/model/ModelTest.java | 4 +- .../org/apache/maven/model/NotifierTest.java | 4 +- .../apache/maven/model/OrganizationTest.java | 4 +- .../org/apache/maven/model/ParentTest.java | 4 +- .../maven/model/PluginConfigurationTest.java | 4 +- .../maven/model/PluginContainerTest.java | 4 +- .../maven/model/PluginExecutionTest.java | 4 +- .../maven/model/PluginManagementTest.java | 4 +- .../org/apache/maven/model/PluginTest.java | 4 +- .../apache/maven/model/PrerequisitesTest.java | 4 +- .../org/apache/maven/model/ProfileTest.java | 4 +- .../apache/maven/model/RelocationTest.java | 4 +- .../apache/maven/model/ReportPluginTest.java | 4 +- .../org/apache/maven/model/ReportSetTest.java | 4 +- .../org/apache/maven/model/ReportingTest.java | 4 +- .../maven/model/RepositoryPolicyTest.java | 4 +- .../apache/maven/model/RepositoryTest.java | 4 +- .../org/apache/maven/model/ResourceTest.java | 4 +- .../java/org/apache/maven/model/ScmTest.java | 4 +- .../apache/maven/model/SerializationTest.java | 5 ++- .../java/org/apache/maven/model/SiteTest.java | 4 +- .../maven/model/merge/MavenMergerTest.java | 9 +++-- .../apache/maven/model/v4/ModelXmlTest.java | 5 ++- .../org/apache/maven/plugin/AbstractMojo.java | 1 + .../maven/plugin/MojoNotFoundException.java | 1 + .../plugin/descriptor/MojoDescriptor.java | 1 + .../plugin/descriptor/PluginDescriptor.java | 1 + .../descriptor/PluginDescriptorBuilder.java | 1 + .../plugin/descriptor/MojoDescriptorTest.java | 4 +- .../PluginDescriptorBuilderTest.java | 13 ++++--- .../repository/metadata/MetadataTest.java | 9 +++-- .../ArtifactDescriptorReaderDelegate.java | 1 + .../DefaultArtifactDescriptorReader.java | 8 ++-- .../internal/DefaultModelCache.java | 1 + .../internal/DefaultModelCacheFactory.java | 1 + .../internal/DefaultModelResolver.java | 1 + .../internal/DefaultVersionRangeResolver.java | 8 ++-- .../internal/DefaultVersionResolver.java | 8 ++-- .../DefaultVersionSchemeProvider.java | 1 + .../internal/LocalSnapshotMetadata.java | 1 + .../LocalSnapshotMetadataGenerator.java | 1 + .../repository/internal/MavenMetadata.java | 1 + .../internal/MavenResolverModule.java | 12 +++--- .../internal/MavenSnapshotMetadata.java | 1 + .../repository/internal/PluginsMetadata.java | 1 + .../internal/PluginsMetadataGenerator.java | 1 + .../PluginsMetadataGeneratorFactory.java | 1 + .../internal/RelocatedArtifact.java | 1 + .../internal/RemoteSnapshotMetadata.java | 1 + .../RemoteSnapshotMetadataGenerator.java | 1 + .../SnapshotMetadataGeneratorFactory.java | 1 + .../repository/internal/VersionsMetadata.java | 1 + .../internal/VersionsMetadataGenerator.java | 1 + .../VersionsMetadataGeneratorFactory.java | 1 + .../internal/AbstractRepositoryTestCase.java | 6 ++- .../DefaultArtifactDescriptorReaderTest.java | 11 +++--- .../internal/DefaultModelResolverTest.java | 11 +++--- .../internal/DefaultVersionResolverTest.java | 5 ++- .../MavenRepositorySystemUtilsTest.java | 4 +- .../internal/RemoteSnapshotMetadataTest.java | 5 ++- .../internal/RepositorySystemTest.java | 13 ++++--- .../util/ConsoleRepositoryListener.java | 1 + .../util/ConsoleTransferListener.java | 1 + .../building/DefaultSettingsBuilder.java | 8 ++-- .../DefaultSettingsBuildingResult.java | 1 + .../DefaultSettingsProblemCollector.java | 1 + .../settings/building/FileSettingsSource.java | 1 + .../building/SettingsBuildingResult.java | 1 + .../settings/building/UrlSettingsSource.java | 1 + .../crypto/DefaultSettingsDecrypter.java | 6 ++- .../DefaultSettingsDecryptionRequest.java | 1 + .../DefaultSettingsDecryptionResult.java | 1 + .../crypto/MavenSecDispatcherProvider.java | 4 +- .../crypto/SettingsDecryptionRequest.java | 1 + .../crypto/SettingsDecryptionResult.java | 1 + .../settings/io/DefaultSettingsReader.java | 6 ++- .../settings/io/DefaultSettingsWriter.java | 6 ++- .../maven/settings/io/SettingsReader.java | 1 + .../maven/settings/io/SettingsWriter.java | 1 + .../settings/merge/MavenSettingsMerger.java | 1 + .../validation/DefaultSettingsValidator.java | 6 ++- .../DefaultSettingsBuilderFactoryTest.java | 5 ++- .../DefaultSettingsValidatorTest.java | 7 ++-- .../settings/io/xpp3/SettingsXpp3Reader.java | 1 + .../settings/io/xpp3/SettingsXpp3Writer.java | 1 + .../org/slf4j/impl/MavenLoggerFactory.java | 1 + .../org/slf4j/impl/MavenSimpleLogger.java | 4 +- .../slf4j/impl/MavenLoggerFactoryTest.java | 8 ++-- .../maven/logwrapper/LogLevelRecorder.java | 1 + .../logwrapper/MavenSlf4jWrapperFactory.java | 1 + .../logwrapper/LogLevelRecorderTest.java | 6 +-- .../building/DefaultToolchainsBuilder.java | 8 ++-- .../DefaultToolchainsBuildingResult.java | 1 + .../building/ToolchainsBuildingException.java | 1 + .../building/ToolchainsBuildingResult.java | 1 + .../toolchain/io/DefaultToolchainsReader.java | 6 ++- .../toolchain/io/DefaultToolchainsWriter.java | 6 ++- .../maven/toolchain/io/ToolchainsReader.java | 1 + .../maven/toolchain/io/ToolchainsWriter.java | 1 + .../toolchain/merge/MavenToolchainMerger.java | 1 + .../DefaultToolchainsBuilderTest.java | 13 ++++--- .../ToolchainsBuildingExceptionTest.java | 5 ++- .../merge/MavenToolchainMergerTest.java | 5 ++- .../apache/maven/internal/xml/DomBuilder.java | 1 + .../apache/maven/internal/xml/Xpp3Dom.java | 1 + .../maven/internal/xml/Xpp3DomBuilder.java | 1 + .../maven/internal/xml/Xpp3DomWriter.java | 1 + .../org/codehaus/plexus/util/xml/Xpp3Dom.java | 1 + .../plexus/util/xml/Xpp3DomBuilder.java | 1 + .../maven/internal/xml/Xpp3DomTest.java | 5 ++- pom.xml | 2 +- 822 files changed, 2116 insertions(+), 1196 deletions(-) diff --git a/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java b/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java index fb7544ec14..0fc2a3c725 100644 --- a/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java +++ b/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.settings; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.io.Reader; import java.nio.charset.StandardCharsets; + import org.apache.maven.settings.v4.SettingsXpp3Reader; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Tests that the global settings.xml shipped with the distribution is in good state. * diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinate.java b/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinate.java index c24cf191fd..8142baf7d9 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinate.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinate.java @@ -19,6 +19,7 @@ package org.apache.maven.api; import java.util.Collection; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java index a19479aa89..6952f8d1e0 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java @@ -19,6 +19,7 @@ package org.apache.maven.api; import java.util.Optional; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java b/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java index 612b1ac94d..7f0509be45 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java @@ -19,6 +19,7 @@ package org.apache.maven.api; import java.nio.file.Path; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java b/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java index 0a8494f7c9..ae078d96c3 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java @@ -19,6 +19,7 @@ package org.apache.maven.api; import java.util.Optional; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.model.Plugin; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java index 13f77bb196..401563e61a 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Optional; import java.util.function.Predicate; import java.util.stream.Stream; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java index f3c3218571..2fe08b1b90 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java @@ -21,6 +21,7 @@ package org.apache.maven.api; import java.nio.file.Path; import java.util.List; import java.util.Optional; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.model.Build; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/ResolutionScope.java b/api/maven-api-core/src/main/java/org/apache/maven/api/ResolutionScope.java index 8adccbb1a3..4b2725220a 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/ResolutionScope.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/ResolutionScope.java @@ -26,6 +26,7 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Scope.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Scope.java index 186fb2a24d..8edba0a243 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Scope.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Scope.java @@ -19,6 +19,7 @@ package org.apache.maven.api; import java.util.Locale; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Session.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Session.java index 4ed8a38748..5bdc43485e 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Session.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Session.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import java.util.Optional; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.ThreadSafe; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/SessionData.java b/api/maven-api-core/src/main/java/org/apache/maven/api/SessionData.java index c8833519c4..2f0a27857e 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/SessionData.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/SessionData.java @@ -19,6 +19,7 @@ package org.apache.maven.api; import java.util.function.Supplier; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.Nullable; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Toolchain.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Toolchain.java index 92aca129fb..c4c108723f 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Toolchain.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Toolchain.java @@ -19,6 +19,7 @@ package org.apache.maven.api; import java.util.Map; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Component.java b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Component.java index 0459eda4ba..ad3e593f42 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Component.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Component.java @@ -24,6 +24,7 @@ import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java index 07f33319c1..ec4bde63b0 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java @@ -24,6 +24,7 @@ import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java index 415c6631e2..07c9ec0f7b 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java @@ -24,6 +24,7 @@ import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; + import org.apache.maven.api.ResolutionScope; import org.apache.maven.api.annotations.Experimental; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Parameter.java b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Parameter.java index df2d6c253a..e6e7f81a00 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Parameter.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Parameter.java @@ -24,6 +24,7 @@ import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinateFactoryRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinateFactoryRequest.java index 66f795afed..55acc22466 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinateFactoryRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinateFactoryRequest.java @@ -18,8 +18,6 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Experimental; @@ -27,6 +25,8 @@ import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * A request for creating a {@link ArtifactCoordinate} object. * diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployer.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployer.java index 3494804793..8ecb7e13ea 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployer.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployer.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.util.Collection; + import org.apache.maven.api.Artifact; import org.apache.maven.api.RemoteRepository; import org.apache.maven.api.Service; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java index 8ed8ec6ec5..1a92f69781 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java @@ -18,9 +18,8 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.util.Collection; + import org.apache.maven.api.Artifact; import org.apache.maven.api.RemoteRepository; import org.apache.maven.api.Session; @@ -28,6 +27,8 @@ import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * A request for deploying one or more artifacts to a remote repository. * diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java index e5e55ec3dd..032ecb83a2 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java @@ -18,14 +18,14 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * * diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstaller.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstaller.java index 57fa2c4fd4..f2d4668b8d 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstaller.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstaller.java @@ -20,6 +20,7 @@ package org.apache.maven.api.services; import java.util.Collection; import java.util.Collections; + import org.apache.maven.api.Artifact; import org.apache.maven.api.Service; import org.apache.maven.api.Session; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java index 9e33d24444..dab26c4ba7 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java @@ -18,10 +18,9 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.util.Collection; import java.util.Collections; + import org.apache.maven.api.Artifact; import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Experimental; @@ -30,6 +29,8 @@ import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; import org.apache.maven.api.annotations.Nullable; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * A request for installing one or more artifacts in the local repository. * diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactManager.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactManager.java index cf8a6624ae..44c05251f0 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactManager.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactManager.java @@ -20,6 +20,7 @@ package org.apache.maven.api.services; import java.nio.file.Path; import java.util.Optional; + import org.apache.maven.api.Artifact; import org.apache.maven.api.Service; import org.apache.maven.api.annotations.Experimental; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolver.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolver.java index 3d3eadfc17..b73e59f45f 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolver.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolver.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.util.Collection; + import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Service; import org.apache.maven.api.Session; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java index 614ae81084..36c63d56d8 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java @@ -18,9 +18,8 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.util.Collection; + import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Experimental; @@ -28,6 +27,8 @@ import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * A request for resolving an artifact. * diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverResult.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverResult.java index 2a50239f87..928653bcf6 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverResult.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverResult.java @@ -20,6 +20,7 @@ package org.apache.maven.api.services; import java.nio.file.Path; import java.util.Map; + import org.apache.maven.api.Artifact; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java index e48f2b55ed..119a3030e3 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java @@ -21,6 +21,7 @@ package org.apache.maven.api.services; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; + import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorRequest.java index 46c7ea3729..62f87b7a54 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorRequest.java @@ -18,13 +18,12 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Optional; + import org.apache.maven.api.Artifact; import org.apache.maven.api.DependencyCoordinate; import org.apache.maven.api.Project; @@ -35,6 +34,8 @@ import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; import org.apache.maven.api.annotations.Nullable; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * A request to collect the transitive dependencies and to build a dependency graph from them. There are three ways to * create a dependency graph. First, only the root dependency can be given. Second, a root dependency and direct diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorResult.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorResult.java index 9f01ca7af5..3e5f98094f 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorResult.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCollectorResult.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.util.List; + import org.apache.maven.api.Node; import org.apache.maven.api.annotations.Experimental; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinateFactoryRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinateFactoryRequest.java index 583aa70d96..9c907e93a0 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinateFactoryRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinateFactoryRequest.java @@ -18,11 +18,10 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; + import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Dependency; import org.apache.maven.api.Exclusion; @@ -32,6 +31,8 @@ import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * * @since 4.0 diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/LocalRepositoryManager.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/LocalRepositoryManager.java index ffc798b37e..02da9ecaca 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/LocalRepositoryManager.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/LocalRepositoryManager.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.nio.file.Path; + import org.apache.maven.api.Artifact; import org.apache.maven.api.LocalRepository; import org.apache.maven.api.RemoteRepository; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Lookup.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Lookup.java index 3dc7e8a0b3..07a0d4bca6 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Lookup.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Lookup.java @@ -20,6 +20,7 @@ package org.apache.maven.api.services; import java.util.List; import java.util.Map; + import org.apache.maven.api.Service; public interface Lookup extends Service { diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilder.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilder.java index cfe7bed416..b7bea08d3f 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilder.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilder.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.nio.file.Path; + import org.apache.maven.api.Artifact; import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Service; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java index 20b6969e59..f551f13796 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java @@ -18,10 +18,9 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.nio.file.Path; import java.util.Optional; + import org.apache.maven.api.Artifact; import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Session; @@ -31,6 +30,8 @@ import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; import org.apache.maven.api.annotations.Nullable; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * Request used to build a {@link org.apache.maven.api.Project} using * the {@link ProjectBuilder} service. diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderResult.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderResult.java index 4826fe46ff..b243d0620c 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderResult.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderResult.java @@ -21,6 +21,7 @@ package org.apache.maven.api.services; import java.nio.file.Path; import java.util.Collection; import java.util.Optional; + import org.apache.maven.api.Project; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectManager.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectManager.java index e19d9f0d88..413db59d0d 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectManager.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectManager.java @@ -22,6 +22,7 @@ import java.nio.file.Path; import java.util.Collection; import java.util.List; import java.util.Optional; + import org.apache.maven.api.Artifact; import org.apache.maven.api.Node; import org.apache.maven.api.Project; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Prompter.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Prompter.java index 7e0d5c67f1..53f02b4150 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Prompter.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Prompter.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.util.List; + import org.apache.maven.api.Service; import org.apache.maven.api.annotations.Experimental; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryFactory.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryFactory.java index e140b7edff..21019146d7 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryFactory.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryFactory.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.nio.file.Path; + import org.apache.maven.api.LocalRepository; import org.apache.maven.api.RemoteRepository; import org.apache.maven.api.Service; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilder.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilder.java index dc3e25968c..86568510a7 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilder.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilder.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.nio.file.Path; + import org.apache.maven.api.Service; import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java index b2c8bad7f7..95923fab92 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java @@ -18,10 +18,9 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.nio.file.Path; import java.util.Optional; + import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; @@ -29,6 +28,8 @@ import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; import org.apache.maven.api.annotations.Nullable; +import static org.apache.maven.api.services.BaseRequest.nonNull; + /** * Collects settings that control the building of effective settings. */ diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderResult.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderResult.java index 2b91d6299f..201501ea50 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderResult.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderResult.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.util.List; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.settings.Settings; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java index 631e8c7d71..1f83f7665a 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java @@ -20,6 +20,7 @@ package org.apache.maven.api.services; import java.io.IOException; import java.io.InputStream; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainManager.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainManager.java index d430a6a096..f79bea8b20 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainManager.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainManager.java @@ -21,6 +21,7 @@ package org.apache.maven.api.services; import java.util.List; import java.util.Map; import java.util.Optional; + import org.apache.maven.api.Service; import org.apache.maven.api.Session; import org.apache.maven.api.Toolchain; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderRequest.java index 963b94e8c3..7999fe157b 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderRequest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.api.services; -import static org.apache.maven.api.services.BaseRequest.nonNull; - import java.nio.file.Path; import java.util.Optional; + import org.apache.maven.api.Session; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.annotations.NotThreadSafe; import org.apache.maven.api.annotations.Nullable; +import static org.apache.maven.api.services.BaseRequest.nonNull; + public interface ToolchainsBuilderRequest { @Nonnull Session getSession(); diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderResult.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderResult.java index 4645421241..30ac872af3 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderResult.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderResult.java @@ -19,6 +19,7 @@ package org.apache.maven.api.services; import java.util.List; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.toolchain.PersistedToolchains; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Transport.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Transport.java index 3db9d8592f..2448ceeb65 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Transport.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Transport.java @@ -24,6 +24,7 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.util.Optional; + import org.apache.maven.api.RemoteRepository; import org.apache.maven.api.annotations.Consumer; import org.apache.maven.api.annotations.Experimental; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlFactory.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlFactory.java index 8ebc3ae5d1..1e2708e4be 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlFactory.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlFactory.java @@ -25,6 +25,7 @@ import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import java.nio.file.Path; + import org.apache.maven.api.Service; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java index e9df19e0ad..e2863518b3 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java @@ -22,6 +22,7 @@ import java.io.InputStream; import java.io.Reader; import java.net.URL; import java.nio.file.Path; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlWriterRequest.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlWriterRequest.java index 4cf92ffcd3..9df83c9a33 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlWriterRequest.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlWriterRequest.java @@ -21,6 +21,7 @@ package org.apache.maven.api.services.xml; import java.io.OutputStream; import java.io.Writer; import java.nio.file.Path; + import org.apache.maven.api.annotations.Experimental; /** diff --git a/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/Dom.java b/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/Dom.java index f72d05591f..7a3822415b 100644 --- a/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/Dom.java +++ b/api/maven-api-xml/src/main/java/org/apache/maven/api/xml/Dom.java @@ -20,6 +20,7 @@ package org.apache.maven.api.xml; import java.util.List; import java.util.Map; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Immutable; import org.apache.maven.api.annotations.Nonnull; diff --git a/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/Helper.java b/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/Helper.java index 70e0dd886b..39e04e59b9 100644 --- a/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/Helper.java +++ b/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/Helper.java @@ -21,6 +21,7 @@ package org.codehaus.modello.plugin.velocity; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import org.codehaus.modello.ModelloRuntimeException; import org.codehaus.modello.model.ModelAssociation; import org.codehaus.modello.model.ModelClass; diff --git a/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/ModelloVelocityMojo.java b/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/ModelloVelocityMojo.java index 74739795d7..2298252fe3 100644 --- a/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/ModelloVelocityMojo.java +++ b/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/ModelloVelocityMojo.java @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Objects; import java.util.Properties; import java.util.stream.Collectors; + import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; diff --git a/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java b/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java index 40323e87ed..132a77a3ba 100644 --- a/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java +++ b/api/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java @@ -27,6 +27,7 @@ import java.nio.file.Paths; import java.util.Map; import java.util.Objects; import java.util.Properties; + import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.runtime.RuntimeInstance; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java index e85b7fa005..5d5463615b 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java @@ -22,6 +22,7 @@ import java.io.File; import java.util.Collection; import java.util.List; import java.util.regex.Pattern; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java b/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java index 555375a921..2b44cf3f74 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java @@ -24,6 +24,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; + import org.apache.commons.lang3.Validate; import org.apache.maven.artifact.versioning.VersionRange; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java index e7bf52b6e2..dbf93e9fc7 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java @@ -24,6 +24,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java index 0c0a02d4ac..cce830667a 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepository.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.repository; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java index baca0e1543..ae45a428de 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.resolver; import java.util.Iterator; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java index 8e4632e178..9fa973218f 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.resolver; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java index c6fa723607..c3389fa49e 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.resolver; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java index 1186af807c..96d8c50362 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.resolver; import java.util.ArrayList; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java index d4d6aebc39..10da535c15 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java @@ -18,10 +18,10 @@ */ package org.apache.maven.artifact.versioning; -import static org.apache.commons.lang3.math.NumberUtils.isDigits; - import java.util.StringTokenizer; +import static org.apache.commons.lang3.math.NumberUtils.isDigits; + /** * Default implementation of artifact versioning. * diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/OverConstrainedVersionException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/OverConstrainedVersionException.java index 52afaad0ce..9b15eb3827 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/OverConstrainedVersionException.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/OverConstrainedVersionException.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.versioning; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolutionException; diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java index 20c06f3deb..449aaf1d62 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.WeakHashMap; + import org.apache.maven.artifact.Artifact; /** diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactUtilsTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactUtilsTest.java index 98ccb948e8..63c48a0765 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactUtilsTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactUtilsTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.artifact; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.maven.artifact.versioning.VersionRange; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import org.apache.maven.artifact.versioning.VersionRange; -import org.junit.jupiter.api.Test; - /** * Tests {@link ArtifactUtils}. * diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/DefaultArtifactTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/DefaultArtifactTest.java index 1c068d4042..e6c9c6f245 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/DefaultArtifactTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/DefaultArtifactTest.java @@ -18,15 +18,15 @@ */ package org.apache.maven.artifact; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import org.apache.maven.artifact.handler.ArtifactHandlerMock; import org.apache.maven.artifact.versioning.VersionRange; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class DefaultArtifactTest { private DefaultArtifact artifact; diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionIT.java b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionIT.java index dd31f5bee7..eaa403b834 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionIT.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionIT.java @@ -18,8 +18,6 @@ */ package org.apache.maven.artifact.versioning; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.IOException; import java.io.InterruptedIOException; import java.nio.file.FileVisitResult; @@ -29,8 +27,11 @@ import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; import java.util.regex.Pattern; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class ComparableVersionIT { @Test diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java index da15aa8227..5695a2b9ae 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java @@ -18,12 +18,13 @@ */ package org.apache.maven.artifact.versioning; +import java.util.Locale; + +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.util.Locale; -import org.junit.jupiter.api.Test; - /** * Test ComparableVersion. * diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java index b1de43b33b..8f8e222ca0 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.artifact.versioning; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Test DefaultArtifactVersion. * diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java index 6a11998cc7..b4aa8d603b 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java @@ -18,6 +18,11 @@ */ package org.apache.maven.artifact.versioning; +import java.util.List; + +import org.apache.maven.artifact.Artifact; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; @@ -25,10 +30,6 @@ import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.util.List; -import org.apache.maven.artifact.Artifact; -import org.junit.jupiter.api.Test; - /** * Tests version range construction. * diff --git a/maven-bom/pom.xml b/maven-bom/pom.xml index 60c602dbc2..f3435eca09 100644 --- a/maven-bom/pom.xml +++ b/maven-bom/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.maven maven-parent 39 - + maven-bom diff --git a/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemCollectorTest.java b/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemCollectorTest.java index 632ab6a317..9ff152c020 100644 --- a/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemCollectorTest.java +++ b/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemCollectorTest.java @@ -18,13 +18,13 @@ */ package org.apache.maven.building; +import org.apache.maven.building.Problem.Severity; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -import org.apache.maven.building.Problem.Severity; -import org.junit.jupiter.api.Test; - public class DefaultProblemCollectorTest { @Test diff --git a/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemTest.java b/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemTest.java index 857c222eb4..4bbe56b891 100644 --- a/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemTest.java +++ b/maven-builder-support/src/test/java/org/apache/maven/building/DefaultProblemTest.java @@ -18,13 +18,13 @@ */ package org.apache.maven.building; +import org.apache.maven.building.Problem.Severity; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertSame; -import org.apache.maven.building.Problem.Severity; -import org.junit.jupiter.api.Test; - public class DefaultProblemTest { @Test diff --git a/maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java b/maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java index 320a2cd867..1b10a24af8 100644 --- a/maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java +++ b/maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.building; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - import java.io.File; import java.io.InputStream; import java.util.Scanner; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + public class FileSourceTest { @Test diff --git a/maven-builder-support/src/test/java/org/apache/maven/building/ProblemCollectorFactoryTest.java b/maven-builder-support/src/test/java/org/apache/maven/building/ProblemCollectorFactoryTest.java index 6bab9e6c6f..cefd06c124 100644 --- a/maven-builder-support/src/test/java/org/apache/maven/building/ProblemCollectorFactoryTest.java +++ b/maven-builder-support/src/test/java/org/apache/maven/building/ProblemCollectorFactoryTest.java @@ -18,12 +18,13 @@ */ package org.apache.maven.building; +import java.util.Collections; + +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotSame; -import java.util.Collections; -import org.junit.jupiter.api.Test; - public class ProblemCollectorFactoryTest { @Test diff --git a/maven-builder-support/src/test/java/org/apache/maven/building/StringSourceTest.java b/maven-builder-support/src/test/java/org/apache/maven/building/StringSourceTest.java index 2c47169779..cfb6e0cbe5 100644 --- a/maven-builder-support/src/test/java/org/apache/maven/building/StringSourceTest.java +++ b/maven-builder-support/src/test/java/org/apache/maven/building/StringSourceTest.java @@ -18,12 +18,13 @@ */ package org.apache.maven.building; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.InputStream; import java.util.Scanner; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class StringSourceTest { @Test public void testGetInputStream() throws Exception { diff --git a/maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java b/maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java index 7ba2a647e2..bb1455f987 100644 --- a/maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java +++ b/maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.building; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - import java.io.File; import java.io.InputStream; import java.net.URL; import java.util.Scanner; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + public class UrlSourceTest { @Test diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java index 739a742fec..7584339920 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.deployer; import java.io.File; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java index 2be72f8afe..e64df59334 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.deployer; import java.io.File; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java b/maven-compat/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java index 40e43a4338..d0d67b4a37 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.installer; import java.io.File; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java b/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java index 2fd26e5f2d..7101f71692 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.installer; import java.io.File; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java index cc3ad612f5..4a61ba7608 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.manager; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java index ef7aa85fc9..603501b90b 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/manager/WagonManager.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.manager; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.wagon.ResourceDoesNotExistException; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java index c0e19f4de2..bd748b9222 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.repository; import java.io.File; import java.util.Collections; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java index ddc789c224..f5ae8ea4fc 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.repository; import java.util.Arrays; import java.util.List; + import org.apache.maven.artifact.UnknownRepositoryLayoutException; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.plugin.LegacySupport; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java index dc7c115c4c..a1c482708a 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java @@ -27,6 +27,7 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java index ff8683410c..9a8eecab8c 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.repository.metadata; import java.util.Iterator; import java.util.List; + import org.apache.maven.artifact.repository.ArtifactRepository; /** diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java index 179273a207..fbe682a052 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.repository.metadata; import java.io.File; import java.util.Collections; import java.util.Map; + import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.DefaultArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java index 28d9438e0f..7ce05c5e1c 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.resolver; import java.util.List; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java index 259535943e..017d576df9 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.resolver; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java index 8e14e56d2f..1f0d843d10 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.resolver; import java.util.HashSet; import java.util.Objects; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.versioning.VersionRange; import org.codehaus.plexus.logging.Logger; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java index 5e7a32989d..952382a23b 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java @@ -35,6 +35,7 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Matcher; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java index 9af55207b0..8a3314f753 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.resolver; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilter.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilter.java index 8529c1a8ed..52d056dc80 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilter.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilter.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.resolver.filter; import java.util.Collection; import java.util.LinkedHashSet; import java.util.Set; + import org.apache.maven.artifact.Artifact; /** diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java index 62738d50cc..9e6b78eebd 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.versioning; import java.util.HashMap; import java.util.Iterator; import java.util.Map; + import org.apache.maven.artifact.Artifact; /** diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java index 0ad8165c1c..87c48f7da0 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; + import org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.interpolation.EnvarBasedValueSource; diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java index 59f40e4a4c..e22923e222 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java @@ -23,6 +23,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Properties; + import org.apache.maven.model.Activation; import org.apache.maven.model.Profile; import org.apache.maven.model.building.ModelProblem; diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java b/maven-compat/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java index 2765fa68e6..a6ad7b97a6 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java @@ -20,6 +20,7 @@ package org.apache.maven.profiles; import java.io.File; import java.io.IOException; + import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java b/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java index 33aa6717eb..3781be1c69 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java @@ -21,6 +21,7 @@ package org.apache.maven.profiles; import java.util.List; import java.util.Map; import java.util.Properties; + import org.apache.maven.model.Profile; import org.apache.maven.profiles.activation.ProfileActivationException; diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java b/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java index 27a90388f8..e0e77d2800 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java @@ -19,6 +19,7 @@ package org.apache.maven.profiles; import java.util.List; + import org.apache.maven.model.Activation; import org.apache.maven.model.ActivationFile; import org.apache.maven.model.ActivationProperty; diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java index eaa0ac3b06..ad5394a4ef 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java @@ -19,6 +19,7 @@ package org.apache.maven.profiles.activation; import java.io.IOException; + import org.apache.maven.model.Activation; import org.apache.maven.model.ActivationFile; import org.apache.maven.model.Profile; diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java index 356a3e4e18..b2365f70a6 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java @@ -19,6 +19,7 @@ package org.apache.maven.profiles.activation; import java.util.Properties; + import org.apache.maven.model.Activation; import org.apache.maven.model.ActivationProperty; import org.apache.maven.model.Profile; diff --git a/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index d59d8a4d1e..85a28e32dc 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java b/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java index b407bb4693..e19fdec547 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java +++ b/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java @@ -20,6 +20,7 @@ package org.apache.maven.project; import java.util.Date; import java.util.Properties; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.profiles.ProfileManager; diff --git a/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java b/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java index 9949071d4f..b3c86d3995 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java +++ b/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.io.File; + import org.apache.maven.project.validation.ModelValidationResult; /** diff --git a/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java b/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java index c23db02feb..c471a5c95b 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java +++ b/maven-compat/src/main/java/org/apache/maven/project/MavenProjectBuilder.java @@ -20,6 +20,7 @@ package org.apache.maven.project; import java.io.File; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; diff --git a/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java index 7fa4853681..baf054a48a 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java +++ b/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.util.List; + import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginContainer; diff --git a/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java b/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java index f8aefe7226..e4b98e1219 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java +++ b/maven-compat/src/main/java/org/apache/maven/project/ProjectBuilderConfiguration.java @@ -20,6 +20,7 @@ package org.apache.maven.project; import java.util.Date; import java.util.Properties; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.profiles.ProfileManager; diff --git a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java index 73d39604a7..15c2158856 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java +++ b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java @@ -21,6 +21,7 @@ package org.apache.maven.project; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java index 1247308768..7479f76c74 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java @@ -28,6 +28,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Properties; + import org.apache.maven.model.Model; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.apache.maven.model.io.xpp3.MavenXpp3Writer; diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java index e416743e62..f2af8036ae 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java @@ -20,6 +20,7 @@ package org.apache.maven.project.interpolation; import java.text.SimpleDateFormat; import java.util.Date; + import org.codehaus.plexus.interpolation.AbstractValueSource; /** diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java index 6349f4a039..41a459d833 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java @@ -20,6 +20,7 @@ package org.apache.maven.project.interpolation; import java.io.File; import java.util.Map; + import org.apache.maven.model.Model; import org.apache.maven.project.ProjectBuilderConfiguration; diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java index 0ab1738a83..c6651fbf7d 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java @@ -20,6 +20,7 @@ package org.apache.maven.project.interpolation; import java.io.File; import java.util.List; + import org.apache.maven.project.path.PathTranslator; import org.codehaus.plexus.interpolation.InterpolationPostProcessor; import org.codehaus.plexus.interpolation.util.ValueSourceUtils; diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java index bb8831be6e..5cb8c60749 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java @@ -20,6 +20,7 @@ package org.apache.maven.project.interpolation; import java.io.IOException; import java.util.Properties; + import org.apache.maven.project.path.PathTranslator; import org.codehaus.plexus.interpolation.Interpolator; import org.codehaus.plexus.interpolation.RegexBasedInterpolator; diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java index f3eec8e153..259208e45a 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java @@ -29,6 +29,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.WeakHashMap; + import org.apache.maven.model.Model; import org.apache.maven.project.ProjectBuilderConfiguration; import org.apache.maven.project.path.PathTranslator; diff --git a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java index 68e5880f4d..6c9083fb45 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java @@ -21,6 +21,7 @@ package org.apache.maven.project.path; import java.io.File; import java.util.ArrayList; import java.util.List; + import org.apache.maven.model.Build; import org.apache.maven.model.Model; import org.apache.maven.model.Reporting; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java b/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java index 697dd484b5..e03a0f5de7 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java @@ -21,6 +21,7 @@ package org.apache.maven.repository; import java.net.MalformedURLException; import java.net.URL; import java.util.List; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.settings.Mirror; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java index c44eafe2b9..6e7b4e7dba 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java @@ -21,6 +21,7 @@ package org.apache.maven.repository; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java index d22c0a24a4..1e8a20e757 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolutionException; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MirrorSelector.java b/maven-compat/src/main/java/org/apache/maven/repository/MirrorSelector.java index b5f0bb3db8..e7a8cecdf5 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/MirrorSelector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/MirrorSelector.java @@ -19,6 +19,7 @@ package org.apache.maven.repository; import java.util.List; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.settings.Mirror; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java index 3915ea1960..ffc2be9c57 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java @@ -19,6 +19,7 @@ package org.apache.maven.repository; import java.io.File; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java b/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java index ba11652838..9cb5c144a0 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java @@ -19,6 +19,7 @@ package org.apache.maven.repository; import java.io.File; + import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; import org.apache.maven.model.Dependency; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java index e538c934e5..6e2633cc10 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java @@ -27,6 +27,7 @@ import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.util.Date; import java.util.Properties; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java index 1fc946b99f..3ffc399ed2 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java index 85bc5b3558..695cff5679 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.InvalidRepositoryException; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java index af2439146a..f03f13d4bb 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java @@ -20,6 +20,7 @@ package org.apache.maven.repository.legacy; import java.util.IdentityHashMap; import java.util.Map; + import org.apache.maven.repository.ArtifactTransferEvent; import org.apache.maven.repository.ArtifactTransferListener; import org.apache.maven.repository.ArtifactTransferResource; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java index a22f03b87c..a84448d9a0 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy; import java.io.File; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java index 1652305528..8dd0f6c282 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java @@ -20,6 +20,7 @@ package org.apache.maven.repository.legacy; import java.io.File; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java index 0570859208..3c3de65877 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.repository; import java.util.Map; + import org.apache.maven.artifact.UnknownRepositoryLayoutException; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java index 2bfbac0ac0..e03a0e5d1a 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java @@ -26,6 +26,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.metadata.ResolutionGroup; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java index 6ce350d548..6df6a9a9b4 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.legacy.resolver; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/AbstractVersionTransformation.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/AbstractVersionTransformation.java index 1ef8a51a94..5d37d4d3e0 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/AbstractVersionTransformation.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/AbstractVersionTransformation.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.resolver.transform; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.DefaultRepositoryRequest; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java index 39739f1c2a..5435318155 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformation.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.resolver.transform; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; import org.apache.maven.artifact.installer.ArtifactInstallationException; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java index 029497f069..0ef1c95ad3 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.resolver.transform; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; import org.apache.maven.artifact.installer.ArtifactInstallationException; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/DefaultArtifactTransformationManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/DefaultArtifactTransformationManager.java index d61b006b8e..ca53d0672b 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/DefaultArtifactTransformationManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/DefaultArtifactTransformationManager.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.resolver.transform; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; import org.apache.maven.artifact.installer.ArtifactInstallationException; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java index f5516e6dcb..b06add804c 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java @@ -23,6 +23,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java index 8742973fad..972a0497fd 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.metadata; import java.util.Collection; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactScopeEnum; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ClasspathContainer.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ClasspathContainer.java index 6091e1a9f0..e700f7f4fb 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ClasspathContainer.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ClasspathContainer.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.metadata; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import org.apache.maven.artifact.ArtifactScopeEnum; /** diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultClasspathTransformation.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultClasspathTransformation.java index 87e0b1da5b..b7c3425fb9 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultClasspathTransformation.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultClasspathTransformation.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.metadata; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.apache.maven.artifact.ArtifactScopeEnum; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolver.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolver.java index 429635ca1a..3bb1bd00b9 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolver.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.metadata; import java.util.ArrayList; import java.util.List; import java.util.TreeSet; + import org.apache.maven.artifact.ArtifactScopeEnum; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java index 0bb441de7f..0b6227cb2c 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeSet; + import org.apache.maven.artifact.ArtifactScopeEnum; /** diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java index 9223992947..16f36e7162 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.metadata; import java.util.Collection; + import org.apache.maven.artifact.repository.ArtifactRepository; /** diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequest.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequest.java index 163dce602d..0345228b87 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequest.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequest.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.metadata; import java.util.List; + import org.apache.maven.artifact.repository.ArtifactRepository; /** @author Oleg Gusakov */ diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataSource.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataSource.java index 69f14d970d..34e238cbf5 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataSource.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataSource.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.metadata; import java.util.List; + import org.apache.maven.artifact.repository.ArtifactRepository; /** diff --git a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java index 00e104c805..810446186e 100644 --- a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java +++ b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java @@ -29,6 +29,7 @@ import java.net.URLClassLoader; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.usability.plugin.io.xpp3.ParamdocXpp3Reader; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java index 9607560b2c..7aaba74812 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java @@ -18,9 +18,8 @@ */ package org.apache.maven.artifact; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; +import javax.inject.Named; import java.io.File; import java.io.FileOutputStream; @@ -31,8 +30,7 @@ import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; -import javax.inject.Named; + import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; @@ -68,6 +66,10 @@ import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser; import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy; import org.junit.jupiter.api.BeforeEach; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Jason van Zyl */ diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java index a9fa595cee..1d8278f44d 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java @@ -18,13 +18,10 @@ */ package org.apache.maven.artifact.deployer; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.mock; +import javax.inject.Inject; import java.io.File; -import javax.inject.Inject; + import org.apache.maven.artifact.AbstractArtifactComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; @@ -33,6 +30,11 @@ import org.apache.maven.session.scope.internal.SessionScope; import org.codehaus.plexus.util.FileUtils; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; + /** * @author Jason van Zyl */ diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/deployer/SimpleArtifactMetadataSource.java b/maven-compat/src/test/java/org/apache/maven/artifact/deployer/SimpleArtifactMetadataSource.java index c658eb4246..9b39ed06d3 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/deployer/SimpleArtifactMetadataSource.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/deployer/SimpleArtifactMetadataSource.java @@ -18,10 +18,12 @@ */ package org.apache.maven.artifact.deployer; -import java.util.Collections; -import java.util.List; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Collections; +import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.versioning.ArtifactVersion; diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java index e0b841d851..216ea37807 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.artifact.factory; -import static org.junit.jupiter.api.Assertions.assertEquals; - import javax.inject.Inject; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.versioning.VersionRange; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + @PlexusTest public class DefaultArtifactFactoryTest { diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java index 124df752ef..2d1215176a 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java @@ -18,17 +18,19 @@ */ package org.apache.maven.artifact.installer; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.mockito.Mockito.mock; +import javax.inject.Inject; import java.io.File; -import javax.inject.Inject; + import org.apache.maven.artifact.AbstractArtifactComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; import org.apache.maven.session.scope.internal.SessionScope; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.mockito.Mockito.mock; + /** * @author Jason van Zyl */ diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/metadata/TestMetadataSource.java b/maven-compat/src/test/java/org/apache/maven/artifact/metadata/TestMetadataSource.java index feae22a6e4..516d0b9d7a 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/metadata/TestMetadataSource.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/metadata/TestMetadataSource.java @@ -18,12 +18,14 @@ */ package org.apache.maven.artifact.metadata; -import java.util.HashSet; -import java.util.List; -import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/repository/MavenArtifactRepositoryTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/repository/MavenArtifactRepositoryTest.java index fde9f90b1b..77cf7236e9 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/repository/MavenArtifactRepositoryTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/repository/MavenArtifactRepositoryTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.artifact.repository; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - public class MavenArtifactRepositoryTest { private static class MavenArtifactRepositorySubclass extends MavenArtifactRepository { String id; diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java index edf3410a9c..440e8c1a81 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java @@ -18,12 +18,13 @@ */ package org.apache.maven.artifact.resolver; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.Arrays; import java.util.List; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Test the artifact resolution exception message * diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java index 68c8c9955b..0bd8f7665d 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java @@ -18,9 +18,7 @@ */ package org.apache.maven.artifact.resolver; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.util.ArrayList; import java.util.Collections; @@ -29,7 +27,7 @@ import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; -import javax.inject.Inject; + import org.apache.maven.artifact.AbstractArtifactComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; @@ -40,6 +38,10 @@ import org.apache.maven.repository.legacy.metadata.MetadataResolutionRequest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + // It would be cool if there was a hook that I could use to set up a test environment. // I want to set up a local/remote repositories for testing but I don't want to have // to change them when I change the layout of the repositories. So I want to generate diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java index 8eb2f2164b..4ff3d02d1b 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactResolverTest.java @@ -18,16 +18,18 @@ */ package org.apache.maven.artifact.resolver; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.util.Collections; -import javax.inject.Inject; + import org.apache.maven.artifact.AbstractArtifactComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.resolver.DefaultArtifactResolver.DaemonThreadCreator; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class DefaultArtifactResolverTest extends AbstractArtifactComponentTestCase { @Inject private ArtifactResolver artifactResolver; diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestFileWagon.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestFileWagon.java index 36c169cfd8..5bc9eee9fa 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestFileWagon.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestFileWagon.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.resolver; import java.io.File; import java.io.InputStream; + import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.TransferFailedException; import org.apache.maven.wagon.authorization.AuthorizationException; diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestTransferListener.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestTransferListener.java index 2201ecbe8d..2709cc53b4 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestTransferListener.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/TestTransferListener.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.resolver; import java.util.ArrayList; import java.util.List; + import org.apache.maven.wagon.observers.AbstractTransferListener; public class TestTransferListener extends AbstractTransferListener { diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilterTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilterTest.java index 862b11f0f3..f6738d701f 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilterTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilterTest.java @@ -18,13 +18,14 @@ */ package org.apache.maven.artifact.resolver.filter; +import java.util.Arrays; + +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - /** * Tests {@link AndArtifactFilter}. * diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/FilterHashEqualsTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/FilterHashEqualsTest.java index bcf61ec275..704e6e9771 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/FilterHashEqualsTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/FilterHashEqualsTest.java @@ -18,12 +18,13 @@ */ package org.apache.maven.artifact.resolver.filter; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.util.Arrays; import java.util.List; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Igor Fedorenko */ diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilterTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilterTest.java index de4cdaf4d9..87c15eced3 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilterTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilterTest.java @@ -18,13 +18,14 @@ */ package org.apache.maven.artifact.resolver.filter; +import java.util.Arrays; + +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - /** * Tests {@link OrArtifactFilter}. * diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilterTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilterTest.java index 72fecbc418..08ff3157c7 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilterTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilterTest.java @@ -18,13 +18,13 @@ */ package org.apache.maven.artifact.resolver.filter; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Tests {@link ScopeArtifactFilter}. * diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java b/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java index 7907a1a8a7..c44eb74106 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java @@ -18,17 +18,18 @@ */ package org.apache.maven.artifact.testutils; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import org.codehaus.plexus.util.FileUtils; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class TestFileManager { public static final String TEMP_DIR_PATH = System.getProperty("java.io.tmpdir"); diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java index 888572972c..f93e584d47 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java @@ -18,11 +18,10 @@ */ package org.apache.maven.artifact.transform; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.repository.legacy.resolver.transform.ArtifactTransformation; import org.apache.maven.repository.legacy.resolver.transform.ArtifactTransformationManager; import org.apache.maven.repository.legacy.resolver.transform.LatestArtifactTransformation; @@ -31,6 +30,9 @@ import org.apache.maven.repository.legacy.resolver.transform.SnapshotTransformat import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** @author Jason van Zyl */ @PlexusTest public class TransformationManagerTest { diff --git a/maven-compat/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java b/maven-compat/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java index cc619413fe..e50b0d7baa 100644 --- a/maven-compat/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java +++ b/maven-compat/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java @@ -18,12 +18,11 @@ */ package org.apache.maven.profiles.manager; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; +import javax.inject.Inject; import java.util.List; import java.util.Properties; -import javax.inject.Inject; + import org.apache.maven.model.Activation; import org.apache.maven.model.ActivationProperty; import org.apache.maven.model.Profile; @@ -34,6 +33,9 @@ import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + @PlexusTest public class DefaultProfileManagerTest { diff --git a/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java b/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java index 5f524489ee..183d7c6450 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java +++ b/maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java @@ -18,7 +18,7 @@ */ package org.apache.maven.project; -import static org.junit.jupiter.api.Assertions.fail; +import javax.inject.Inject; import java.io.File; import java.io.FileNotFoundException; @@ -26,7 +26,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.Arrays; -import javax.inject.Inject; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.model.building.ModelBuildingException; @@ -38,6 +38,8 @@ import org.codehaus.plexus.testing.PlexusTest; import org.eclipse.aether.DefaultRepositorySystemSession; import org.junit.jupiter.api.BeforeEach; +import static org.junit.jupiter.api.Assertions.fail; + /** * @author Jason van Zyl */ diff --git a/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java b/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java index cb98d394de..f22e33df3f 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java +++ b/maven-compat/src/test/java/org/apache/maven/project/ClasspathArtifactResolver.java @@ -18,13 +18,15 @@ */ package org.apache.maven.project; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; -import javax.inject.Named; -import javax.inject.Singleton; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.impl.ArtifactResolver; diff --git a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java index 6a8e6c5060..470e3e023c 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java +++ b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.DefaultLifecycles; import org.apache.maven.lifecycle.LifecycleExecutor; diff --git a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java index 88686024c3..cc99726b04 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java +++ b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java @@ -21,6 +21,7 @@ package org.apache.maven.project; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; + import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginExecution; diff --git a/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java b/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java index e105e2cbd5..8d6b22402d 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java +++ b/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.io.File; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.metadata.Metadata; diff --git a/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java b/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java index 2e42f584e3..d85bae13f6 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTest.java @@ -18,12 +18,9 @@ */ package org.apache.maven.project; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - import java.io.File; import java.lang.reflect.Field; + import org.apache.maven.artifact.Artifact; import org.apache.maven.repository.internal.DefaultArtifactDescriptorReader; import org.eclipse.aether.impl.ArtifactDescriptorReader; @@ -31,6 +28,10 @@ import org.eclipse.aether.impl.ArtifactResolver; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + public class ProjectClasspathTest extends AbstractMavenProjectTestCase { static final String dir = "projects/scope/"; diff --git a/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java b/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java index 52465152de..cd30606802 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java +++ b/maven-compat/src/test/java/org/apache/maven/project/TestArtifactResolver.java @@ -21,6 +21,7 @@ package org.apache.maven.project; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.resolver.DefaultArtifactResolver; diff --git a/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java b/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java index 1b423c2525..c79ee86929 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java +++ b/maven-compat/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java @@ -21,6 +21,7 @@ package org.apache.maven.project; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.repository.legacy.LegacyRepositorySystem; diff --git a/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java b/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java index 2cabebe66a..6a3f155091 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java +++ b/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java @@ -18,11 +18,13 @@ */ package org.apache.maven.project; -import java.io.File; -import java.util.Collections; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; +import java.util.Collections; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.bridge.MavenRepositorySystem; import org.apache.maven.model.building.ModelBuilder; diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java index 9b843e9df5..567dc64a78 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java @@ -18,11 +18,12 @@ */ package org.apache.maven.project.inheritance; -import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; - import java.io.File; + import org.apache.maven.project.AbstractMavenProjectTestCase; +import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; + /** * @author Jason van Zyl */ diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java index eb0dd8a676..45830f0c88 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.project.inheritance.t00; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * A test which demonstrates maven's recursive inheritance where * a distinct value is taken from each parent contributing to diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t01/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t01/ProjectInheritanceTest.java index e339609f20..4aa25efc30 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t01/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t01/ProjectInheritanceTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.project.inheritance.t01; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * A test which demonstrates maven's recursive inheritance where * we are testing to make sure that elements stated in a model are diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java index cec5d8eafa..850efcd662 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java @@ -18,14 +18,11 @@ */ package org.apache.maven.project.inheritance.t02; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.model.Build; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginExecution; @@ -33,6 +30,10 @@ import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * A test which demonstrates maven's recursive inheritance where * a distinct value is taken from each parent contributing to diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t03/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t03/ProjectInheritanceTest.java index 4485561a7c..90e62e53ae 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t03/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t03/ProjectInheritanceTest.java @@ -18,13 +18,14 @@ */ package org.apache.maven.project.inheritance.t03; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.File; + import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * A test which demonstrates maven's recursive inheritance where * a distinct value is taken from each parent contributing to diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java index 1cb8c505c2..0bb7cec02e 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.project.inheritance.t04; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Verifies the version of a dependency listed in a parent's * dependencyManagement section is chosen over another version of the same diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java index 14c8f2cfcc..d8df6f97e9 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.project.inheritance.t05; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * A test which demonstrates maven's dependency management * diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java index 149c3a7d75..97ebf2892a 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java @@ -18,18 +18,19 @@ */ package org.apache.maven.project.inheritance.t06; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.util.Iterator; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * A test which demonstrates maven's dependency management * diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java index 732e4f9659..49a90dd181 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java @@ -18,18 +18,19 @@ */ package org.apache.maven.project.inheritance.t07; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * A test which demonstrates maven's dependency management * diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java index 830889fc5a..eb993e12ac 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java @@ -18,18 +18,19 @@ */ package org.apache.maven.project.inheritance.t08; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.util.Iterator; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * A test which demonstrates maven's dependency management * diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java index ac59e99a1e..8de5dedc57 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.project.inheritance.t09; +import java.io.File; +import java.util.Map; + +import org.apache.maven.project.MavenProject; +import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.io.File; -import java.util.Map; -import org.apache.maven.project.MavenProject; -import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; -import org.junit.jupiter.api.Test; - /** * Verifies exclusions listed in dependencyManagement are valid for * transitive dependencies. diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java index a750730e5d..5298cd590b 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.project.inheritance.t10; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.util.Map; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Verifies scope inheritance of direct and transitive dependencies. * diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t11/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t11/ProjectInheritanceTest.java index f595ab880b..0b1b0eea8d 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t11/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t11/ProjectInheritanceTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.project.inheritance.t11; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; - import java.io.File; + import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + /** * Verifies scope of root project is preserved regardless of parent dependency management. * diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12/ProjectInheritanceTest.java index 9fc1dc21eb..1629df2011 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12/ProjectInheritanceTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.project.inheritance.t12; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - import java.io.File; import java.util.Map; + import org.apache.maven.model.Plugin; import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + /** * Verifies that plugin execution sections in the parent POM that have * inherit == false are not inherited to the child POM. diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12scm/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12scm/ProjectInheritanceTest.java index 889778bc8a..9c5c84aaa1 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12scm/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t12scm/ProjectInheritanceTest.java @@ -18,13 +18,14 @@ */ package org.apache.maven.project.inheritance.t12scm; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.File; + import org.apache.maven.project.MavenProject; import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Verifies SCM inheritance uses modules statement from parent. * diff --git a/maven-compat/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java b/maven-compat/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java index 1224a90be3..4f95c428a9 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java @@ -18,11 +18,12 @@ */ package org.apache.maven.project.path; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.File; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + @SuppressWarnings("deprecation") public class DefaultPathTranslatorTest { diff --git a/maven-compat/src/test/java/org/apache/maven/repository/DefaultMirrorSelectorTest.java b/maven-compat/src/test/java/org/apache/maven/repository/DefaultMirrorSelectorTest.java index 6b70b8cc2c..ff76421491 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/DefaultMirrorSelectorTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/DefaultMirrorSelectorTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.repository; -import static org.junit.jupiter.api.Assertions.assertFalse; - import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.DefaultArtifactRepository; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertFalse; + public class DefaultMirrorSelectorTest { @Test public void testMirrorWithMirrorOfPatternContainingANegationIsNotSelected() { diff --git a/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java b/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java index 0cf0ba8b21..4c4e82bb23 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java @@ -18,15 +18,12 @@ */ package org.apache.maven.repository; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.io.File; import java.util.Arrays; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; @@ -47,6 +44,11 @@ import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory; import org.eclipse.aether.repository.LocalRepository; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Tests {@link LegacyRepositorySystem}. * diff --git a/maven-compat/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java b/maven-compat/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java index 6bb6ffff51..0535e8faad 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java @@ -18,14 +18,11 @@ */ package org.apache.maven.repository; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertSame; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.util.Arrays; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.repository.legacy.repository.ArtifactRepositoryFactory; @@ -33,6 +30,11 @@ import org.apache.maven.settings.Mirror; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + @PlexusTest public class MirrorProcessorTest { @Inject diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManagerTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManagerTest.java index c82bc13b5b..2fac20e5d8 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManagerTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManagerTest.java @@ -18,14 +18,10 @@ */ package org.apache.maven.repository.legacy; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.io.File; -import javax.inject.Inject; + import org.apache.maven.artifact.AbstractArtifactComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; @@ -37,6 +33,12 @@ import org.codehaus.plexus.logging.console.ConsoleLogger; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class DefaultUpdateCheckManagerTest extends AbstractArtifactComponentTestCase { @Inject diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java index 5e1e2a85e0..164b1739bf 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultWagonManagerTest.java @@ -18,19 +18,13 @@ */ package org.apache.maven.repository.legacy; -import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNotSame; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.factory.ArtifactFactory; @@ -54,6 +48,14 @@ import org.codehaus.plexus.util.FileUtils; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Michal Maczka */ diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java index b983db1f90..6a60d4eb2d 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java @@ -18,12 +18,11 @@ */ package org.apache.maven.repository.legacy; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; +import javax.inject.Inject; import java.io.File; import java.util.Arrays; -import javax.inject.Inject; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.Authentication; import org.apache.maven.repository.RepositorySystem; @@ -31,6 +30,9 @@ import org.apache.maven.settings.Server; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * Tests {@link LegacyRepositorySystem}. * diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/StringWagon.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/StringWagon.java index 7955bb7aed..6e32a115dc 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/StringWagon.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/StringWagon.java @@ -18,13 +18,15 @@ */ package org.apache.maven.repository.legacy; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.wagon.ConnectionException; import org.apache.maven.wagon.InputData; import org.apache.maven.wagon.OutputData; diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java index bd1f570ef1..07d9c7608f 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java @@ -18,10 +18,7 @@ */ package org.apache.maven.repository.legacy.resolver; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.util.ArrayList; import java.util.Arrays; @@ -32,7 +29,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException; @@ -56,6 +53,11 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Test the default artifact collector. * diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/AbstractConflictResolverTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/AbstractConflictResolverTest.java index 2982e99922..6b58c397d5 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/AbstractConflictResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/AbstractConflictResolverTest.java @@ -18,11 +18,10 @@ */ package org.apache.maven.repository.legacy.resolver.conflict; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; +import javax.inject.Inject; import java.util.Collections; -import javax.inject.Inject; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; @@ -33,6 +32,9 @@ import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.BeforeEach; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * Provides a basis for testing conflict resolvers. * diff --git a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java index f09ae69efc..9c480d8fb1 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultClasspathTransformationTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.repository.metadata; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import javax.inject.Inject; + import org.apache.maven.artifact.ArtifactScopeEnum; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * * @author Oleg Gusakov diff --git a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java index 6ab5acf51f..865669c4a0 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolutionPolicyTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.repository.metadata; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * * @author Oleg Gusakov diff --git a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java index 536b4bb552..a4f3577f95 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/metadata/DefaultGraphConflictResolverTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.repository.metadata; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import javax.inject.Inject; + import org.apache.maven.artifact.ArtifactScopeEnum; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * * @author Oleg Gusakov diff --git a/maven-compat/src/test/java/org/apache/maven/repository/metadata/TestMetadataSource.java b/maven-compat/src/test/java/org/apache/maven/repository/metadata/TestMetadataSource.java index d1d37f9bb8..0fc6db43c2 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/metadata/TestMetadataSource.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/metadata/TestMetadataSource.java @@ -18,12 +18,14 @@ */ package org.apache.maven.repository.metadata; -import java.util.HashSet; -import java.util.List; -import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-core/pom.xml b/maven-core/pom.xml index 7983e10742..e2dd97ca38 100644 --- a/maven-core/pom.xml +++ b/maven-core/pom.xml @@ -225,7 +225,7 @@ under the License. 1.1.0 - + diff --git a/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java b/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java index 8aa777486d..e2476cea55 100644 --- a/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java +++ b/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java @@ -19,6 +19,7 @@ package org.apache.maven; import java.util.Set; + import org.apache.maven.artifact.resolver.filter.ArtifactFilter; /** diff --git a/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java b/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java index e9b693968c..bf9ad700e5 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java @@ -18,12 +18,14 @@ */ package org.apache.maven; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter; import org.apache.maven.extension.internal.CoreExports; diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index 451f50dc50..c6658d2f39 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -18,7 +18,9 @@ */ package org.apache.maven; -import static java.util.stream.Collectors.toSet; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.util.ArrayList; @@ -34,9 +36,7 @@ import java.util.Map; import java.util.Set; import java.util.function.Function; import java.util.stream.Stream; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.Session; import org.apache.maven.api.model.Model; import org.apache.maven.api.model.Prerequisites; @@ -79,6 +79,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.helpers.MessageFormatter; +import static java.util.stream.Collectors.toSet; + /** * @author Jason van Zyl */ diff --git a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java index 3137e1da65..b2f705c743 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java @@ -18,15 +18,17 @@ */ package org.apache.maven; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; diff --git a/maven-core/src/main/java/org/apache/maven/MavenExecutionException.java b/maven-core/src/main/java/org/apache/maven/MavenExecutionException.java index 1288e4844e..4325659d7f 100644 --- a/maven-core/src/main/java/org/apache/maven/MavenExecutionException.java +++ b/maven-core/src/main/java/org/apache/maven/MavenExecutionException.java @@ -19,6 +19,7 @@ package org.apache.maven; import java.io.File; + import org.apache.maven.project.ProjectBuildingException; /** diff --git a/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java index b6a077de8c..e263c33a36 100644 --- a/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java @@ -20,6 +20,7 @@ package org.apache.maven; import java.util.Collection; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; diff --git a/maven-core/src/main/java/org/apache/maven/ReactorReader.java b/maven-core/src/main/java/org/apache/maven/ReactorReader.java index ad7dcef4c3..7e6551f403 100644 --- a/maven-core/src/main/java/org/apache/maven/ReactorReader.java +++ b/maven-core/src/main/java/org/apache/maven/ReactorReader.java @@ -18,9 +18,8 @@ */ package org.apache.maven; -import static java.util.function.Function.identity; -import static java.util.stream.Collectors.groupingBy; -import static java.util.stream.Collectors.toMap; +import javax.inject.Inject; +import javax.inject.Named; import java.io.File; import java.io.IOException; @@ -40,8 +39,7 @@ import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.inject.Inject; -import javax.inject.Named; + import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Model; @@ -53,6 +51,10 @@ import org.eclipse.aether.util.artifact.ArtifactIdUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static java.util.function.Function.identity; +import static java.util.stream.Collectors.groupingBy; +import static java.util.stream.Collectors.toMap; + /** * An implementation of a workspace reader that knows how to search the Maven reactor for artifacts, either as packaged * jar if it has been built, or only compile output directory if packaging hasn't happened yet. diff --git a/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java b/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java index 5957f39864..3754de834a 100644 --- a/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java +++ b/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java @@ -27,6 +27,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; diff --git a/maven-core/src/main/java/org/apache/maven/SessionScoped.java b/maven-core/src/main/java/org/apache/maven/SessionScoped.java index e19536bf02..a8d8722eeb 100644 --- a/maven-core/src/main/java/org/apache/maven/SessionScoped.java +++ b/maven-core/src/main/java/org/apache/maven/SessionScoped.java @@ -18,13 +18,14 @@ */ package org.apache.maven; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import com.google.inject.ScopeAnnotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; +import com.google.inject.ScopeAnnotation; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + /** * Indicates that annotated component should be instantiated before session execution starts * and discarded after session execution completes. diff --git a/maven-core/src/main/java/org/apache/maven/artifact/InvalidRepositoryException.java b/maven-core/src/main/java/org/apache/maven/artifact/InvalidRepositoryException.java index e2ae8e61aa..d2594b9534 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/InvalidRepositoryException.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/InvalidRepositoryException.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact; import java.net.MalformedURLException; + import org.codehaus.plexus.component.repository.exception.ComponentLookupException; /** diff --git a/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java b/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java index 5ee70e9eb5..2bc70332f2 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.factory; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.handler.ArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java index 2004f68a24..8c8002d78c 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.handler.manager; import java.util.Map; + import org.apache.maven.artifact.handler.ArtifactHandler; /** diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java index 2c7efadc5c..72f0598320 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java @@ -18,12 +18,14 @@ */ package org.apache.maven.artifact.handler.manager; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EarArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EarArtifactHandlerProvider.java index df56cae91c..49cd82af74 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EarArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EarArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbArtifactHandlerProvider.java index 6e558652cc..5508586d69 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbClientArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbClientArtifactHandlerProvider.java index 35702483c6..4126d5ffd6 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbClientArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/EjbClientArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JarArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JarArtifactHandlerProvider.java index f27dfcbca0..9e71af46ef 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JarArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JarArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavaSourceArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavaSourceArtifactHandlerProvider.java index 2a66975dc6..467be6da8a 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavaSourceArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavaSourceArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavadocArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavadocArtifactHandlerProvider.java index d0dd66e631..cdb3b08b67 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavadocArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/JavadocArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/MavenPluginArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/MavenPluginArtifactHandlerProvider.java index d8159b36fe..8eb28fad09 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/MavenPluginArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/MavenPluginArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/PomArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/PomArtifactHandlerProvider.java index 04ecf3fb5b..12d1107d5c 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/PomArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/PomArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/RarArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/RarArtifactHandlerProvider.java index d616227e1e..00ff11c366 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/RarArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/RarArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/TestJarArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/TestJarArtifactHandlerProvider.java index f9d2b7f930..160bc6783b 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/TestJarArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/TestJarArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/WarArtifactHandlerProvider.java b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/WarArtifactHandlerProvider.java index 22e878f4c5..853e3c8106 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/WarArtifactHandlerProvider.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/handler/providers/WarArtifactHandlerProvider.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java index 0bc65986cb..771e4962bd 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.metadata; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.versioning.ArtifactVersion; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java index 85a6df70be..25b5b657e4 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.metadata; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java index 0956291db2..6aa29e3779 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.repository; import java.util.ArrayList; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java index 710984ef39..cd76c79d78 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/LegacyLocalRepositoryManager.java @@ -22,6 +22,7 @@ import java.io.File; import java.util.Collections; import java.util.List; import java.util.Objects; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java index 28701f551f..dbd1f573fe 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java @@ -22,6 +22,7 @@ import java.io.File; import java.util.Collections; import java.util.List; import java.util.Objects; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/layout/DefaultRepositoryLayout.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/layout/DefaultRepositoryLayout.java index 8a4f9e29e8..b7da363ec2 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/layout/DefaultRepositoryLayout.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/layout/DefaultRepositoryLayout.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.repository.layout; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.metadata.ArtifactMetadata; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java index da14063858..b9502a7f4d 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.IOException; import java.io.Reader; import java.io.Writer; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java index d5ec0fad12..e49a52d412 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.repository.metadata; import java.util.List; + import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.RepositoryRequest; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/DefaultMetadataReader.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/DefaultMetadataReader.java index a70ddb716e..cf5b284657 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/DefaultMetadataReader.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/DefaultMetadataReader.java @@ -18,14 +18,16 @@ */ package org.apache.maven.artifact.repository.metadata.io; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader; import org.codehaus.plexus.util.ReaderFactory; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java index 8537a0a1a3..b7222463c3 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/io/MetadataReader.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; + import org.apache.maven.artifact.repository.metadata.Metadata; /** diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java index 27cfba2cf0..dc6b050300 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.RepositoryCache; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java index a7ff61e0f8..a4a616cd1b 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.versioning.OverConstrainedVersionException; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/DefaultResolutionErrorHandler.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/DefaultResolutionErrorHandler.java index d2632e3c39..d5f1af42ef 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/DefaultResolutionErrorHandler.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/DefaultResolutionErrorHandler.java @@ -18,11 +18,12 @@ */ package org.apache.maven.artifact.resolver; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collection; import java.util.List; -import javax.inject.Named; -import javax.inject.Singleton; /** * @author Benjamin Bentmann diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java index 5bb1aa2477..0ce3738f91 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java @@ -24,6 +24,7 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java index c100358dbd..3e1c29bd02 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java @@ -23,6 +23,7 @@ import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; + import org.apache.maven.artifact.Artifact; /** diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExcludesArtifactFilter.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExcludesArtifactFilter.java index a26e837594..18a107ff6e 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExcludesArtifactFilter.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExcludesArtifactFilter.java @@ -19,6 +19,7 @@ package org.apache.maven.artifact.resolver.filter; import java.util.List; + import org.apache.maven.artifact.Artifact; /** diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilter.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilter.java index 6f981ccf4e..c2d3ae1599 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilter.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilter.java @@ -20,6 +20,7 @@ package org.apache.maven.artifact.resolver.filter; import java.util.List; import java.util.function.Predicate; + import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Exclusion; diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java index 409d1aa3c9..efc51b90aa 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java @@ -21,6 +21,7 @@ package org.apache.maven.artifact.resolver.filter; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; + import org.apache.maven.artifact.Artifact; /** diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java index 978d2113c2..3deb5e4238 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java @@ -23,6 +23,7 @@ import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; + import org.apache.maven.artifact.Artifact; /** diff --git a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java index 1e326752f8..7651d4c70d 100644 --- a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java +++ b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java @@ -18,6 +18,10 @@ */ package org.apache.maven.bridge; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.net.MalformedURLException; import java.net.URL; @@ -29,9 +33,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java b/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java index e4340f5684..06c8140ecd 100644 --- a/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java +++ b/maven-core/src/main/java/org/apache/maven/classrealm/ArtifactClassRealmConstituent.java @@ -19,6 +19,7 @@ package org.apache.maven.classrealm; import java.io.File; + import org.eclipse.aether.artifact.Artifact; /** diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java index 627ed8a060..0bb038427b 100644 --- a/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java +++ b/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java @@ -20,6 +20,7 @@ package org.apache.maven.classrealm; import java.util.List; import java.util.Map; + import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; import org.codehaus.plexus.classworlds.realm.ClassRealm; diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java index 6eb24613ff..0b64e6213c 100644 --- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java +++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java @@ -18,6 +18,10 @@ */ package org.apache.maven.classrealm; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.net.MalformedURLException; import java.util.ArrayList; @@ -29,9 +33,7 @@ import java.util.Objects; import java.util.Random; import java.util.Set; import java.util.TreeMap; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.classrealm.ClassRealmRequest.RealmType; import org.apache.maven.extension.internal.CoreExports; diff --git a/maven-core/src/main/java/org/apache/maven/configuration/internal/DefaultBeanConfigurator.java b/maven-core/src/main/java/org/apache/maven/configuration/internal/DefaultBeanConfigurator.java index 14c08a2bd8..7053409804 100644 --- a/maven-core/src/main/java/org/apache/maven/configuration/internal/DefaultBeanConfigurator.java +++ b/maven-core/src/main/java/org/apache/maven/configuration/internal/DefaultBeanConfigurator.java @@ -18,12 +18,14 @@ */ package org.apache.maven.configuration.internal; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.configuration.BeanConfigurationException; import org.apache.maven.configuration.BeanConfigurationPathTranslator; import org.apache.maven.configuration.BeanConfigurationRequest; diff --git a/maven-core/src/main/java/org/apache/maven/configuration/internal/EnhancedComponentConfigurator.java b/maven-core/src/main/java/org/apache/maven/configuration/internal/EnhancedComponentConfigurator.java index ba30ded3df..f41a1d64d5 100644 --- a/maven-core/src/main/java/org/apache/maven/configuration/internal/EnhancedComponentConfigurator.java +++ b/maven-core/src/main/java/org/apache/maven/configuration/internal/EnhancedComponentConfigurator.java @@ -20,6 +20,7 @@ package org.apache.maven.configuration.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.component.configurator.BasicComponentConfigurator; import org.codehaus.plexus.component.configurator.ComponentConfigurationException; diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java index 65b1ca8c7e..7b1d68207d 100644 --- a/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java +++ b/maven-core/src/main/java/org/apache/maven/eventspy/internal/EventSpyDispatcher.java @@ -18,11 +18,13 @@ */ package org.apache.maven.eventspy.internal; -import java.util.ArrayList; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.ArrayList; +import java.util.List; + import org.apache.maven.eventspy.EventSpy; import org.apache.maven.execution.ExecutionListener; import org.eclipse.aether.RepositoryListener; diff --git a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java index 4b52cb7327..1b4567ca74 100644 --- a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java +++ b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java @@ -18,13 +18,15 @@ */ package org.apache.maven.exception; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.net.ConnectException; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.lifecycle.LifecycleExecutionException; import org.apache.maven.model.building.ModelProblem; import org.apache.maven.model.building.ModelProblemUtils; diff --git a/maven-core/src/main/java/org/apache/maven/execution/BuildSummary.java b/maven-core/src/main/java/org/apache/maven/execution/BuildSummary.java index 26cb661be7..551eeb1b0b 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/BuildSummary.java +++ b/maven-core/src/main/java/org/apache/maven/execution/BuildSummary.java @@ -19,6 +19,7 @@ package org.apache.maven.execution; import java.util.Objects; + import org.apache.maven.project.MavenProject; /** diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzer.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzer.java index 44e27abb54..0bc99bdb78 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzer.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzer.java @@ -18,11 +18,13 @@ */ package org.apache.maven.execution; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.project.MavenProject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionDataRepository.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionDataRepository.java index ea3fa84e25..a518783640 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionDataRepository.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionDataRepository.java @@ -18,6 +18,9 @@ */ package org.apache.maven.execution; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.io.Reader; import java.io.Writer; @@ -26,8 +29,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.Properties; import java.util.stream.Stream; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.commons.lang3.StringUtils; import org.apache.maven.project.MavenProject; import org.slf4j.Logger; diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java index 2f4735990f..cc5a45727d 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Properties; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.eventspy.internal.EventSpyDispatcher; import org.apache.maven.model.Profile; diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java index de2e7103a7..8177bcc87c 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java @@ -18,15 +18,17 @@ */ package org.apache.maven.execution; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.bridge.MavenRepositorySystem; diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java index 10481c797d..65795358c1 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java @@ -23,6 +23,7 @@ import java.util.IdentityHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; + import org.apache.maven.project.DependencyResolutionResult; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java index 66dd799613..e4a768aa10 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java @@ -23,6 +23,7 @@ import java.util.Date; import java.util.List; import java.util.Map; import java.util.Properties; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; import org.apache.maven.eventspy.internal.EventSpyDispatcher; diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionResult.java b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionResult.java index f04a4b3190..559b17bcec 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionResult.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionResult.java @@ -19,6 +19,7 @@ package org.apache.maven.execution; import java.util.List; + import org.apache.maven.project.DependencyResolutionResult; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java index b508355695..bd4e34ad52 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java @@ -27,6 +27,7 @@ import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.stream.Collectors; + import org.apache.maven.api.Session; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.RepositoryCache; diff --git a/maven-core/src/main/java/org/apache/maven/execution/ProfileActivation.java b/maven-core/src/main/java/org/apache/maven/execution/ProfileActivation.java index 1672c8c17c..cc6aecb3c2 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ProfileActivation.java +++ b/maven-core/src/main/java/org/apache/maven/execution/ProfileActivation.java @@ -18,8 +18,6 @@ */ package org.apache.maven.execution; -import static java.util.stream.Collectors.toSet; - import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -28,6 +26,8 @@ import java.util.Map; import java.util.Set; import java.util.function.Predicate; +import static java.util.stream.Collectors.toSet; + /** * Container for storing the request from the user to activate or de-activate certain profiles and optionally fail the * build if those profiles do not exist. diff --git a/maven-core/src/main/java/org/apache/maven/execution/ProjectActivation.java b/maven-core/src/main/java/org/apache/maven/execution/ProjectActivation.java index 8a197dc035..f5f91a4e43 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ProjectActivation.java +++ b/maven-core/src/main/java/org/apache/maven/execution/ProjectActivation.java @@ -18,8 +18,6 @@ */ package org.apache.maven.execution; -import static java.util.stream.Collectors.toSet; - import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -28,6 +26,8 @@ import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; +import static java.util.stream.Collectors.toSet; + /** * Container for storing the request from the user to activate or deactivate certain projects and optionally fail the * build if those projects do not exist. diff --git a/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java b/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java index 6f26ebc7a3..2fa3e3b312 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java +++ b/maven-core/src/main/java/org/apache/maven/execution/ProjectDependencyGraph.java @@ -19,6 +19,7 @@ package org.apache.maven.execution; import java.util.List; + import org.apache.maven.project.MavenProject; /** diff --git a/maven-core/src/main/java/org/apache/maven/execution/ProjectExecutionEvent.java b/maven-core/src/main/java/org/apache/maven/execution/ProjectExecutionEvent.java index d19cb339cb..257193de89 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ProjectExecutionEvent.java +++ b/maven-core/src/main/java/org/apache/maven/execution/ProjectExecutionEvent.java @@ -19,6 +19,7 @@ package org.apache.maven.execution; import java.util.List; + import org.apache.maven.plugin.MojoExecution; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java index 7ece350eb3..e1f21c3066 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java +++ b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.project.DuplicateProjectException; diff --git a/maven-core/src/main/java/org/apache/maven/execution/scope/MojoExecutionScoped.java b/maven-core/src/main/java/org/apache/maven/execution/scope/MojoExecutionScoped.java index c7e84e8c67..7504c4b618 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/scope/MojoExecutionScoped.java +++ b/maven-core/src/main/java/org/apache/maven/execution/scope/MojoExecutionScoped.java @@ -18,13 +18,14 @@ */ package org.apache.maven.execution.scope; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import com.google.inject.ScopeAnnotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; +import com.google.inject.ScopeAnnotation; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + /** * Indicates that annotated component should be instantiated before mojo execution starts and discarded after mojo * execution completes. diff --git a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java index ef937e9ad5..b650912f25 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java +++ b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java @@ -18,16 +18,17 @@ */ package org.apache.maven.execution.scope.internal; -import com.google.inject.Key; -import com.google.inject.OutOfScopeException; -import com.google.inject.Provider; -import com.google.inject.Scope; -import com.google.inject.util.Providers; import java.util.Collection; import java.util.HashMap; import java.util.IdentityHashMap; import java.util.LinkedList; import java.util.Map; + +import com.google.inject.Key; +import com.google.inject.OutOfScopeException; +import com.google.inject.Provider; +import com.google.inject.Scope; +import com.google.inject.util.Providers; import org.apache.maven.execution.MojoExecutionEvent; import org.apache.maven.execution.MojoExecutionListener; import org.apache.maven.execution.scope.WeakMojoExecutionListener; diff --git a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java index 1365a3ba7c..cc3fd7aea0 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java +++ b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java @@ -20,6 +20,7 @@ package org.apache.maven.execution.scope.internal; import javax.inject.Inject; import javax.inject.Named; + import org.apache.maven.execution.MojoExecutionListener; /** diff --git a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExports.java b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExports.java index 4358d28d42..aec37e7041 100644 --- a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExports.java +++ b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExports.java @@ -18,16 +18,17 @@ */ package org.apache.maven.extension.internal; -import static java.util.function.Function.identity; -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toMap; - import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; + import org.codehaus.plexus.classworlds.realm.ClassRealm; +import static java.util.function.Function.identity; +import static java.util.stream.Collectors.collectingAndThen; +import static java.util.stream.Collectors.toMap; + /** * Provides information about artifacts (identified by groupId:artifactId string key) and classpath elements exported by * Maven core itself and loaded Maven core extensions. diff --git a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java index bb04a2ce2b..9c9d647289 100644 --- a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java +++ b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java @@ -18,11 +18,13 @@ */ package org.apache.maven.extension.internal; -import java.util.Objects; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + +import java.util.Objects; + import org.codehaus.plexus.PlexusContainer; /** diff --git a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java index bac9136d35..f49b004d36 100644 --- a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java +++ b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java @@ -28,6 +28,7 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; + import org.apache.maven.project.ExtensionDescriptor; import org.apache.maven.project.ExtensionDescriptorBuilder; import org.codehaus.plexus.classworlds.realm.ClassRealm; diff --git a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java index f342d0577b..9d0683f22e 100644 --- a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java @@ -18,7 +18,9 @@ */ package org.apache.maven.graph; -import static java.util.Comparator.comparing; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.util.ArrayList; @@ -29,9 +31,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.MavenExecutionException; import org.apache.maven.ProjectCycleException; import org.apache.maven.artifact.ArtifactUtils; @@ -54,6 +54,8 @@ import org.codehaus.plexus.util.dag.CycleDetectedException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static java.util.Comparator.comparing; + /** * Builds the {@link ProjectDependencyGraph inter-dependencies graph} between projects in the reactor. */ diff --git a/maven-core/src/main/java/org/apache/maven/graph/DefaultProjectDependencyGraph.java b/maven-core/src/main/java/org/apache/maven/graph/DefaultProjectDependencyGraph.java index 3269b38b0a..a4afc79439 100644 --- a/maven-core/src/main/java/org/apache/maven/graph/DefaultProjectDependencyGraph.java +++ b/maven-core/src/main/java/org/apache/maven/graph/DefaultProjectDependencyGraph.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; + import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.project.DuplicateProjectException; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/graph/FilteredProjectDependencyGraph.java b/maven-core/src/main/java/org/apache/maven/graph/FilteredProjectDependencyGraph.java index 7229506cd1..a6f7fcbdf9 100644 --- a/maven-core/src/main/java/org/apache/maven/graph/FilteredProjectDependencyGraph.java +++ b/maven-core/src/main/java/org/apache/maven/graph/FilteredProjectDependencyGraph.java @@ -24,6 +24,7 @@ import java.util.IdentityHashMap; import java.util.List; import java.util.Map; import java.util.Objects; + import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/graph/ProjectSelector.java b/maven-core/src/main/java/org/apache/maven/graph/ProjectSelector.java index 7ee8cc691b..f2ee85f738 100644 --- a/maven-core/src/main/java/org/apache/maven/graph/ProjectSelector.java +++ b/maven-core/src/main/java/org/apache/maven/graph/ProjectSelector.java @@ -25,6 +25,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.Set; + import org.apache.maven.MavenExecutionException; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformer.java b/maven-core/src/main/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformer.java index e680b0de2b..c07dcc0c70 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformer.java +++ b/maven-core/src/main/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformer.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; + import org.apache.maven.model.building.DefaultBuildPomXMLFilterFactory; import org.apache.maven.model.building.TransformerContext; import org.apache.maven.model.transform.RawToConsumerPomXMLFilterFactory; diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java index 2764766160..4aca3d603c 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java @@ -18,7 +18,8 @@ */ package org.apache.maven.internal.aether; -import static java.util.stream.Collectors.toList; +import javax.inject.Inject; +import javax.inject.Named; import java.io.File; import java.io.IOException; @@ -33,8 +34,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; + import org.apache.maven.RepositoryUtils; import org.apache.maven.api.xml.Dom; import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; @@ -83,6 +83,8 @@ import org.eclipse.sisu.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static java.util.stream.Collectors.toList; + /** * @since 3.3.0 */ diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java b/maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java index 1066064b53..1aae6c25b2 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java +++ b/maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java @@ -19,6 +19,7 @@ package org.apache.maven.internal.aether; import java.io.FileNotFoundException; + import org.eclipse.aether.AbstractRepositoryListener; import org.eclipse.aether.RepositoryEvent; import org.eclipse.aether.transfer.MetadataNotFoundException; diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/MavenChainedWorkspaceReader.java b/maven-core/src/main/java/org/apache/maven/internal/aether/MavenChainedWorkspaceReader.java index 05e3c781eb..6cf9ed8b62 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/aether/MavenChainedWorkspaceReader.java +++ b/maven-core/src/main/java/org/apache/maven/internal/aether/MavenChainedWorkspaceReader.java @@ -21,6 +21,7 @@ package org.apache.maven.internal.aether; import java.io.File; import java.util.Collection; import java.util.List; + import org.apache.maven.model.Model; import org.apache.maven.repository.internal.MavenWorkspaceReader; import org.eclipse.aether.artifact.Artifact; diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/ResolverLifecycle.java b/maven-core/src/main/java/org/apache/maven/internal/aether/ResolverLifecycle.java index 8c3d99779f..576e915a6d 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/aether/ResolverLifecycle.java +++ b/maven-core/src/main/java/org/apache/maven/internal/aether/ResolverLifecycle.java @@ -18,15 +18,16 @@ */ package org.apache.maven.internal.aether; -import static java.util.Objects.requireNonNull; - import javax.annotation.PreDestroy; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; + import org.eclipse.aether.RepositorySystem; import org.eclipse.sisu.EagerSingleton; +import static java.util.Objects.requireNonNull; + /** * Maven internal component that bridges container "shut down" to {@link RepositorySystem#shutdown()}. * diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListener.java b/maven-core/src/main/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListener.java index 773d2e16fd..b75fdcd824 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListener.java +++ b/maven-core/src/main/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListener.java @@ -18,8 +18,6 @@ */ package org.apache.maven.internal.aether; -import static java.util.Objects.requireNonNull; - import java.io.IOException; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; @@ -28,6 +26,7 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.ListIterator; import java.util.Objects; + import org.eclipse.aether.AbstractRepositoryListener; import org.eclipse.aether.RepositoryEvent; import org.eclipse.aether.RepositorySystemSession; @@ -37,6 +36,8 @@ import org.eclipse.aether.collection.CollectStepData; import org.eclipse.aether.graph.Dependency; import org.eclipse.aether.graph.DependencyNode; +import static java.util.Objects.requireNonNull; + /** * A class building reverse tree using {@link CollectStepData} trace data provided in {@link RepositoryEvent} * events fired during collection. diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractNode.java b/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractNode.java index fcbced9511..f3e8987f17 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractNode.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractNode.java @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; + import org.apache.maven.api.Node; import org.apache.maven.api.NodeVisitor; import org.eclipse.aether.artifact.Artifact; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractSession.java b/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractSession.java index 3a8a03523a..619b56a158 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractSession.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/AbstractSession.java @@ -18,8 +18,6 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; - import java.io.File; import java.nio.file.Path; import java.util.Arrays; @@ -33,6 +31,7 @@ import java.util.WeakHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.maven.api.Artifact; import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Dependency; @@ -65,6 +64,8 @@ import org.apache.maven.api.services.VersionParser; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.project.MavenProject; +import static org.apache.maven.internal.impl.Utils.nonNull; + public abstract class AbstractSession implements Session { private final List listeners = new CopyOnWriteArrayList<>(); diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifact.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifact.java index b68bbcd16f..666e227229 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifact.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifact.java @@ -18,14 +18,15 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; - import java.util.Objects; + import org.apache.maven.api.Artifact; import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Version; import org.apache.maven.api.annotations.Nonnull; +import static org.apache.maven.internal.impl.Utils.nonNull; + /** * A wrapper class around a maven resolver artifact. */ diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinate.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinate.java index 3a5f69a3b1..d76b161766 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinate.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinate.java @@ -18,13 +18,14 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; - import java.util.Objects; + import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.VersionRange; import org.apache.maven.api.annotations.Nonnull; +import static org.apache.maven.internal.impl.Utils.nonNull; + /** * A wrapper class around a maven resolver artifact. */ diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinateFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinateFactory.java index b2ba486ef5..77e385fec0 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinateFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactCoordinateFactory.java @@ -18,11 +18,9 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.cast; -import static org.apache.maven.internal.impl.Utils.nonNull; - import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.ArtifactCoordinateFactory; @@ -30,6 +28,9 @@ import org.apache.maven.api.services.ArtifactCoordinateFactoryRequest; import org.apache.maven.shared.utils.StringUtils; import org.eclipse.aether.artifact.ArtifactType; +import static org.apache.maven.internal.impl.Utils.cast; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultArtifactCoordinateFactory implements ArtifactCoordinateFactory { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactDeployer.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactDeployer.java index ee2379b37d..1f48abc059 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactDeployer.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactDeployer.java @@ -18,13 +18,12 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.cast; -import static org.apache.maven.internal.impl.Utils.nonNull; - -import java.util.Collection; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Collection; + import org.apache.maven.api.Artifact; import org.apache.maven.api.RemoteRepository; import org.apache.maven.api.annotations.Nonnull; @@ -36,6 +35,9 @@ import org.eclipse.aether.deployment.DeployRequest; import org.eclipse.aether.deployment.DeployResult; import org.eclipse.aether.deployment.DeploymentException; +import static org.apache.maven.internal.impl.Utils.cast; +import static org.apache.maven.internal.impl.Utils.nonNull; + /** * Implementation of {@link ArtifactDeployer} service. */ diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactFactory.java index 1c38e21c73..a54c26ce3d 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactFactory.java @@ -18,11 +18,9 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.cast; -import static org.apache.maven.internal.impl.Utils.nonNull; - import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.api.Artifact; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.ArtifactFactory; @@ -30,6 +28,9 @@ import org.apache.maven.api.services.ArtifactFactoryRequest; import org.apache.maven.shared.utils.StringUtils; import org.eclipse.aether.artifact.ArtifactType; +import static org.apache.maven.internal.impl.Utils.cast; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultArtifactFactory implements ArtifactFactory { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactInstaller.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactInstaller.java index 77e5152b54..58b7b7e376 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactInstaller.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactInstaller.java @@ -18,12 +18,10 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.cast; -import static org.apache.maven.internal.impl.Utils.nonNull; - import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.ArtifactInstaller; import org.apache.maven.api.services.ArtifactInstallerException; @@ -33,6 +31,9 @@ import org.eclipse.aether.installation.InstallRequest; import org.eclipse.aether.installation.InstallResult; import org.eclipse.aether.installation.InstallationException; +import static org.apache.maven.internal.impl.Utils.cast; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultArtifactInstaller implements ArtifactInstaller { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactManager.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactManager.java index d9208455d9..a80be4f296 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactManager.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactManager.java @@ -18,13 +18,15 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Inject; +import javax.inject.Named; + import java.io.File; import java.nio.file.Path; import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; -import javax.inject.Named; + import org.apache.maven.SessionScoped; import org.apache.maven.api.Artifact; import org.apache.maven.api.annotations.Nonnull; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactResolver.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactResolver.java index 051794bb80..136655d4a1 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactResolver.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactResolver.java @@ -18,17 +18,16 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.cast; -import static org.apache.maven.internal.impl.Utils.nonNull; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.nio.file.Path; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.Artifact; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.ArtifactManager; @@ -42,6 +41,9 @@ import org.eclipse.aether.resolution.ArtifactRequest; import org.eclipse.aether.resolution.ArtifactResolutionException; import org.eclipse.aether.resolution.ArtifactResult; +import static org.apache.maven.internal.impl.Utils.cast; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultArtifactResolver implements ArtifactResolver { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependency.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependency.java index a4ad39299a..8a67eb3e33 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependency.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependency.java @@ -18,9 +18,8 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; - import java.util.Objects; + import org.apache.maven.api.Dependency; import org.apache.maven.api.DependencyCoordinate; import org.apache.maven.api.Scope; @@ -31,6 +30,8 @@ import org.apache.maven.api.annotations.Nullable; import org.apache.maven.api.services.TypeRegistry; import org.eclipse.aether.artifact.ArtifactProperties; +import static org.apache.maven.internal.impl.Utils.nonNull; + public class DefaultDependency implements Dependency { private final AbstractSession session; private final org.eclipse.aether.graph.Dependency dependency; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCollector.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCollector.java index 289593fcce..36f75fa68b 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCollector.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCollector.java @@ -18,13 +18,12 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.cast; -import static org.apache.maven.internal.impl.Utils.nonNull; - -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; + import org.apache.maven.api.Node; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.DependencyCollector; @@ -42,6 +41,9 @@ import org.eclipse.aether.graph.Dependency; import org.eclipse.aether.util.graph.manager.DependencyManagerUtils; import org.eclipse.aether.util.graph.transformer.ConflictResolver; +import static org.apache.maven.internal.impl.Utils.cast; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultDependencyCollector implements DependencyCollector { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinate.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinate.java index 2b9d2af005..9d2bfaab38 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinate.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinate.java @@ -18,9 +18,8 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; - import java.util.Collection; + import org.apache.maven.api.DependencyCoordinate; import org.apache.maven.api.Exclusion; import org.apache.maven.api.Scope; @@ -31,6 +30,8 @@ import org.apache.maven.api.annotations.Nullable; import org.apache.maven.api.services.TypeRegistry; import org.eclipse.aether.artifact.ArtifactProperties; +import static org.apache.maven.internal.impl.Utils.nonNull; + public class DefaultDependencyCoordinate implements DependencyCoordinate { private final AbstractSession session; private final org.eclipse.aether.graph.Dependency dependency; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinateFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinateFactory.java index 7438719050..11e94aa8c1 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinateFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultDependencyCoordinateFactory.java @@ -18,12 +18,11 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.cast; -import static org.apache.maven.internal.impl.Utils.nonNull; - -import java.util.stream.Collectors; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.stream.Collectors; + import org.apache.maven.api.DependencyCoordinate; import org.apache.maven.api.Exclusion; import org.apache.maven.api.annotations.Nonnull; @@ -31,6 +30,9 @@ import org.apache.maven.api.services.DependencyCoordinateFactory; import org.apache.maven.api.services.DependencyCoordinateFactoryRequest; import org.eclipse.aether.artifact.ArtifactType; +import static org.apache.maven.internal.impl.Utils.cast; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultDependencyCoordinateFactory implements DependencyCoordinateFactory { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultEvent.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultEvent.java index bd1546e575..b8db69e1de 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultEvent.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultEvent.java @@ -19,6 +19,7 @@ package org.apache.maven.internal.impl; import java.util.Optional; + import org.apache.maven.api.Event; import org.apache.maven.api.EventType; import org.apache.maven.api.MojoExecution; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepository.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepository.java index 9d0eecfc69..dd1db21c49 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepository.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepository.java @@ -18,13 +18,15 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; +import javax.inject.Inject; import java.nio.file.Path; -import javax.inject.Inject; + import org.apache.maven.api.LocalRepository; import org.apache.maven.api.annotations.Nonnull; +import static org.apache.maven.internal.impl.Utils.nonNull; + public class DefaultLocalRepository implements LocalRepository { private final @Nonnull org.eclipse.aether.repository.LocalRepository repository; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepositoryManager.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepositoryManager.java index de04cbe585..4217e4e682 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepositoryManager.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLocalRepositoryManager.java @@ -18,9 +18,11 @@ */ package org.apache.maven.internal.impl; -import java.nio.file.Path; import javax.inject.Named; import javax.inject.Singleton; + +import java.nio.file.Path; + import org.apache.maven.api.Artifact; import org.apache.maven.api.LocalRepository; import org.apache.maven.api.RemoteRepository; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLog.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLog.java index 1807716416..c1a2d8d2e3 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLog.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLog.java @@ -18,12 +18,13 @@ */ package org.apache.maven.internal.impl; -import static java.util.Objects.requireNonNull; - import java.util.function.Supplier; + import org.apache.maven.api.plugin.Log; import org.slf4j.Logger; +import static java.util.Objects.requireNonNull; + public class DefaultLog implements Log { private final Logger logger; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLookup.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLookup.java index c91ac8a54d..8acf1f0ddc 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLookup.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLookup.java @@ -18,11 +18,13 @@ */ package org.apache.maven.internal.impl; -import java.util.List; -import java.util.Map; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; +import java.util.Map; + import org.apache.maven.api.services.Lookup; import org.apache.maven.api.services.LookupException; import org.codehaus.plexus.PlexusContainer; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMessageBuilderFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMessageBuilderFactory.java index e9b6578c4a..c163f6b896 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMessageBuilderFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMessageBuilderFactory.java @@ -18,9 +18,11 @@ */ package org.apache.maven.internal.impl; -import java.util.Objects; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Objects; + import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.MessageBuilder; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java index 619d63d02d..4b67fd4c2f 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java @@ -18,7 +18,8 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.InputStream; import java.io.OutputStream; @@ -27,8 +28,7 @@ import java.io.Writer; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.model.InputSource; import org.apache.maven.api.model.Model; @@ -41,6 +41,8 @@ import org.apache.maven.model.v4.MavenXpp3ReaderEx; import org.apache.maven.model.v4.MavenXpp3WriterEx; import org.codehaus.plexus.util.ReaderFactory; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultModelXmlFactory implements ModelXmlFactory { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMojoExecution.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMojoExecution.java index a6910e1a48..52e0b2047f 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMojoExecution.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultMojoExecution.java @@ -19,6 +19,7 @@ package org.apache.maven.internal.impl; import java.util.Optional; + import org.apache.maven.api.MojoExecution; import org.apache.maven.api.model.Plugin; import org.apache.maven.api.xml.Dom; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultNode.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultNode.java index ef3fc6ddcb..7cd27ae905 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultNode.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultNode.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Optional; + import org.apache.maven.api.Dependency; import org.apache.maven.api.Node; import org.apache.maven.api.RemoteRepository; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java index cf8bb874ec..0951f26f85 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Optional; + import org.apache.maven.RepositoryUtils; import org.apache.maven.api.Artifact; import org.apache.maven.api.DependencyCoordinate; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java index 466153d71a..d006144e27 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java @@ -18,6 +18,10 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -25,9 +29,7 @@ import java.nio.file.Path; import java.util.Collection; import java.util.List; import java.util.Optional; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.api.Artifact; import org.apache.maven.api.ArtifactCoordinate; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectManager.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectManager.java index 6e35e1e5c3..c35c7717db 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectManager.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectManager.java @@ -18,6 +18,9 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Inject; +import javax.inject.Named; + import java.nio.file.Path; import java.util.Collection; import java.util.Collections; @@ -25,8 +28,7 @@ import java.util.List; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; + import org.apache.maven.RepositoryUtils; import org.apache.maven.SessionScoped; import org.apache.maven.api.Artifact; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPrompter.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPrompter.java index 97b31397db..dc44da8e2b 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPrompter.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPrompter.java @@ -18,11 +18,13 @@ */ package org.apache.maven.internal.impl; -import java.lang.reflect.Method; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.lang.reflect.Method; +import java.util.List; + import org.apache.maven.api.services.Prompter; import org.apache.maven.api.services.PrompterException; import org.codehaus.plexus.PlexusContainer; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultRepositoryFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultRepositoryFactory.java index 60852866c0..9e6da6300c 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultRepositoryFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultRepositoryFactory.java @@ -18,10 +18,12 @@ */ package org.apache.maven.internal.impl; -import java.nio.file.Path; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.nio.file.Path; + import org.apache.maven.api.LocalRepository; import org.apache.maven.api.RemoteRepository; import org.apache.maven.api.model.Repository; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSession.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSession.java index 0483f5b636..05a72ff973 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSession.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSession.java @@ -18,8 +18,6 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; - import java.nio.file.Path; import java.nio.file.Paths; import java.time.Instant; @@ -31,6 +29,7 @@ import java.util.NoSuchElementException; import java.util.Objects; import java.util.function.Supplier; import java.util.stream.Collectors; + import org.apache.maven.RepositoryUtils; import org.apache.maven.api.DependencyCoordinate; import org.apache.maven.api.LocalRepository; @@ -56,6 +55,8 @@ import org.eclipse.aether.DefaultRepositorySystemSession; import org.eclipse.aether.RepositorySystem; import org.eclipse.aether.RepositorySystemSession; +import static org.apache.maven.internal.impl.Utils.nonNull; + public class DefaultSession extends AbstractSession { private final MavenSession mavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSessionFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSessionFactory.java index d2883d6fa7..bbcd53f89c 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSessionFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSessionFactory.java @@ -21,6 +21,7 @@ package org.apache.maven.internal.impl; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.api.Session; import org.apache.maven.bridge.MavenRepositorySystem; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsBuilder.java index 533b2959c9..ae3c0d0d36 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsBuilder.java @@ -18,14 +18,16 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.Properties; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.BuilderProblem; import org.apache.maven.api.services.SettingsBuilder; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsXmlFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsXmlFactory.java index 9b3dbe532a..39303e9cd0 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsXmlFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultSettingsXmlFactory.java @@ -18,13 +18,15 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.model.InputSource; import org.apache.maven.api.services.xml.SettingsXmlFactory; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainManager.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainManager.java index 1541e596e4..2ccbbba29d 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainManager.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainManager.java @@ -18,13 +18,15 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Optional; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.Session; import org.apache.maven.api.Toolchain; import org.apache.maven.api.services.ToolchainManager; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsBuilder.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsBuilder.java index 076f0de85d..81cda11c52 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsBuilder.java @@ -18,14 +18,16 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.Properties; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.BuilderProblem; import org.apache.maven.api.services.Source; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsXmlFactory.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsXmlFactory.java index 2d1b80bff6..e289cd208f 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsXmlFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsXmlFactory.java @@ -18,13 +18,15 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.model.InputSource; import org.apache.maven.api.services.xml.ToolchainsXmlFactory; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransport.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransport.java index 033056bb23..c8e692ce44 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransport.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransport.java @@ -18,7 +18,8 @@ */ package org.apache.maven.internal.impl; -import static java.util.Objects.requireNonNull; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.IOException; import java.io.UncheckedIOException; @@ -27,13 +28,14 @@ import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.util.Optional; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.services.Transport; import org.eclipse.aether.spi.connector.transport.GetTask; import org.eclipse.aether.spi.connector.transport.PutTask; import org.eclipse.aether.spi.connector.transport.Transporter; +import static java.util.Objects.requireNonNull; + @Named @Singleton public class DefaultTransport implements Transport { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransportProvider.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransportProvider.java index 4afec0f44e..a7ab392c29 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransportProvider.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTransportProvider.java @@ -18,13 +18,13 @@ */ package org.apache.maven.internal.impl; -import static java.util.Objects.requireNonNull; - -import java.net.URI; -import java.net.URISyntaxException; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.net.URI; +import java.net.URISyntaxException; + import org.apache.maven.api.RemoteRepository; import org.apache.maven.api.Session; import org.apache.maven.api.services.Transport; @@ -33,6 +33,8 @@ import org.apache.maven.api.services.TransportProviderException; import org.eclipse.aether.spi.connector.transport.TransporterProvider; import org.eclipse.aether.transfer.NoTransporterException; +import static java.util.Objects.requireNonNull; + @Named @Singleton public class DefaultTransportProvider implements TransportProvider { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java index fc058ec30a..abed7bea77 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java @@ -18,17 +18,18 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.internal.impl.Utils.nonNull; - import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.api.Type; import org.apache.maven.api.annotations.Nonnull; import org.apache.maven.api.services.TypeRegistry; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultTypeRegistry implements TypeRegistry { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultVersionParser.java b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultVersionParser.java index a3fd719837..28d6ca13c0 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultVersionParser.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultVersionParser.java @@ -18,13 +18,12 @@ */ package org.apache.maven.internal.impl; -import static org.apache.maven.artifact.versioning.VersionRange.createFromVersionSpec; -import static org.apache.maven.internal.impl.Utils.nonNull; +import javax.inject.Named; +import javax.inject.Singleton; import java.util.Objects; import java.util.regex.Pattern; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.Version; import org.apache.maven.api.VersionRange; import org.apache.maven.api.services.VersionParser; @@ -33,6 +32,9 @@ import org.apache.maven.artifact.versioning.ArtifactVersion; import org.apache.maven.artifact.versioning.DefaultArtifactVersion; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; +import static org.apache.maven.artifact.versioning.VersionRange.createFromVersionSpec; +import static org.apache.maven.internal.impl.Utils.nonNull; + @Named @Singleton public class DefaultVersionParser implements VersionParser { diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/EventSpyImpl.java b/maven-core/src/main/java/org/apache/maven/internal/impl/EventSpyImpl.java index 4edaef3acc..0cd80c60f0 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/EventSpyImpl.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/EventSpyImpl.java @@ -18,10 +18,12 @@ */ package org.apache.maven.internal.impl; -import java.util.Collection; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Collection; + import org.apache.maven.api.Event; import org.apache.maven.api.Listener; import org.apache.maven.eventspy.EventSpy; diff --git a/maven-core/src/main/java/org/apache/maven/internal/impl/WrapperNode.java b/maven-core/src/main/java/org/apache/maven/internal/impl/WrapperNode.java index 6f3cdb8887..66ead7dd3a 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/impl/WrapperNode.java +++ b/maven-core/src/main/java/org/apache/maven/internal/impl/WrapperNode.java @@ -20,6 +20,7 @@ package org.apache.maven.internal.impl; import java.util.List; import java.util.Optional; + import org.apache.maven.api.Dependency; import org.apache.maven.api.Node; import org.apache.maven.api.RemoteRepository; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java index 421be28872..570625ac56 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java @@ -18,13 +18,15 @@ */ package org.apache.maven.lifecycle; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculator; import org.apache.maven.lifecycle.internal.LifecycleStarter; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java index f3f90e4f71..d7812ed7a0 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java @@ -18,6 +18,10 @@ */ package org.apache.maven.lifecycle; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; @@ -25,9 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.slf4j.Logger; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java index d16e9a44ef..561acab6c7 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java @@ -19,6 +19,7 @@ package org.apache.maven.lifecycle; import java.util.Set; + import org.apache.maven.model.Plugin; /** diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/Lifecycle.java b/maven-core/src/main/java/org/apache/maven/lifecycle/Lifecycle.java index 190071ba72..b3b63cbaaa 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/Lifecycle.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/Lifecycle.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle; import java.util.List; import java.util.Map; + import org.apache.maven.lifecycle.mapping.LifecyclePhase; /** diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java index 2bbc050424..c7b8c085e6 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java @@ -18,12 +18,12 @@ */ package org.apache.maven.lifecycle; -import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; - import org.apache.maven.plugin.MojoExecution; import org.apache.maven.project.MavenProject; import org.apache.maven.shared.utils.logging.MessageBuilder; +import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + /** * @author Jason van Zyl */ diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java index 88dea239ac..a65041ad09 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle; import java.util.List; import java.util.Set; + import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.InvalidPluginDescriptorException; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java index e1ac0a8c00..c35f18c19d 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle; import java.util.List; import java.util.Map; + import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.InvalidPluginDescriptorException; import org.apache.maven.plugin.MojoExecution; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java b/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java index 8c3bcaf90d..e3d14977e5 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java @@ -27,6 +27,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.lifecycle.internal.ExecutionPlanItem; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.MojoExecution; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuildListCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuildListCalculator.java index 36a23e1e9b..6607c128d9 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuildListCalculator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuildListCalculator.java @@ -18,11 +18,13 @@ */ package org.apache.maven.lifecycle.internal; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collections; import java.util.List; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.builder.BuilderCommon; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CompoundProjectExecutionListener.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CompoundProjectExecutionListener.java index 197c04f6de..515c53e902 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CompoundProjectExecutionListener.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/CompoundProjectExecutionListener.java @@ -19,6 +19,7 @@ package org.apache.maven.lifecycle.internal; import java.util.Collection; + import org.apache.maven.execution.ProjectExecutionEvent; import org.apache.maven.execution.ProjectExecutionListener; import org.apache.maven.lifecycle.LifecycleExecutionException; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultExecutionEventCatapult.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultExecutionEventCatapult.java index a90255ebce..f54e91a7c3 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultExecutionEventCatapult.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultExecutionEventCatapult.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.execution.ExecutionEvent; import org.apache.maven.execution.ExecutionListener; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java index e37da743ff..d402c3ff45 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java @@ -18,6 +18,10 @@ */ package org.apache.maven.lifecycle.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -28,9 +32,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.xml.Dom; import org.apache.maven.execution.MavenSession; import org.apache.maven.internal.xml.Xpp3Dom; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java index 2187a4ea80..96ba78ed35 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java @@ -18,14 +18,16 @@ */ package org.apache.maven.lifecycle.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.Lifecycle; import org.apache.maven.lifecycle.LifecycleMappingDelegate; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java index c71fe01f1a..f1e53d7af0 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java @@ -18,7 +18,9 @@ */ package org.apache.maven.lifecycle.internal; -import static java.util.Objects.requireNonNull; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.util.HashSet; import java.util.LinkedHashMap; @@ -26,9 +28,7 @@ import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.xml.Dom; import org.apache.maven.lifecycle.DefaultLifecycles; import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer; @@ -47,6 +47,8 @@ import org.codehaus.plexus.util.xml.Xpp3Dom; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static java.util.Objects.requireNonNull; + /** * NOTE: This class is not part of any public api and can be changed or deleted without prior notice. * diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java index 83c73f61f2..b0de2f672f 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java @@ -18,12 +18,14 @@ */ package org.apache.maven.lifecycle.internal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleNotFoundException; import org.apache.maven.lifecycle.LifecyclePhaseNotFoundException; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java index c9154146e8..0fee4c78e5 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java @@ -18,14 +18,14 @@ */ package org.apache.maven.lifecycle.internal; -import static java.util.Arrays.stream; +import javax.inject.Named; +import javax.inject.Singleton; import java.util.Collection; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.xml.Dom; import org.apache.maven.internal.xml.Xpp3Dom; import org.apache.maven.lifecycle.MojoExecutionConfigurator; @@ -41,6 +41,8 @@ import org.codehaus.plexus.util.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static java.util.Arrays.stream; + /** * @since 3.3.1, MNG-5753 */ diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java index 1ce34fa786..ede5b4e09e 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java @@ -18,9 +18,11 @@ */ package org.apache.maven.lifecycle.internal; -import java.util.Set; import javax.inject.Inject; import javax.inject.Named; + +import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java index 734f8a8cf3..6855ffe1e3 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java @@ -22,6 +22,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.TreeSet; + import org.apache.maven.project.MavenProject; /** diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java index 77816bbd99..3723828e84 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ExecutionPlanItem.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle.internal; import java.util.ArrayList; import java.util.List; + import org.apache.maven.lifecycle.internal.builder.BuilderCommon; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.MojoExecution; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java index eddf9c52fc..32b1a8b151 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java @@ -18,13 +18,15 @@ */ package org.apache.maven.lifecycle.internal; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.lifecycle.internal.builder.BuilderCommon; import org.apache.maven.plugin.MojoExecution; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java index 5a5db6e7fc..c5073de83c 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java @@ -18,6 +18,9 @@ */ package org.apache.maven.lifecycle.internal; +import javax.inject.Inject; +import javax.inject.Named; + import java.io.File; import java.util.Collection; import java.util.Collections; @@ -27,8 +30,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculator.java index 1a7f41d163..2224e6d838 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculator.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle.internal; import java.util.List; import java.util.Set; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleNotFoundException; import org.apache.maven.lifecycle.LifecyclePhaseNotFoundException; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java index 8e930e0310..a210b07d93 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java @@ -18,11 +18,13 @@ */ package org.apache.maven.lifecycle.internal; -import java.util.HashSet; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.HashSet; +import java.util.List; + import org.apache.maven.execution.BuildSuccess; import org.apache.maven.execution.ExecutionEvent; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java index d06c0254a0..d93e4b3a65 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecyclePluginResolver.java @@ -18,11 +18,13 @@ */ package org.apache.maven.lifecycle.internal; -import java.util.HashMap; -import java.util.Map; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.HashMap; +import java.util.Map; + import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginManagement; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleStarter.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleStarter.java index e16e0bada7..0c6302c4a9 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleStarter.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleStarter.java @@ -18,11 +18,13 @@ */ package org.apache.maven.lifecycle.internal; -import java.util.List; -import java.util.Map; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; +import java.util.Map; + import org.apache.maven.execution.ExecutionEvent; import org.apache.maven.execution.MavenExecutionResult; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculator.java index d3e3550970..d8e1a62166 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculator.java @@ -19,6 +19,7 @@ package org.apache.maven.lifecycle.internal; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleNotFoundException; import org.apache.maven.lifecycle.LifecyclePhaseNotFoundException; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java index 3a0db94abe..1122f2c36b 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java @@ -18,14 +18,16 @@ */ package org.apache.maven.lifecycle.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.StringTokenizer; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.xml.Dom; import org.apache.maven.execution.MavenSession; import org.apache.maven.internal.xml.Xpp3Dom; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java index 62c0f95a5f..ba049975d7 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java @@ -18,6 +18,11 @@ */ package org.apache.maven.lifecycle.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -30,10 +35,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Provider; -import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.resolver.filter.CumulativeScopeArtifactFilter; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectArtifactFactory.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectArtifactFactory.java index d2ddd226b5..8d9217d05e 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectArtifactFactory.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectArtifactFactory.java @@ -19,6 +19,7 @@ package org.apache.maven.lifecycle.internal; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; import org.apache.maven.project.artifact.InvalidDependencyVersionException; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectBuildList.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectBuildList.java index 92d18f2de4..654c8ee144 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectBuildList.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectBuildList.java @@ -26,6 +26,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectIndex.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectIndex.java index da00908e1e..372cbf1b43 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectIndex.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectIndex.java @@ -21,6 +21,7 @@ package org.apache.maven.lifecycle.internal; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.lifecycle.internal.builder.BuilderCommon; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectSegment.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectSegment.java index 8b4d24460e..d21d33c3cf 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectSegment.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectSegment.java @@ -19,6 +19,7 @@ package org.apache.maven.lifecycle.internal; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ReactorBuildStatus.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ReactorBuildStatus.java index 5f9286ef98..fc47de6200 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ReactorBuildStatus.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ReactorBuildStatus.java @@ -21,6 +21,7 @@ package org.apache.maven.lifecycle.internal; import java.util.Collection; import java.util.Collections; import java.util.HashSet; + import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.lifecycle.internal.builder.BuilderCommon; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/Builder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/Builder.java index a173aa2081..83e5731628 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/Builder.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/Builder.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle.internal.builder; import java.util.List; import java.util.concurrent.ExecutionException; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.ProjectBuildList; import org.apache.maven.lifecycle.internal.ReactorBuildStatus; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java index 5fbc2a1548..80779df1df 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java @@ -18,14 +18,16 @@ */ package org.apache.maven.lifecycle.internal.builder; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.List; import java.util.Optional; import java.util.Properties; import java.util.Set; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.BuildFailure; import org.apache.maven.execution.ExecutionEvent; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraph.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraph.java index c8a3d0975d..37c05e6669 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraph.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraph.java @@ -23,6 +23,7 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; + import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.lifecycle.internal.ProjectBuildList; import org.apache.maven.lifecycle.internal.ProjectSegment; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java index b7038a5b5e..12c7dbb0f1 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java @@ -18,6 +18,10 @@ */ package org.apache.maven.lifecycle.internal.builder.multithreaded; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.List; import java.util.Map; import java.util.Set; @@ -30,9 +34,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.function.Function; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.BuildThreadFactory; import org.apache.maven.lifecycle.internal.LifecycleModuleBuilder; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java index 2898a5ca23..7b2279acac 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java @@ -27,6 +27,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; + import org.apache.maven.lifecycle.internal.ProjectBuildList; import org.apache.maven.lifecycle.internal.ProjectSegment; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java index d4da91e58e..fc814e72ad 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java @@ -18,10 +18,12 @@ */ package org.apache.maven.lifecycle.internal.builder.singlethreaded; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.LifecycleModuleBuilder; import org.apache.maven.lifecycle.internal.ProjectBuildList; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java index 4ae3426e35..2a0149927c 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java @@ -18,14 +18,14 @@ */ package org.apache.maven.lifecycle.mapping; -import static java.util.function.Function.identity; -import static java.util.stream.Collectors.toMap; - import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import static java.util.function.Function.identity; +import static java.util.stream.Collectors.toMap; + /** * DefaultLifecycleMapping */ diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java index a4761c29db..faa3a5cf4c 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java @@ -19,6 +19,7 @@ package org.apache.maven.lifecycle.mapping; import java.util.List; + import org.apache.maven.api.xml.Dom; import org.apache.maven.model.Dependency; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java index 6ab545d43e..441e23bcba 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import org.codehaus.plexus.util.StringUtils; /** diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/providers/AbstractLifecycleProvider.java b/maven-core/src/main/java/org/apache/maven/lifecycle/providers/AbstractLifecycleProvider.java index acdbe37257..0a48691a64 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/providers/AbstractLifecycleProvider.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/providers/AbstractLifecycleProvider.java @@ -18,11 +18,13 @@ */ package org.apache.maven.lifecycle.providers; +import javax.inject.Provider; + import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; -import javax.inject.Provider; + import org.apache.maven.lifecycle.Lifecycle; import org.apache.maven.lifecycle.mapping.LifecyclePhase; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/providers/packaging/AbstractLifecycleMappingProvider.java b/maven-core/src/main/java/org/apache/maven/lifecycle/providers/packaging/AbstractLifecycleMappingProvider.java index 6492934fca..bb749b5141 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/providers/packaging/AbstractLifecycleMappingProvider.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/providers/packaging/AbstractLifecycleMappingProvider.java @@ -18,16 +18,18 @@ */ package org.apache.maven.lifecycle.providers.packaging; -import static java.util.Objects.requireNonNull; +import javax.inject.Provider; import java.util.Collections; import java.util.HashMap; -import javax.inject.Provider; + import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping; import org.apache.maven.lifecycle.mapping.Lifecycle; import org.apache.maven.lifecycle.mapping.LifecycleMapping; import org.apache.maven.lifecycle.mapping.LifecyclePhase; +import static java.util.Objects.requireNonNull; + /** * Base lifecycle mapping provider, ie per-packaging plugin bindings for {@code default} lifecycle. */ diff --git a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java index d548c2378f..c5a34f3bb5 100644 --- a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java +++ b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java @@ -18,6 +18,10 @@ */ package org.apache.maven.model.plugin; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -25,9 +29,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.Model; import org.apache.maven.api.model.Plugin; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java index 9889234bda..65e713fa01 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.descriptor.MojoDescriptor; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java b/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java index 54a9907f0d..a34f3a1437 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin; import java.util.Iterator; import java.util.List; import java.util.Objects; + import org.apache.maven.model.Dependency; import org.apache.maven.model.Exclusion; import org.apache.maven.model.Plugin; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/CompoundMojoExecutionListener.java b/maven-core/src/main/java/org/apache/maven/plugin/CompoundMojoExecutionListener.java index 691dd68800..f8f53fcf8e 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/CompoundMojoExecutionListener.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/CompoundMojoExecutionListener.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.Collection; + import org.apache.maven.execution.MojoExecutionEvent; import org.apache.maven.execution.MojoExecutionListener; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DebugConfigurationListener.java b/maven-core/src/main/java/org/apache/maven/plugin/DebugConfigurationListener.java index dd3edf6177..aa60973c45 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DebugConfigurationListener.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DebugConfigurationListener.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.lang.reflect.Array; + import org.codehaus.plexus.component.configurator.ConfigurationListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java index 4f7823fe59..a2cb6a5e72 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java @@ -18,12 +18,14 @@ */ package org.apache.maven.plugin; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.List; + import org.apache.maven.api.Project; import org.apache.maven.api.plugin.MojoException; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java index 8385d95984..da83a99349 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java @@ -18,14 +18,16 @@ */ package org.apache.maven.plugin; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.ExtensionDescriptor; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultMojosExecutionStrategy.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultMojosExecutionStrategy.java index 0156d66f78..828fe5a388 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultMojosExecutionStrategy.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultMojosExecutionStrategy.java @@ -18,9 +18,11 @@ */ package org.apache.maven.plugin; -import java.util.List; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleExecutionException; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java index ae445936bd..c3566486b7 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java @@ -18,14 +18,16 @@ */ package org.apache.maven.plugin; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Plugin; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java index 021ac4f2a5..57675f7f9c 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java @@ -18,13 +18,15 @@ */ package org.apache.maven.plugin; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.model.Plugin; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java index 2e443ccfbb..dfbee3900f 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java @@ -18,14 +18,16 @@ */ package org.apache.maven.plugin; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Plugin; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java index 44adc590db..022b993206 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.project.ExtensionDescriptor; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java index dec00d5986..2dfed7c8d3 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.descriptor.MojoDescriptor; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginPrerequisitesChecker.java b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginPrerequisitesChecker.java index 0387fb6dfe..48cdda59bc 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginPrerequisitesChecker.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginPrerequisitesChecker.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.function.Consumer; + import org.apache.maven.plugin.descriptor.PluginDescriptor; /** diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java b/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java index b4beb7e53c..d2a1c947c4 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import org.apache.maven.api.xml.Dom; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.descriptor.MojoDescriptor; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MojosExecutionStrategy.java b/maven-core/src/main/java/org/apache/maven/plugin/MojosExecutionStrategy.java index 025a6ee872..aa235eb5fd 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/MojosExecutionStrategy.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/MojosExecutionStrategy.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleExecutionException; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java index 35382471ee..b0c07ae9a1 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Plugin; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java index ed52a0143e..410e1856a0 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginDescriptorCache.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.List; + import org.apache.maven.model.Plugin; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.eclipse.aether.RepositorySystemSession; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginManager.java index 6b1cd17e20..d13d668d19 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginManager.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.Map; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java index 14f1b0d2b7..e8f0618bb1 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.List; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java index f4bfc88fb1..098064cd2a 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java @@ -23,6 +23,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; + import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; import org.codehaus.plexus.util.StringUtils; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java index 4cc7fba86d..8a76960d2d 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin; import java.io.File; import java.util.Properties; + import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptor; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java index 9e48efbee4..4881689850 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java @@ -23,6 +23,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.Optional; import java.util.Properties; + import org.apache.maven.api.Project; import org.apache.maven.api.Session; import org.apache.maven.internal.impl.DefaultMojoExecution; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java index 3066f6dffc..917f50d432 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin; import java.util.List; import java.util.Map; + import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Plugin; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/AbstractMavenPluginParametersValidator.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/AbstractMavenPluginParametersValidator.java index 60edaba7a1..7a0f46c4e8 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/AbstractMavenPluginParametersValidator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/AbstractMavenPluginParametersValidator.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin.internal; import java.util.Arrays; import java.util.List; + import org.apache.maven.plugin.descriptor.Parameter; import org.apache.maven.shared.utils.logging.MessageBuilder; import org.apache.maven.shared.utils.logging.MessageUtils; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java index c1525eb12e..96538d37d5 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java @@ -18,9 +18,11 @@ */ package org.apache.maven.plugin.internal; -import java.util.concurrent.atomic.AtomicReference; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.concurrent.atomic.AtomicReference; + import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.LegacySupport; import org.eclipse.aether.RepositorySystemSession; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java index 75745b9ef5..af72b44222 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java @@ -18,6 +18,10 @@ */ package org.apache.maven.plugin.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; @@ -36,9 +40,7 @@ import java.util.Objects; import java.util.jar.JarFile; import java.util.stream.Collectors; import java.util.zip.ZipEntry; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.api.xml.Dom; import org.apache.maven.artifact.Artifact; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginValidator.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginValidator.java index 66bf83c7fd..4d7e40d34a 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginValidator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginValidator.java @@ -18,9 +18,11 @@ */ package org.apache.maven.plugin.internal; -import java.util.List; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.descriptor.PluginDescriptor; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java index f3e7b142fd..4b1120838d 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java @@ -18,14 +18,16 @@ */ package org.apache.maven.plugin.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.model.Dependency; import org.apache.maven.model.Plugin; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java index b98908b2be..1ae3a803ee 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginManager.java @@ -18,10 +18,12 @@ */ package org.apache.maven.plugin.internal; -import java.util.Map; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Map; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DeprecatedPluginValidator.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DeprecatedPluginValidator.java index 9027fce8b4..4c421c9793 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DeprecatedPluginValidator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DeprecatedPluginValidator.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; import org.apache.maven.shared.utils.logging.MessageUtils; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteChecker.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteChecker.java index d9984e13a1..64406fe48c 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteChecker.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteChecker.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin.internal; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.plugin.MavenPluginPrerequisitesChecker; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.codehaus.plexus.util.StringUtils; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginMavenPrerequisiteChecker.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginMavenPrerequisiteChecker.java index d350e4bc86..fbe23cc9b0 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginMavenPrerequisiteChecker.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginMavenPrerequisiteChecker.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin.internal; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.plugin.MavenPluginPrerequisitesChecker; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.rtinfo.RuntimeInformation; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginValidator.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginValidator.java index 86e79d1023..5333c560ae 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginValidator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginValidator.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin.internal; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.descriptor.PluginDescriptor; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/MojoLogWrapper.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/MojoLogWrapper.java index 2b8b4bbe30..72b198b9ef 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/MojoLogWrapper.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/MojoLogWrapper.java @@ -18,11 +18,11 @@ */ package org.apache.maven.plugin.internal; -import static java.util.Objects.requireNonNull; - import org.apache.maven.plugin.logging.Log; import org.slf4j.Logger; +import static java.util.Objects.requireNonNull; + /** * @author jdcasey */ diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java index d76f603447..0f865df277 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin.internal; import java.util.List; + import org.apache.maven.model.Plugin; import org.apache.maven.plugin.PluginResolutionException; import org.eclipse.aether.RepositorySystemSession; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/ReadOnlyPluginParametersValidator.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/ReadOnlyPluginParametersValidator.java index 07f0325a70..c90ac8bc15 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/ReadOnlyPluginParametersValidator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/ReadOnlyPluginParametersValidator.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java index a4f4f4a04e..e4f069b523 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java @@ -21,6 +21,7 @@ package org.apache.maven.plugin.internal; import java.util.Collection; import java.util.HashMap; import java.util.Map; + import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; import org.codehaus.plexus.component.configurator.ConfigurationListener; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java index 8113eb5f82..8cbcde8790 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin.prefix; import java.util.Collections; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Model; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java index 9a6d7e363e..6dc620b987 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin.prefix; import java.util.List; + import org.eclipse.aether.repository.LocalRepository; import org.eclipse.aether.repository.RemoteRepository; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java index 93bd47a800..e3d60db7ad 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin.prefix; import java.util.List; + import org.apache.maven.model.Model; import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.repository.RemoteRepository; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java index 9e24594ee3..674cfe4d49 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java @@ -18,14 +18,16 @@ */ package org.apache.maven.plugin.prefix.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.io.MetadataReader; import org.apache.maven.model.Build; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java index af46eb18dd..359ae08470 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin.version; import java.util.Collections; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java index 4819de9857..5651832d9f 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin.version; import java.util.List; + import org.apache.maven.model.Model; import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.repository.RemoteRepository; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java index bec5137b89..c9ad161ffc 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin.version; import java.util.List; + import org.eclipse.aether.repository.LocalRepository; import org.eclipse.aether.repository.RemoteRepository; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java index 961310141f..2b645bbb09 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java @@ -18,6 +18,10 @@ */ package org.apache.maven.plugin.version.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.util.ArrayList; import java.util.Collections; @@ -28,9 +32,7 @@ import java.util.Objects; import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.Versioning; import org.apache.maven.artifact.repository.metadata.io.MetadataReader; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java index 91bee14357..9e1525ea51 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.IdentityHashMap; import java.util.List; import java.util.Map; + import org.eclipse.aether.graph.Dependency; import org.eclipse.aether.graph.DependencyNode; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java index 3d034e68c3..b5ee23b4e8 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java @@ -18,11 +18,13 @@ */ package org.apache.maven.project; -import java.io.File; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; +import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java index f7c8357d9f..13f9147127 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java @@ -20,6 +20,7 @@ package org.apache.maven.project; import java.util.List; import java.util.Objects; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Model; import org.apache.maven.model.building.AbstractModelBuildingListener; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java index efc9311d01..5bb9dab0f2 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java @@ -18,6 +18,10 @@ */ package org.apache.maven.project; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.util.AbstractMap; @@ -32,9 +36,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.InvalidArtifactRTException; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java index 60797d8fda..92cbd259f2 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java @@ -18,6 +18,10 @@ */ package org.apache.maven.project; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -27,9 +31,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.InvalidRepositoryException; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java index 872c15b86a..8f18435478 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java @@ -23,6 +23,7 @@ import java.util.Date; import java.util.List; import java.util.Objects; import java.util.Properties; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Profile; import org.apache.maven.model.building.ModelBuildingRequest; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingResult.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingResult.java index 199237bf92..375777ccc2 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingResult.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingResult.java @@ -21,6 +21,7 @@ package org.apache.maven.project; import java.io.File; import java.util.Collections; import java.util.List; + import org.apache.maven.model.building.ModelProblem; /** diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java index aa69f0123a..0a8665dc29 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java @@ -18,14 +18,16 @@ */ package org.apache.maven.project; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Dependency; diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java index 8840d6f946..eff2288bcd 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java @@ -18,13 +18,15 @@ */ package org.apache.maven.project; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Named; -import javax.inject.Singleton; + import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.classworlds.realm.NoSuchRealmException; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; diff --git a/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java b/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java index a900c04a5f..d8083a3098 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java +++ b/maven-core/src/main/java/org/apache/maven/project/DependencyResolutionResult.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.util.List; + import org.eclipse.aether.graph.Dependency; import org.eclipse.aether.graph.DependencyNode; diff --git a/maven-core/src/main/java/org/apache/maven/project/ExtensionDescriptorBuilder.java b/maven-core/src/main/java/org/apache/maven/project/ExtensionDescriptorBuilder.java index 963555ca3f..8f33fc9b66 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ExtensionDescriptorBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/project/ExtensionDescriptorBuilder.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.List; import java.util.jar.JarFile; import java.util.zip.ZipEntry; + import org.apache.maven.api.xml.Dom; import org.apache.maven.internal.xml.Xpp3DomBuilder; import org.codehaus.plexus.util.ReaderFactory; diff --git a/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java b/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java index e0689353c1..07613e7d29 100644 --- a/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java +++ b/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.io.File; + import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; /** diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java index cbbbfd180d..b024001bf1 100644 --- a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java +++ b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java @@ -31,6 +31,7 @@ import java.util.Map; import java.util.Objects; import java.util.Properties; import java.util.Set; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java index 1b1a173718..8c71c4853b 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java @@ -20,6 +20,7 @@ package org.apache.maven.project; import java.io.File; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.model.building.ModelSource; diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingHelper.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingHelper.java index efbdd3ffe6..f0545487df 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingHelper.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingHelper.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.util.List; + import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Model; diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java index 23f3838a81..7d3cae86af 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java @@ -21,6 +21,7 @@ package org.apache.maven.project; import java.util.Date; import java.util.List; import java.util.Properties; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Profile; import org.eclipse.aether.RepositorySystemSession; diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingResult.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingResult.java index 77e957ef7b..4be11f3e84 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingResult.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingResult.java @@ -20,6 +20,7 @@ package org.apache.maven.project; import java.io.File; import java.util.List; + import org.apache.maven.model.building.ModelProblem; /** diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java b/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java index a9e6b25185..3ca2152927 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java @@ -25,6 +25,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; + import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Parent; import org.apache.maven.api.model.Repository; diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java b/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java index 99a10aa034..241c860955 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.util.List; + import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.eclipse.aether.graph.DependencyFilter; diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java index 9b69339586..070c6a5d15 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Extension; diff --git a/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java b/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java index 476132df44..305ec24ca3 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java +++ b/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java @@ -26,6 +26,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Objects; import java.util.Set; + import org.apache.maven.model.Model; /** diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java index be93dee2f7..4c5400bbe5 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java @@ -21,6 +21,7 @@ package org.apache.maven.project.artifact; import java.io.File; import java.util.Collection; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.metadata.ArtifactMetadata; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java index 92543e42cc..01806cae22 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java @@ -19,6 +19,7 @@ package org.apache.maven.project.artifact; import java.util.List; + import org.apache.maven.model.Dependency; /** diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java index 10a7d92920..aa6a36c252 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/AttachedArtifact.java @@ -21,6 +21,7 @@ package org.apache.maven.project.artifact; import java.util.Collection; import java.util.Collections; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.InvalidArtifactRTException; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java index 61913ac7f9..8141cc1492 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java @@ -18,6 +18,9 @@ */ package org.apache.maven.project.artifact; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.ArrayList; import java.util.Iterator; @@ -28,8 +31,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.artifact.metadata.ResolutionGroup; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMetadataSource.java b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMetadataSource.java index 57d3c9d307..566dcb7407 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMetadataSource.java @@ -21,6 +21,7 @@ package org.apache.maven.project.artifact; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager; import org.apache.maven.plugin.LegacySupport; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java index a13c057d84..4a2dd69e06 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java @@ -18,6 +18,9 @@ */ package org.apache.maven.project.artifact; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -28,8 +31,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.lifecycle.LifecycleExecutionException; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/InvalidDependencyVersionException.java b/maven-core/src/main/java/org/apache/maven/project/artifact/InvalidDependencyVersionException.java index a214e2631d..1584938970 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/InvalidDependencyVersionException.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/InvalidDependencyVersionException.java @@ -19,6 +19,7 @@ package org.apache.maven.project.artifact; import java.io.File; + import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; import org.apache.maven.model.Dependency; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java index 1b98b0749b..8b759dbcbe 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java @@ -19,6 +19,7 @@ package org.apache.maven.project.artifact; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ResolutionGroup; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java index aa86eaede7..3b8023d448 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java @@ -18,6 +18,10 @@ */ package org.apache.maven.project.artifact; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.ArrayList; import java.util.Arrays; @@ -30,9 +34,7 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java index 64deee8e23..d5bb916664 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java @@ -20,6 +20,7 @@ package org.apache.maven.project.artifact; import java.util.Collections; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.handler.ArtifactHandler; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java index 8225e6b7fc..8d75eb76c5 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java @@ -20,6 +20,7 @@ package org.apache.maven.project.artifact; import java.util.Collections; import java.util.List; + import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.model.Dependency; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMetadata.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMetadata.java index ec508224d1..4071681424 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMetadata.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMetadata.java @@ -20,6 +20,7 @@ package org.apache.maven.project.artifact; import java.io.File; import java.io.IOException; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.AbstractArtifactMetadata; import org.apache.maven.artifact.metadata.ArtifactMetadata; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java index 1b49e806ef..025800698c 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java @@ -20,6 +20,7 @@ package org.apache.maven.project.artifact; import java.util.Collection; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.lifecycle.LifecycleExecutionException; import org.apache.maven.project.MavenProject; diff --git a/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java b/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java index a6b6fa81e8..98bd09b2ce 100644 --- a/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java +++ b/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java @@ -18,12 +18,14 @@ */ package org.apache.maven.project.collector; -import java.io.File; -import java.util.ArrayList; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.model.building.ModelProblem; import org.apache.maven.model.building.ModelProblemUtils; diff --git a/maven-core/src/main/java/org/apache/maven/project/collector/MultiModuleCollectionStrategy.java b/maven-core/src/main/java/org/apache/maven/project/collector/MultiModuleCollectionStrategy.java index 23dc3e2895..fa38120f49 100644 --- a/maven-core/src/main/java/org/apache/maven/project/collector/MultiModuleCollectionStrategy.java +++ b/maven-core/src/main/java/org/apache/maven/project/collector/MultiModuleCollectionStrategy.java @@ -18,15 +18,17 @@ */ package org.apache.maven.project.collector; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.function.Predicate; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.model.Plugin; import org.apache.maven.model.building.ModelProblem; diff --git a/maven-core/src/main/java/org/apache/maven/project/collector/PomlessCollectionStrategy.java b/maven-core/src/main/java/org/apache/maven/project/collector/PomlessCollectionStrategy.java index 44a8e9c149..bae54f3a5c 100644 --- a/maven-core/src/main/java/org/apache/maven/project/collector/PomlessCollectionStrategy.java +++ b/maven-core/src/main/java/org/apache/maven/project/collector/PomlessCollectionStrategy.java @@ -18,11 +18,13 @@ */ package org.apache.maven.project.collector; -import java.util.Arrays; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Arrays; +import java.util.List; + import org.apache.maven.DefaultMaven; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.model.building.ModelSource; diff --git a/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java b/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java index c377eeb04e..d9bc2f16d7 100644 --- a/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java +++ b/maven-core/src/main/java/org/apache/maven/project/collector/ProjectCollectionStrategy.java @@ -19,6 +19,7 @@ package org.apache.maven.project.collector; import java.util.List; + import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuildingException; diff --git a/maven-core/src/main/java/org/apache/maven/project/collector/ProjectsSelector.java b/maven-core/src/main/java/org/apache/maven/project/collector/ProjectsSelector.java index 2cc7b846bf..74425f9149 100644 --- a/maven-core/src/main/java/org/apache/maven/project/collector/ProjectsSelector.java +++ b/maven-core/src/main/java/org/apache/maven/project/collector/ProjectsSelector.java @@ -20,6 +20,7 @@ package org.apache.maven.project.collector; import java.io.File; import java.util.List; + import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuildingException; diff --git a/maven-core/src/main/java/org/apache/maven/project/collector/RequestPomCollectionStrategy.java b/maven-core/src/main/java/org/apache/maven/project/collector/RequestPomCollectionStrategy.java index c3436f02a0..8ba724e8f1 100644 --- a/maven-core/src/main/java/org/apache/maven/project/collector/RequestPomCollectionStrategy.java +++ b/maven-core/src/main/java/org/apache/maven/project/collector/RequestPomCollectionStrategy.java @@ -18,12 +18,14 @@ */ package org.apache.maven.project.collector; -import java.io.File; -import java.util.Collections; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; +import java.util.Collections; +import java.util.List; + import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuildingException; diff --git a/maven-core/src/main/java/org/apache/maven/project/path/PathTranslator.java b/maven-core/src/main/java/org/apache/maven/project/path/PathTranslator.java index 8afcb93710..c32041af17 100644 --- a/maven-core/src/main/java/org/apache/maven/project/path/PathTranslator.java +++ b/maven-core/src/main/java/org/apache/maven/project/path/PathTranslator.java @@ -19,6 +19,7 @@ package org.apache.maven.project.path; import java.io.File; + import org.apache.maven.model.Model; /** diff --git a/maven-core/src/main/java/org/apache/maven/properties/internal/EnvironmentUtils.java b/maven-core/src/main/java/org/apache/maven/properties/internal/EnvironmentUtils.java index ddbd366241..a8fb0761f1 100644 --- a/maven-core/src/main/java/org/apache/maven/properties/internal/EnvironmentUtils.java +++ b/maven-core/src/main/java/org/apache/maven/properties/internal/EnvironmentUtils.java @@ -21,6 +21,7 @@ package org.apache.maven.properties.internal; import java.util.Locale; import java.util.Map; import java.util.Properties; + import org.codehaus.plexus.util.Os; /** diff --git a/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java index e30b5a3756..306d61230b 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java +++ b/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java index 5c0f89a8e9..ede7f869c4 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java +++ b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java @@ -20,6 +20,7 @@ package org.apache.maven.repository; import java.io.File; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java index 2ef71a17f7..be6db47d9e 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ArtifactMetadataSource.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.metadata; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.versioning.ArtifactVersion; diff --git a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java index 6356b7889d..58921df5cd 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.metadata; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.DefaultRepositoryRequest; diff --git a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/MetadataResolutionRequest.java b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/MetadataResolutionRequest.java index 734de97bd0..bb4c8705e6 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/MetadataResolutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/MetadataResolutionRequest.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.legacy.metadata; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.RepositoryRequest; diff --git a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java index ef51f63eea..5e4290535c 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java +++ b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.legacy.metadata; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; diff --git a/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java b/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java index 3593aefd04..ac5d18d7c3 100644 --- a/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java +++ b/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java @@ -18,12 +18,14 @@ */ package org.apache.maven.rtinfo.internal; -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.maven.rtinfo.RuntimeInformation; diff --git a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java index 546cc980e0..320ab1a3a8 100644 --- a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java +++ b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java @@ -18,16 +18,17 @@ */ package org.apache.maven.session.scope.internal; -import com.google.inject.Key; -import com.google.inject.OutOfScopeException; -import com.google.inject.Provider; -import com.google.inject.Scope; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; +import com.google.inject.Key; +import com.google.inject.OutOfScopeException; +import com.google.inject.Provider; +import com.google.inject.Scope; + /** * SessionScope */ diff --git a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java index f2c2e00437..a677f09d28 100644 --- a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java +++ b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java @@ -18,9 +18,10 @@ */ package org.apache.maven.session.scope.internal; -import com.google.inject.AbstractModule; import javax.inject.Inject; import javax.inject.Named; + +import com.google.inject.AbstractModule; import org.apache.maven.SessionScoped; import org.apache.maven.api.Session; import org.apache.maven.execution.MavenSession; diff --git a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java index 997b61bec8..30bec8ab51 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java @@ -18,11 +18,13 @@ */ package org.apache.maven.settings; -import java.io.File; -import java.io.IOException; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; +import java.io.IOException; + import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.properties.internal.SystemProperties; import org.apache.maven.settings.building.DefaultSettingsBuildingRequest; diff --git a/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java index 36d512d90e..391719dd81 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java @@ -20,6 +20,7 @@ package org.apache.maven.settings; import java.io.File; import java.io.IOException; + import org.apache.maven.execution.MavenExecutionRequest; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-core/src/main/java/org/apache/maven/settings/SettingsUtilsV4.java b/maven-core/src/main/java/org/apache/maven/settings/SettingsUtilsV4.java index d271decb5c..fe8904deab 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/SettingsUtilsV4.java +++ b/maven-core/src/main/java/org/apache/maven/settings/SettingsUtilsV4.java @@ -41,6 +41,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; + import org.apache.maven.api.model.ActivationFile; import org.apache.maven.api.settings.Activation; import org.apache.maven.api.settings.ActivationOS; diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java index ce93dfe7b7..8453b4e7af 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java @@ -23,6 +23,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Objects; import java.util.Properties; + import org.apache.maven.toolchain.model.ToolchainModel; import org.slf4j.Logger; diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java index b6cc966efd..69331728f7 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java @@ -18,16 +18,16 @@ */ package org.apache.maven.toolchain; -import static java.util.Objects.requireNonNull; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.project.MavenProject; @@ -35,6 +35,8 @@ import org.apache.maven.toolchain.model.ToolchainModel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static java.util.Objects.requireNonNull; + /** * @author mkleint */ diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivate.java b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivate.java index 28e382d3ce..967f89e779 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivate.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivate.java @@ -18,12 +18,14 @@ */ package org.apache.maven.toolchain; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + import org.apache.maven.api.toolchain.ToolchainModel; import org.apache.maven.execution.MavenSession; import org.slf4j.Logger; diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainsBuilder.java b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainsBuilder.java index e4e1f75999..848d78b27c 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainsBuilder.java @@ -18,10 +18,12 @@ */ package org.apache.maven.toolchain; -import java.io.File; -import java.io.Reader; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; +import java.io.Reader; + import org.apache.maven.toolchain.model.PersistedToolchains; import org.apache.maven.toolchain.v4.MavenToolchainsXpp3Reader; import org.codehaus.plexus.util.ReaderFactory; diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java index ddd0adfd65..e760b6b9a4 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java @@ -20,6 +20,7 @@ package org.apache.maven.toolchain; import java.util.List; import java.util.Map; + import org.apache.maven.execution.MavenSession; /** diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java index 53760b6c95..800ab24192 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java @@ -19,6 +19,7 @@ package org.apache.maven.toolchain; import java.util.Map; + import org.apache.maven.toolchain.model.ToolchainModel; /** diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainsBuilder.java b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainsBuilder.java index 9f416ce450..43adef4d24 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainsBuilder.java @@ -19,6 +19,7 @@ package org.apache.maven.toolchain; import java.io.File; + import org.apache.maven.toolchain.model.PersistedToolchains; /** diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java b/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java index f8eb2bd192..7e8a5ce991 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java @@ -18,11 +18,13 @@ */ package org.apache.maven.toolchain.java; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.Map.Entry; import java.util.Properties; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.toolchain.MisconfiguredToolchainException; import org.apache.maven.toolchain.RequirementMatcher; import org.apache.maven.toolchain.RequirementMatcherFactory; diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainImpl.java b/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainImpl.java index 1565f187f3..4532fa3df9 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainImpl.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainImpl.java @@ -19,6 +19,7 @@ package org.apache.maven.toolchain.java; import java.io.File; + import org.apache.maven.toolchain.DefaultToolchain; import org.apache.maven.toolchain.model.ToolchainModel; import org.codehaus.plexus.util.FileUtils; diff --git a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java index cc25834e3f..720729582f 100644 --- a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java +++ b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java @@ -18,14 +18,14 @@ */ package org.apache.maven; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import javax.inject.Inject; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; -import javax.inject.Inject; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.repository.ArtifactRepository; @@ -54,6 +54,8 @@ import org.eclipse.aether.internal.impl.DefaultRepositorySystem; import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory; import org.eclipse.aether.repository.LocalRepository; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; + @PlexusTest public abstract class AbstractCoreMavenComponentTestCase { diff --git a/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java b/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java index 0b9fe0b30c..97c2056295 100644 --- a/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java +++ b/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java @@ -18,17 +18,14 @@ */ package org.apache.maven; -import static java.util.Arrays.asList; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.nio.file.Files; import java.util.concurrent.atomic.AtomicReference; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.execution.MavenExecutionRequest; @@ -39,6 +36,11 @@ import org.apache.maven.project.MavenProjectHelper; import org.apache.maven.repository.internal.MavenWorkspaceReader; import org.junit.jupiter.api.Test; +import static java.util.Arrays.asList; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class DefaultMavenTest extends AbstractCoreMavenComponentTestCase { @Singleton @Named("WsrClassCatcher") diff --git a/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java b/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java index 9297c46d56..8d79489f56 100644 --- a/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java +++ b/maven-core/src/test/java/org/apache/maven/MavenLifecycleParticipantTest.java @@ -18,14 +18,12 @@ */ package org.apache.maven; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; - import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.execution.MavenExecutionResult; @@ -36,6 +34,9 @@ import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.component.repository.ComponentDescriptor; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; + public class MavenLifecycleParticipantTest extends AbstractCoreMavenComponentTestCase { private static final String INJECTED_ARTIFACT_ID = "injected"; diff --git a/maven-core/src/test/java/org/apache/maven/MavenTest.java b/maven-core/src/test/java/org/apache/maven/MavenTest.java index d9b5cdad0c..920f401133 100644 --- a/maven-core/src/test/java/org/apache/maven/MavenTest.java +++ b/maven-core/src/test/java/org/apache/maven/MavenTest.java @@ -19,6 +19,7 @@ package org.apache.maven; import javax.inject.Inject; + import org.apache.maven.exception.ExceptionHandler; import org.junit.jupiter.api.Test; diff --git a/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java b/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java index ab9ef97fec..81a648dfea 100644 --- a/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java +++ b/maven-core/src/test/java/org/apache/maven/ProjectDependenciesResolverTest.java @@ -18,22 +18,24 @@ */ package org.apache.maven; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.endsWith; -import static org.junit.jupiter.api.Assertions.assertEquals; +import javax.inject.Inject; import java.io.File; import java.util.Collections; import java.util.List; import java.util.Properties; import java.util.Set; -import javax.inject.Inject; + import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.endsWith; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class ProjectDependenciesResolverTest extends AbstractCoreMavenComponentTestCase { @Inject private ProjectDependenciesResolver resolver; diff --git a/maven-core/src/test/java/org/apache/maven/artifact/handler/ArtifactHandlerTest.java b/maven-core/src/test/java/org/apache/maven/artifact/handler/ArtifactHandlerTest.java index 055f1f471c..5d64c32ef4 100644 --- a/maven-core/src/test/java/org/apache/maven/artifact/handler/ArtifactHandlerTest.java +++ b/maven-core/src/test/java/org/apache/maven/artifact/handler/ArtifactHandlerTest.java @@ -18,17 +18,19 @@ */ package org.apache.maven.artifact.handler; -import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; -import static org.junit.jupiter.api.Assertions.assertEquals; +import javax.inject.Inject; import java.io.File; import java.util.List; -import javax.inject.Inject; + import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.testing.PlexusTest; import org.codehaus.plexus.util.FileUtils; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; +import static org.junit.jupiter.api.Assertions.assertEquals; + @PlexusTest public class ArtifactHandlerTest { @Inject diff --git a/maven-core/src/test/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilterTest.java b/maven-core/src/test/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilterTest.java index 040c804d5a..480e83bffb 100644 --- a/maven-core/src/test/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilterTest.java +++ b/maven-core/src/test/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilterTest.java @@ -18,18 +18,19 @@ */ package org.apache.maven.artifact.resolver.filter; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - import java.util.Arrays; import java.util.Collections; + import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Exclusion; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + public class ExclusionArtifactFilterTest { private Artifact artifact; diff --git a/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorPathTest.java b/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorPathTest.java index 878e2c5077..fae3aafca8 100644 --- a/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorPathTest.java +++ b/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorPathTest.java @@ -18,13 +18,12 @@ */ package org.apache.maven.configuration; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.File; import java.io.IOException; import java.io.StringReader; import java.nio.file.Path; import java.nio.file.Paths; + import org.apache.maven.configuration.internal.DefaultBeanConfigurator; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.Xpp3DomBuilder; @@ -33,6 +32,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Benjamin Bentmann */ diff --git a/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorTest.java b/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorTest.java index 9da160012c..9c27076cc9 100644 --- a/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorTest.java +++ b/maven-core/src/test/java/org/apache/maven/configuration/DefaultBeanConfiguratorTest.java @@ -18,11 +18,10 @@ */ package org.apache.maven.configuration; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.File; import java.io.IOException; import java.io.StringReader; + import org.apache.maven.configuration.internal.DefaultBeanConfigurator; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.Xpp3DomBuilder; @@ -31,6 +30,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Benjamin Bentmann */ diff --git a/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java b/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java index aa21d77a8c..a3b78ca9f5 100644 --- a/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java +++ b/maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java @@ -18,10 +18,9 @@ */ package org.apache.maven.exception; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.IOException; import java.net.ConnectException; + import org.apache.maven.model.Plugin; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.MojoExecutionException; @@ -31,6 +30,8 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Barrie Treloar */ diff --git a/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzerTest.java b/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzerTest.java index d08943f4d4..bfba1d6e4f 100644 --- a/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzerTest.java +++ b/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionAnalyzerTest.java @@ -18,18 +18,19 @@ */ package org.apache.maven.execution; -import static java.util.Arrays.asList; -import static java.util.Collections.singletonList; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; - import java.util.Optional; + import org.apache.maven.lifecycle.LifecycleExecutionException; import org.apache.maven.model.Dependency; import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static java.util.Arrays.asList; +import static java.util.Collections.singletonList; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + public class DefaultBuildResumptionAnalyzerTest { private final DefaultBuildResumptionAnalyzer analyzer = new DefaultBuildResumptionAnalyzer(); diff --git a/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionDataRepositoryTest.java b/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionDataRepositoryTest.java index 05fd948bf2..e3be3c0cb6 100644 --- a/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionDataRepositoryTest.java +++ b/maven-core/src/test/java/org/apache/maven/execution/DefaultBuildResumptionDataRepositoryTest.java @@ -18,19 +18,20 @@ */ package org.apache.maven.execution; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import org.apache.maven.model.Build; +import org.apache.maven.project.MavenProject; +import org.junit.jupiter.api.Test; + import static java.util.Collections.singleton; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.is; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; -import org.apache.maven.model.Build; -import org.apache.maven.project.MavenProject; -import org.junit.jupiter.api.Test; - public class DefaultBuildResumptionDataRepositoryTest { private final DefaultBuildResumptionDataRepository repository = new DefaultBuildResumptionDataRepository(); diff --git a/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulatorTest.java b/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulatorTest.java index 804ff52358..4bf14d409c 100644 --- a/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulatorTest.java @@ -18,10 +18,10 @@ */ package org.apache.maven.execution; -import static org.junit.jupiter.api.Assertions.assertEquals; +import javax.inject.Inject; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.settings.Profile; import org.apache.maven.settings.Repository; @@ -29,6 +29,8 @@ import org.apache.maven.settings.Settings; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + @PlexusTest public class DefaultMavenExecutionRequestPopulatorTest { @Inject diff --git a/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionTest.java b/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionTest.java index e07d1b9ddc..f58efc44d4 100644 --- a/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionTest.java +++ b/maven-core/src/test/java/org/apache/maven/execution/DefaultMavenExecutionTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.execution; +import java.util.List; + +import org.apache.maven.project.MavenProject; +import org.junit.jupiter.api.Test; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNotSame; -import java.util.List; -import org.apache.maven.project.MavenProject; -import org.junit.jupiter.api.Test; - /** * @author Benjamin Bentmann */ diff --git a/maven-core/src/test/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeTest.java b/maven-core/src/test/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeTest.java index c5787d5729..27f3abb6a5 100644 --- a/maven-core/src/test/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeTest.java +++ b/maven-core/src/test/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.execution.scope.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertSame; -import static org.junit.jupiter.api.Assertions.assertThrows; +import java.util.concurrent.atomic.AtomicInteger; import com.google.inject.Key; -import java.util.concurrent.atomic.AtomicInteger; import org.apache.maven.execution.MojoExecutionEvent; import org.apache.maven.execution.scope.WeakMojoExecutionListener; import org.apache.maven.plugin.MojoExecutionException; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; + public class MojoExecutionScopeTest { @Test public void testNestedEnter() throws Exception { diff --git a/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java b/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java index 5744ab74cf..119e50cfcd 100644 --- a/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java @@ -18,22 +18,6 @@ */ package org.apache.maven.graph; -import static java.util.Arrays.asList; -import static java.util.Collections.emptyList; -import static java.util.Collections.singletonList; -import static java.util.function.Function.identity; -import static java.util.stream.Collectors.toList; -import static org.apache.maven.execution.MavenExecutionRequest.REACTOR_MAKE_DOWNSTREAM; -import static org.apache.maven.execution.MavenExecutionRequest.REACTOR_MAKE_UPSTREAM; -import static org.apache.maven.graph.DefaultGraphBuilderTest.ScenarioBuilder.scenario; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyBoolean; -import static org.mockito.ArgumentMatchers.anyList; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; @@ -42,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.maven.MavenExecutionException; import org.apache.maven.execution.BuildResumptionDataRepository; import org.apache.maven.execution.MavenExecutionRequest; @@ -68,6 +53,22 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import static java.util.Arrays.asList; +import static java.util.Collections.emptyList; +import static java.util.Collections.singletonList; +import static java.util.function.Function.identity; +import static java.util.stream.Collectors.toList; +import static org.apache.maven.execution.MavenExecutionRequest.REACTOR_MAKE_DOWNSTREAM; +import static org.apache.maven.execution.MavenExecutionRequest.REACTOR_MAKE_UPSTREAM; +import static org.apache.maven.graph.DefaultGraphBuilderTest.ScenarioBuilder.scenario; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyList; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + class DefaultGraphBuilderTest { /* The multi-module structure in this project is displayed as follows: diff --git a/maven-core/src/test/java/org/apache/maven/graph/DefaultProjectDependencyGraphTest.java b/maven-core/src/test/java/org/apache/maven/graph/DefaultProjectDependencyGraphTest.java index 04d3c0886a..e132833968 100644 --- a/maven-core/src/test/java/org/apache/maven/graph/DefaultProjectDependencyGraphTest.java +++ b/maven-core/src/test/java/org/apache/maven/graph/DefaultProjectDependencyGraphTest.java @@ -18,10 +18,9 @@ */ package org.apache.maven.graph; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.Arrays; import java.util.List; + import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.model.Dependency; import org.apache.maven.project.DuplicateProjectException; @@ -29,6 +28,8 @@ import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.dag.CycleDetectedException; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/graph/ProjectSelectorTest.java b/maven-core/src/test/java/org/apache/maven/graph/ProjectSelectorTest.java index 02cc39f6dc..2cdeac39b8 100644 --- a/maven-core/src/test/java/org/apache/maven/graph/ProjectSelectorTest.java +++ b/maven-core/src/test/java/org/apache/maven/graph/ProjectSelectorTest.java @@ -18,6 +18,23 @@ */ package org.apache.maven.graph; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.apache.maven.MavenExecutionException; +import org.apache.maven.execution.MavenExecutionRequest; +import org.apache.maven.project.MavenProject; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EmptySource; +import org.junit.jupiter.params.provider.ValueSource; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; @@ -28,22 +45,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.apache.maven.MavenExecutionException; -import org.apache.maven.execution.MavenExecutionRequest; -import org.apache.maven.project.MavenProject; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.EmptySource; -import org.junit.jupiter.params.provider.ValueSource; - class ProjectSelectorTest { private final ProjectSelector sut = new ProjectSelector(); private final MavenExecutionRequest mavenExecutionRequest = mock(MavenExecutionRequest.class); diff --git a/maven-core/src/test/java/org/apache/maven/internal/MultilineMessageHelperTest.java b/maven-core/src/test/java/org/apache/maven/internal/MultilineMessageHelperTest.java index 68d56ad343..7b922a8438 100644 --- a/maven-core/src/test/java/org/apache/maven/internal/MultilineMessageHelperTest.java +++ b/maven-core/src/test/java/org/apache/maven/internal/MultilineMessageHelperTest.java @@ -18,12 +18,13 @@ */ package org.apache.maven.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.ArrayList; import java.util.List; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class MultilineMessageHelperTest { @Test diff --git a/maven-core/src/test/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformerTest.java b/maven-core/src/test/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformerTest.java index 0fe6adbe62..457cbed267 100644 --- a/maven-core/src/test/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformerTest.java +++ b/maven-core/src/test/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformerTest.java @@ -22,6 +22,7 @@ import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; + import org.apache.maven.model.Model; import org.apache.maven.model.building.TransformerContext; import org.junit.jupiter.api.Test; diff --git a/maven-core/src/test/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListenerTest.java b/maven-core/src/test/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListenerTest.java index f7e68beba6..d8c4033d3d 100644 --- a/maven-core/src/test/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListenerTest.java +++ b/maven-core/src/test/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListenerTest.java @@ -18,14 +18,8 @@ */ package org.apache.maven.internal.aether; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.hamcrest.CoreMatchers.sameInstance; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - import java.io.File; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.RequestTrace; import org.eclipse.aether.artifact.Artifact; @@ -33,6 +27,13 @@ import org.eclipse.aether.collection.CollectStepData; import org.eclipse.aether.repository.LocalRepository; import org.junit.jupiter.api.Test; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.CoreMatchers.sameInstance; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + /** * UT for {@link ReverseTreeRepositoryListener}. */ diff --git a/maven-core/src/test/java/org/apache/maven/internal/impl/PropertiesAsMapTest.java b/maven-core/src/test/java/org/apache/maven/internal/impl/PropertiesAsMapTest.java index 914d6d5b92..2a0003d8c0 100644 --- a/maven-core/src/test/java/org/apache/maven/internal/impl/PropertiesAsMapTest.java +++ b/maven-core/src/test/java/org/apache/maven/internal/impl/PropertiesAsMapTest.java @@ -18,19 +18,20 @@ */ package org.apache.maven.internal.impl; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.util.Iterator; import java.util.Map.Entry; import java.util.NoSuchElementException; import java.util.Properties; import java.util.Set; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class PropertiesAsMapTest { @Test diff --git a/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java b/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java index 31a36dbf89..121a9a59c4 100644 --- a/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java +++ b/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java @@ -18,13 +18,12 @@ */ package org.apache.maven.internal.impl; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.nio.file.Path; import java.util.Collections; import java.util.Optional; -import javax.inject.Inject; + import org.apache.maven.api.Artifact; import org.apache.maven.api.ArtifactCoordinate; import org.apache.maven.api.Node; @@ -52,6 +51,9 @@ import org.eclipse.aether.repository.RemoteRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + @PlexusTest public class TestApi { diff --git a/maven-core/src/test/java/org/apache/maven/internal/impl/TestRepositorySystem.java b/maven-core/src/test/java/org/apache/maven/internal/impl/TestRepositorySystem.java index 856fb828b0..f34eb51e60 100644 --- a/maven-core/src/test/java/org/apache/maven/internal/impl/TestRepositorySystem.java +++ b/maven-core/src/test/java/org/apache/maven/internal/impl/TestRepositorySystem.java @@ -18,15 +18,17 @@ */ package org.apache.maven.internal.impl; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Model; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/DefaultLifecyclesTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/DefaultLifecyclesTest.java index e820c36488..16f3cb26c5 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/DefaultLifecyclesTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/DefaultLifecyclesTest.java @@ -18,12 +18,7 @@ */ package org.apache.maven.lifecycle; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.arrayWithSize; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import javax.inject.Inject; import java.util.ArrayList; import java.util.Arrays; @@ -31,12 +26,19 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.inject.Inject; + import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.arrayWithSize; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingMojoExecutionListener.java b/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingMojoExecutionListener.java index 9c7a742d0c..843938f5a3 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingMojoExecutionListener.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingMojoExecutionListener.java @@ -18,10 +18,12 @@ */ package org.apache.maven.lifecycle; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + import org.apache.maven.execution.MojoExecutionEvent; import org.apache.maven.execution.MojoExecutionListener; import org.apache.maven.plugin.MojoExecutionException; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingProjectExecutionListener.java b/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingProjectExecutionListener.java index b0b192e7cf..d90c373340 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingProjectExecutionListener.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/DelegatingProjectExecutionListener.java @@ -18,10 +18,12 @@ */ package org.apache.maven.lifecycle; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + import org.apache.maven.execution.ProjectExecutionEvent; import org.apache.maven.execution.ProjectExecutionListener; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java b/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java index 3e0242f4de..ff43d78389 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java @@ -21,6 +21,7 @@ package org.apache.maven.lifecycle; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; + import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginExecution; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java index cbf48525bd..1758cd740d 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorSubModulesTest.java @@ -18,9 +18,8 @@ */ package org.apache.maven.lifecycle; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import javax.inject.Inject; + import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.exception.ExceptionHandler; import org.apache.maven.lifecycle.internal.LifecycleDependencyResolver; @@ -30,6 +29,8 @@ import org.apache.maven.lifecycle.internal.LifecycleTaskSegmentCalculator; import org.apache.maven.lifecycle.internal.MojoExecutor; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * Just asserts that it's able to create those components. Handy when CDI container gets a nervous breakdown. * diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java index 31698b09a4..9850860fe3 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java @@ -18,12 +18,7 @@ */ package org.apache.maven.lifecycle; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasSize; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; +import javax.inject.Inject; import java.io.File; import java.util.ArrayList; @@ -31,7 +26,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.api.xml.Dom; import org.apache.maven.execution.MavenSession; @@ -54,6 +49,13 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasSize; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + public class LifecycleExecutorTest extends AbstractCoreMavenComponentTestCase { @Inject private DefaultLifecycleExecutor lifecycleExecutor; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/MavenExecutionPlanTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/MavenExecutionPlanTest.java index d1dcd39448..28c15f6ada 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/MavenExecutionPlanTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/MavenExecutionPlanTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.lifecycle; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - import java.util.Set; + import org.apache.maven.lifecycle.internal.ExecutionPlanItem; import org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub; import org.apache.maven.model.Plugin; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java b/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java index 577579080d..73d53bea5b 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/MojoExecutionXPathContainer.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle; import java.io.IOException; import java.util.Iterator; + import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.jxpath.JXPathNotFoundException; import org.apache.commons.jxpath.ri.JXPathContextReferenceImpl; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java index f5e040ad2d..e08ae48abf 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/BuildListCalculatorTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.lifecycle.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertSame; - import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.stub.LifecycleTaskSegmentCalculatorStub; import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; + public class BuildListCalculatorTest { @Test diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java index 98248c1f1b..899505a92a 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ConcurrencyDependencyGraphTest.java @@ -18,16 +18,8 @@ */ package org.apache.maven.lifecycle.internal; -import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.A; -import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.B; -import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.C; -import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.X; -import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.Y; -import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.Z; -import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.getProjectBuildList; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.lifecycle.LifecycleNotFoundException; @@ -44,6 +36,15 @@ import org.apache.maven.plugin.version.PluginVersionResolutionException; import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.Test; +import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.A; +import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.B; +import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.C; +import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.X; +import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.Y; +import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.Z; +import static org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub.getProjectBuildList; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java index 5eeafb5dbc..d696e0f18a 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java @@ -18,8 +18,7 @@ */ package org.apache.maven.lifecycle.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; +import javax.inject.Inject; import java.io.File; import java.util.Collection; @@ -27,13 +26,16 @@ import java.util.Collections; import java.util.HashSet; import java.util.Properties; import java.util.Set; -import javax.inject.Inject; + import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + public class LifecycleDependencyResolverTest extends AbstractCoreMavenComponentTestCase { @Inject private LifecycleDependencyResolver resolver; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java index 2a9dc96423..8b7a64cb97 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleExecutionPlanCalculatorTest.java @@ -18,8 +18,6 @@ */ package org.apache.maven.lifecycle.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.MavenExecutionPlan; @@ -31,6 +29,8 @@ import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilderTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilderTest.java index 9c492a336d..abda9fddd9 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilderTest.java @@ -18,14 +18,13 @@ */ package org.apache.maven.lifecycle.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; +import javax.inject.Inject; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.execution.AbstractExecutionListener; import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.DefaultMavenExecutionResult; @@ -40,6 +39,9 @@ import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + @PlexusTest public class LifecycleModuleBuilderTest { @Inject diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculatorImplTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculatorImplTest.java index ce8d0454df..6270aeaab8 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculatorImplTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleTaskSegmentCalculatorImplTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.lifecycle.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.stub.LifecycleTaskSegmentCalculatorStub; import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java index c2410fa7d8..b402c5f1e3 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/PhaseRecorderTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.lifecycle.internal; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.util.List; + import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub; import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; import org.apache.maven.plugin.MojoExecution; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java index 85d25257b0..64d44c7bad 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/ProjectBuildListTest.java @@ -18,15 +18,15 @@ */ package org.apache.maven.lifecycle.internal; +import org.apache.maven.execution.MavenSession; +import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; +import org.junit.jupiter.api.Test; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; -import org.apache.maven.execution.MavenSession; -import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; -import org.junit.jupiter.api.Test; - /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/BuilderCommonTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/BuilderCommonTest.java index 66ab90ec3d..f6546e5309 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/BuilderCommonTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/BuilderCommonTest.java @@ -18,11 +18,8 @@ */ package org.apache.maven.lifecycle.internal.builder; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - import java.util.HashSet; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.MavenExecutionPlan; import org.apache.maven.lifecycle.internal.ExecutionEventCatapult; @@ -33,6 +30,10 @@ import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; import org.junit.jupiter.api.Test; import org.slf4j.Logger; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraphTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraphTest.java index 68427261a5..a1d3b770c3 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraphTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ConcurrencyDependencyGraphTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.lifecycle.internal.builder.multithreaded; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.List; import java.util.Set; + import org.apache.maven.execution.ProjectDependencyGraph; import org.apache.maven.lifecycle.internal.ProjectBuildList; import org.apache.maven.lifecycle.internal.stub.ProjectDependencyGraphStub; import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class ConcurrencyDependencyGraphTest { @Test diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxerTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxerTest.java index bda22526b3..7406ed1614 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxerTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxerTest.java @@ -18,8 +18,6 @@ */ package org.apache.maven.lifecycle.internal.builder.multithreaded; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.ArrayList; @@ -32,6 +30,7 @@ import java.util.concurrent.ExecutorCompletionService; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleNotFoundException; import org.apache.maven.lifecycle.LifecyclePhaseNotFoundException; @@ -47,6 +46,8 @@ import org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException; import org.apache.maven.plugin.version.PluginVersionResolutionException; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java index 3d6d0fa298..089cbbb97b 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/BuildPluginManagerStub.java @@ -19,6 +19,7 @@ package org.apache.maven.lifecycle.internal.stub; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.BuildPluginManager; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/CompletionServiceStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/CompletionServiceStub.java index 8e673f2519..fd6616ed33 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/CompletionServiceStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/CompletionServiceStub.java @@ -26,6 +26,7 @@ import java.util.concurrent.CompletionService; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; + import org.apache.maven.lifecycle.internal.ProjectSegment; /** diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java index 6b2d1ba269..e61cea6db3 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java @@ -18,20 +18,21 @@ */ package org.apache.maven.lifecycle.internal.stub; -import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.*; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; + import org.apache.maven.lifecycle.DefaultLifecycles; import org.apache.maven.lifecycle.Lifecycle; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; +import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java index 72a3285e2f..523a7274f6 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java @@ -21,6 +21,7 @@ package org.apache.maven.lifecycle.internal.stub; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; + import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginExecution; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java index 12e40529a9..5f681718e9 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java @@ -23,6 +23,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; + import org.apache.maven.execution.MavenSession; import org.apache.maven.internal.xml.Xpp3Dom; import org.apache.maven.lifecycle.DefaultLifecycles; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleTaskSegmentCalculatorStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleTaskSegmentCalculatorStub.java index 1edcaa3190..80c12129f5 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleTaskSegmentCalculatorStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleTaskSegmentCalculatorStub.java @@ -20,6 +20,7 @@ package org.apache.maven.lifecycle.internal.stub; import java.util.ArrayList; import java.util.List; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator; import org.apache.maven.lifecycle.internal.GoalTask; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/MojoExecutorStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/MojoExecutorStub.java index 2021785c13..8c58cc3b9f 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/MojoExecutorStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/MojoExecutorStub.java @@ -18,10 +18,12 @@ */ package org.apache.maven.lifecycle.internal.stub; +import javax.inject.Provider; + import java.util.ArrayList; import java.util.Collections; import java.util.List; -import javax.inject.Provider; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleExecutionException; import org.apache.maven.lifecycle.internal.ExecutionEventCatapult; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java index 70e8393e9d..773b432be7 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependenciesResolverStub.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; + import org.apache.maven.ProjectDependenciesResolver; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStub.java index 7650e017e4..17f383ee2d 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStub.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStub.java @@ -21,6 +21,7 @@ package org.apache.maven.lifecycle.internal.stub; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.apache.maven.execution.AbstractExecutionListener; import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.DefaultMavenExecutionResult; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStubTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStubTest.java index 4f7b3a56cf..40b4ffd591 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStubTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStubTest.java @@ -18,13 +18,14 @@ */ package org.apache.maven.lifecycle.internal.stub; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.util.List; + import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Tests the stub. Yeah, I know. * diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/mapping/LifecyclePhaseTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/mapping/LifecyclePhaseTest.java index aae92d05e0..ff2c7eca53 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/mapping/LifecyclePhaseTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/mapping/LifecyclePhaseTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.lifecycle.mapping; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Test; - /** * @author atanasenko */ diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java index ab7de39baa..ef54bb72d3 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java @@ -18,12 +18,10 @@ */ package org.apache.maven.plugin; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.fail; +import javax.inject.Inject; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.DefaultRepositoryRequest; @@ -37,6 +35,10 @@ import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.component.repository.ComponentDescriptor; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; + public class PluginManagerTest extends AbstractCoreMavenComponentTestCase { @Inject private DefaultBuildPluginManager pluginManager; diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExceptionTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExceptionTest.java index f924e51043..5336f7642c 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExceptionTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExceptionTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.plugin; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.Collections; + import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * MNG-3131 * diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java index 4e5ef62fc3..921331baac 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java @@ -18,11 +18,7 @@ */ package org.apache.maven.plugin; -import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertSame; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.io.File; import java.util.ArrayList; @@ -30,7 +26,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Properties; -import javax.inject.Inject; + import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; @@ -53,6 +49,12 @@ import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator import org.codehaus.plexus.util.dag.CycleDetectedException; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Jason van Zyl */ diff --git a/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java b/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java index 7b1327aba5..63d14acfc2 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.plugin.internal; -import static org.junit.jupiter.api.Assertions.assertNull; - import java.util.concurrent.CountDownLatch; + import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.execution.MavenSession; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNull; + /** * @author Kristian Rosenvold */ diff --git a/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteCheckerTest.java b/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteCheckerTest.java index b95b99d9e4..2c68ebbf2d 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteCheckerTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteCheckerTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.plugin.internal; -import static org.junit.jupiter.api.Assertions.*; - import org.eclipse.aether.util.version.GenericVersionScheme; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + class MavenPluginJavaPrerequisiteCheckerTest { @Test diff --git a/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginValidatorTest.java b/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginValidatorTest.java index d3ffccbc01..5d48791109 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginValidatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/internal/MavenPluginValidatorTest.java @@ -18,12 +18,11 @@ */ package org.apache.maven.plugin.internal; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; +import javax.inject.Inject; import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; + import org.apache.maven.AbstractCoreMavenComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; @@ -31,6 +30,9 @@ import org.apache.maven.artifact.handler.DefaultArtifactHandler; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Michael Simacek */ diff --git a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java index d2d6b41756..0d163d5825 100644 --- a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java +++ b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java @@ -18,13 +18,15 @@ */ package org.apache.maven.project; +import javax.inject.Inject; + import java.io.File; import java.io.FileNotFoundException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.Arrays; -import javax.inject.Inject; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.building.ModelBuildingException; import org.apache.maven.model.building.ModelProblem; diff --git a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java index f166d0f04c..44e60be68e 100644 --- a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java @@ -18,6 +18,20 @@ */ package org.apache.maven.project; +import java.io.File; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.List; + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.repository.ArtifactRepository; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + import static org.apache.maven.project.ProjectBuildingResultWithProblemMessageMatcher.projectBuildingResultWithProblemMessage; import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; import static org.hamcrest.MatcherAssert.assertThat; @@ -31,19 +45,6 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.fail; -import java.io.File; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.util.List; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - public class DefaultMavenProjectBuilderTest extends AbstractMavenProjectTestCase { @TempDir File localRepoDir; diff --git a/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java b/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java index 22ed84b9e7..2b9d6f7c77 100644 --- a/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java +++ b/maven-core/src/test/java/org/apache/maven/project/EmptyLifecycleExecutor.java @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; + import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleExecutor; import org.apache.maven.lifecycle.MavenExecutionPlan; diff --git a/maven-core/src/test/java/org/apache/maven/project/EmptyProjectBuildingHelper.java b/maven-core/src/test/java/org/apache/maven/project/EmptyProjectBuildingHelper.java index 384ef0bab2..289465d611 100644 --- a/maven-core/src/test/java/org/apache/maven/project/EmptyProjectBuildingHelper.java +++ b/maven-core/src/test/java/org/apache/maven/project/EmptyProjectBuildingHelper.java @@ -20,6 +20,7 @@ package org.apache.maven.project; import java.util.ArrayList; import java.util.List; + import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Model; import org.apache.maven.model.Repository; diff --git a/maven-core/src/test/java/org/apache/maven/project/ExtensionDescriptorBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/ExtensionDescriptorBuilderTest.java index 1dd591f3b7..2d6b85c484 100644 --- a/maven-core/src/test/java/org/apache/maven/project/ExtensionDescriptorBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/ExtensionDescriptorBuilderTest.java @@ -18,20 +18,21 @@ */ package org.apache.maven.project; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - /** * Tests {@link ExtensionDescriptorBuilder}. * diff --git a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java index 18125fb717..ac647a6703 100644 --- a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java +++ b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java @@ -19,6 +19,7 @@ package org.apache.maven.project; import java.io.File; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.metadata.Metadata; diff --git a/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java b/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java index 54d833c780..2a0b81b721 100644 --- a/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/MavenProjectTest.java @@ -18,22 +18,23 @@ */ package org.apache.maven.project; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNotSame; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.io.IOException; import java.util.List; import java.util.Map; + import org.apache.maven.model.DependencyManagement; import org.apache.maven.model.Model; import org.apache.maven.model.Parent; import org.apache.maven.model.Profile; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class MavenProjectTest extends AbstractMavenProjectTestCase { @Test diff --git a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java index e456b057be..256745afd2 100644 --- a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java @@ -18,17 +18,7 @@ */ package org.apache.maven.project; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.endsWith; -import static org.hamcrest.Matchers.lessThan; -import static org.hamcrest.Matchers.startsWith; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertSame; -import static org.junit.jupiter.api.Assertions.assertThrows; +import javax.inject.Inject; import java.io.File; import java.util.ArrayList; @@ -36,7 +26,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Properties; -import javax.inject.Inject; + import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginExecution; @@ -51,6 +41,18 @@ import org.eclipse.aether.repository.LocalRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.endsWith; +import static org.hamcrest.Matchers.lessThan; +import static org.hamcrest.Matchers.startsWith; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; + @PlexusTest public class PomConstructionTest { private static String BASE_DIR = "src/test"; diff --git a/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java index 542cf80e6c..afe66a7f4b 100644 --- a/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java @@ -18,6 +18,25 @@ */ package org.apache.maven.project; +import java.io.File; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Properties; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.commons.io.FileUtils; +import org.apache.maven.AbstractCoreMavenComponentTestCase; +import org.apache.maven.execution.MavenSession; +import org.apache.maven.model.Plugin; +import org.apache.maven.model.building.FileModelSource; +import org.apache.maven.model.building.ModelBuildingRequest; +import org.apache.maven.model.building.ModelProblem; +import org.apache.maven.model.building.ModelSource; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + import static org.apache.maven.project.ProjectBuildingResultWithLocationMatcher.projectBuildingResultWithLocation; import static org.apache.maven.project.ProjectBuildingResultWithProblemMessageMatcher.projectBuildingResultWithProblemMessage; import static org.hamcrest.MatcherAssert.assertThat; @@ -32,24 +51,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.io.File; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Properties; -import java.util.concurrent.atomic.AtomicInteger; -import org.apache.commons.io.FileUtils; -import org.apache.maven.AbstractCoreMavenComponentTestCase; -import org.apache.maven.execution.MavenSession; -import org.apache.maven.model.Plugin; -import org.apache.maven.model.building.FileModelSource; -import org.apache.maven.model.building.ModelBuildingRequest; -import org.apache.maven.model.building.ModelProblem; -import org.apache.maven.model.building.ModelSource; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - public class ProjectBuilderTest extends AbstractCoreMavenComponentTestCase { @Override protected String getProjectsDirectory() { diff --git a/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithLocationMatcher.java b/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithLocationMatcher.java index 329da1d830..235561f29f 100644 --- a/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithLocationMatcher.java +++ b/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithLocationMatcher.java @@ -18,12 +18,12 @@ */ package org.apache.maven.project; -import static java.util.stream.Collectors.joining; - import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.hamcrest.Matcher; +import static java.util.stream.Collectors.joining; + /** * Hamcrest matcher to help create fluent assertions about {@link ProjectBuildingResult} instances. */ diff --git a/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithProblemMessageMatcher.java b/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithProblemMessageMatcher.java index 20befb8efa..efbde86406 100644 --- a/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithProblemMessageMatcher.java +++ b/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingResultWithProblemMessageMatcher.java @@ -18,13 +18,13 @@ */ package org.apache.maven.project; -import static java.util.stream.Collectors.joining; - import org.apache.maven.model.building.ModelProblem; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.hamcrest.Matcher; +import static java.util.stream.Collectors.joining; + /** * Hamcrest matcher to help create fluent assertions about {@link ProjectBuildingResult} instances. */ diff --git a/maven-core/src/test/java/org/apache/maven/project/ProjectModelResolverTest.java b/maven-core/src/test/java/org/apache/maven/project/ProjectModelResolverTest.java index a786c0569a..b658f5eebe 100644 --- a/maven-core/src/test/java/org/apache/maven/project/ProjectModelResolverTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/ProjectModelResolverTest.java @@ -18,17 +18,11 @@ */ package org.apache.maven.project; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.startsWith; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - import java.io.File; import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicReference; + import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.model.Dependency; import org.apache.maven.model.Parent; @@ -41,6 +35,13 @@ import org.eclipse.aether.impl.RemoteRepositoryManager; import org.eclipse.aether.repository.RemoteRepository; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.startsWith; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + /** * Test cases for the project {@code ModelResolver} implementation. * diff --git a/maven-core/src/test/java/org/apache/maven/project/ProjectSorterTest.java b/maven-core/src/test/java/org/apache/maven/project/ProjectSorterTest.java index a85255175b..f2aa691228 100644 --- a/maven-core/src/test/java/org/apache/maven/project/ProjectSorterTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/ProjectSorterTest.java @@ -18,14 +18,10 @@ */ package org.apache.maven.project; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - import java.util.ArrayList; import java.util.Collections; import java.util.List; + import org.apache.maven.model.Build; import org.apache.maven.model.Dependency; import org.apache.maven.model.Extension; @@ -35,6 +31,11 @@ import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginManagement; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasItem; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + /** * Test sorting projects by dependencies. * diff --git a/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java b/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java index 28b25607bf..47489fc0ca 100644 --- a/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java +++ b/maven-core/src/test/java/org/apache/maven/project/TestMetadataSource.java @@ -18,9 +18,11 @@ */ package org.apache.maven.project; -import java.util.List; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException; diff --git a/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java b/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java index c3eb1ce528..293ac12871 100644 --- a/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultMavenMetadataCacheTest.java @@ -18,11 +18,9 @@ */ package org.apache.maven.project.artifact; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotSame; - import java.util.Arrays; import java.util.Collections; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter; @@ -34,6 +32,9 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotSame; + /** * @author Igor Fedorenko */ diff --git a/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCacheTest.java b/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCacheTest.java index c738c947b9..ba33437be9 100644 --- a/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCacheTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCacheTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.project.artifact; -import static org.junit.jupiter.api.Assertions.assertArrayEquals; - import java.util.LinkedHashSet; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; + public class DefaultProjectArtifactsCacheTest { private ProjectArtifactsCache cache; diff --git a/maven-core/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java b/maven-core/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java index 2ab7959899..f3561fd427 100644 --- a/maven-core/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java @@ -19,6 +19,7 @@ package org.apache.maven.project.artifact; import javax.inject.Inject; + import org.apache.maven.repository.RepositorySystem; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.testing.PlexusTest; diff --git a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java index 63794acc43..91e50a3239 100644 --- a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java @@ -18,11 +18,9 @@ */ package org.apache.maven.project.canonical; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import java.io.File; import java.util.List; + import org.apache.maven.api.xml.Dom; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginExecution; @@ -30,6 +28,9 @@ import org.apache.maven.project.AbstractMavenProjectTestCase; import org.apache.maven.project.MavenProject; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * @author Jason van Zyl */ diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/PomTestWrapper.java b/maven-core/src/test/java/org/apache/maven/project/harness/PomTestWrapper.java index cc25189364..e34071af2d 100644 --- a/maven-core/src/test/java/org/apache/maven/project/harness/PomTestWrapper.java +++ b/maven-core/src/test/java/org/apache/maven/project/harness/PomTestWrapper.java @@ -21,6 +21,7 @@ package org.apache.maven.project.harness; import java.io.File; import java.util.Iterator; import java.util.Objects; + import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.jxpath.JXPathNotFoundException; import org.apache.commons.jxpath.ri.JXPathContextReferenceImpl; diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributeIterator.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributeIterator.java index 6e6f039d91..041cc3ca00 100644 --- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributeIterator.java +++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributeIterator.java @@ -21,6 +21,7 @@ package org.apache.maven.project.harness; import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.model.NodeIterator; import org.apache.commons.jxpath.ri.model.NodePointer; diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributePointer.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributePointer.java index cab4d31952..4f37096fdb 100644 --- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributePointer.java +++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomAttributePointer.java @@ -19,6 +19,7 @@ package org.apache.maven.project.harness; import java.util.Map; + import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.model.NodePointer; diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java index 4181064397..e0db3881ef 100644 --- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java +++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java @@ -20,6 +20,7 @@ package org.apache.maven.project.harness; import java.util.ArrayList; import java.util.List; + import org.apache.commons.jxpath.ri.Compiler; import org.apache.commons.jxpath.ri.compiler.NodeNameTest; import org.apache.commons.jxpath.ri.compiler.NodeTest; diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java index f147d3e392..c7e61eb884 100644 --- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java +++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodePointer.java @@ -20,6 +20,7 @@ package org.apache.maven.project.harness; import java.util.ArrayList; import java.util.List; + import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.compiler.NodeTest; import org.apache.commons.jxpath.ri.model.NodeIterator; diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomPointerFactory.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomPointerFactory.java index 73e8c0129d..ad96da688a 100644 --- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomPointerFactory.java +++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomPointerFactory.java @@ -19,6 +19,7 @@ package org.apache.maven.project.harness; import java.util.Locale; + import org.apache.commons.jxpath.ri.QName; import org.apache.commons.jxpath.ri.model.NodePointer; import org.apache.commons.jxpath.ri.model.NodePointerFactory; diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java index 84d30435b1..4fd761003e 100644 --- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java +++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; + import org.codehaus.plexus.util.FileUtils; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.metadata.Metadata; diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java index 8a38321684..35a6819a0d 100644 --- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java +++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnectorFactory.java @@ -20,6 +20,7 @@ package org.apache.maven.repository; import javax.inject.Named; import javax.inject.Singleton; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.repository.RemoteRepository; import org.eclipse.aether.spi.connector.RepositoryConnector; diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java index d3f62bff0d..e882e517c8 100644 --- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java +++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java @@ -18,6 +18,10 @@ */ package org.apache.maven.repository; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -25,9 +29,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Model; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; diff --git a/maven-core/src/test/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformationTest.java b/maven-core/src/test/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformationTest.java index 5c0e80625f..aee43d68e4 100644 --- a/maven-core/src/test/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformationTest.java +++ b/maven-core/src/test/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformationTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.rtinfo.internal; +import javax.inject.Inject; + +import org.apache.maven.rtinfo.RuntimeInformation; +import org.codehaus.plexus.testing.PlexusTest; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import javax.inject.Inject; -import org.apache.maven.rtinfo.RuntimeInformation; -import org.codehaus.plexus.testing.PlexusTest; -import org.junit.jupiter.api.Test; - @PlexusTest public class DefaultRuntimeInformationTest { @Inject diff --git a/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java b/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java index a10520a823..24ded5cb2d 100644 --- a/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java +++ b/maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java @@ -18,13 +18,12 @@ */ package org.apache.maven.settings; -import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; -import static org.junit.jupiter.api.Assertions.assertEquals; +import javax.inject.Inject; import java.io.File; import java.io.IOException; import java.io.Reader; -import javax.inject.Inject; + import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.model.Profile; import org.apache.maven.project.DefaultProjectBuilder; @@ -43,6 +42,9 @@ import org.eclipse.aether.repository.LocalRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; +import static org.junit.jupiter.api.Assertions.assertEquals; + @PlexusTest public class PomConstructionWithSettingsTest { private static final String BASE_DIR = "src/test"; diff --git a/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java b/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java index b260c85800..d4d2ad9b54 100644 --- a/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java +++ b/maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java @@ -18,15 +18,13 @@ */ package org.apache.maven.settings; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; + import org.apache.maven.api.settings.Activation; import org.apache.maven.api.settings.ActivationFile; import org.apache.maven.api.settings.ActivationOS; @@ -36,6 +34,9 @@ import org.apache.maven.api.settings.Repository; import org.apache.maven.api.settings.Settings; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + public class SettingsUtilsTest { @Test diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java index a8a531d94d..fe98061302 100644 --- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java +++ b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java @@ -18,17 +18,11 @@ */ package org.apache.maven.toolchain; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.execution.MavenSession; @@ -40,6 +34,13 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.slf4j.Logger; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + public class DefaultToolchainManagerPrivateTest { // Mocks to inject into toolchainManager @Mock diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java index b3c5a839f1..9bb2568fc9 100644 --- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java +++ b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java @@ -18,17 +18,12 @@ */ package org.apache.maven.toolchain; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Matchers.isA; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.execution.MavenSession; @@ -41,6 +36,12 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.slf4j.Logger; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Matchers.isA; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + public class DefaultToolchainManagerTest { // Mocks to inject into toolchainManager @Mock diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java index ff828ed0eb..a9b18114de 100644 --- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java +++ b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java @@ -18,13 +18,8 @@ */ package org.apache.maven.toolchain; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - import java.util.Collections; + import org.apache.maven.toolchain.java.DefaultJavaToolChain; import org.apache.maven.toolchain.model.ToolchainModel; import org.codehaus.plexus.util.xml.Xpp3Dom; @@ -33,6 +28,12 @@ import org.junit.jupiter.api.Test; import org.mockito.MockitoAnnotations; import org.slf4j.Logger; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + public class DefaultToolchainTest { private final Logger logger = mock(Logger.class); diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java index 3301075bea..6b9cc2d800 100644 --- a/maven-core/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java +++ b/maven-core/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.toolchain; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * * @author mkleint diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java index 6a99e0eb4d..60ae83443e 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java @@ -20,6 +20,7 @@ package org.apache.maven.cli; import java.io.PrintStream; import java.io.PrintWriter; + import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java index edc8d860cf..d3f5695d4d 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java @@ -18,18 +18,19 @@ */ package org.apache.maven.cli; -import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; - import java.io.IOException; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.Properties; + import org.apache.commons.lang3.StringUtils; import org.codehaus.plexus.util.Os; import org.slf4j.Logger; +import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + /** * Utility class used to report errors, statistics, application version info, etc. * diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java b/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java index 9d7791f90f..9a315f12ce 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java @@ -20,6 +20,7 @@ package org.apache.maven.cli; import java.io.File; import java.util.Properties; + import org.apache.commons.cli.CommandLine; import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.MavenExecutionRequest; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java index 1c1def95e0..509b02edee 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java @@ -18,12 +18,6 @@ */ package org.apache.maven.cli; -import static java.util.Comparator.comparing; -import static org.apache.maven.cli.CLIManager.COLOR; -import static org.apache.maven.cli.ResolveFile.resolveFile; -import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; - -import com.google.inject.AbstractModule; import java.io.BufferedInputStream; import java.io.Console; import java.io.File; @@ -47,6 +41,8 @@ import java.util.Set; import java.util.function.Consumer; import java.util.regex.Matcher; import java.util.regex.Pattern; + +import com.google.inject.AbstractModule; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.ParseException; @@ -123,6 +119,11 @@ import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher; import org.sonatype.plexus.components.sec.dispatcher.SecUtil; import org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity; +import static java.util.Comparator.comparing; +import static org.apache.maven.cli.CLIManager.COLOR; +import static org.apache.maven.cli.ResolveFile.resolveFile; +import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + // TODO push all common bits back to plexus cli and prepare for transition to Guice. We don't need 50 ways to make CLIs /** diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java index c5c47d1315..1b24849771 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java @@ -18,14 +18,14 @@ */ package org.apache.maven.cli.configuration; -import static org.apache.maven.cli.ResolveFile.resolveFile; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.io.FileNotFoundException; import java.util.List; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.commons.cli.CommandLine; import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.bridge.MavenRepositorySystem; @@ -50,6 +50,8 @@ import org.apache.maven.settings.crypto.SettingsDecrypter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static org.apache.maven.cli.ResolveFile.resolveFile; + /** * SettingsXmlConfigurationProcessor */ diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java index c32a2d779d..b3c7671b46 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java @@ -20,6 +20,7 @@ package org.apache.maven.cli.event; import java.util.HashMap; import java.util.Map; + import org.apache.maven.eventspy.EventSpy; /** diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java index ecaabf4748..6b46662dd7 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java @@ -18,13 +18,10 @@ */ package org.apache.maven.cli.event; -import static org.apache.maven.cli.CLIReportingUtils.formatDuration; -import static org.apache.maven.cli.CLIReportingUtils.formatTimestamp; -import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; - import java.io.File; import java.util.List; import java.util.Objects; + import org.apache.maven.execution.AbstractExecutionListener; import org.apache.maven.execution.BuildFailure; import org.apache.maven.execution.BuildSuccess; @@ -44,6 +41,10 @@ import org.slf4j.ILoggerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static org.apache.maven.cli.CLIReportingUtils.formatDuration; +import static org.apache.maven.cli.CLIReportingUtils.formatTimestamp; +import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + /** * Logs execution events to logger, eventually user-supplied. * diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java index c89af87d94..8a950d7a44 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java @@ -18,13 +18,15 @@ */ package org.apache.maven.cli.internal; +import javax.inject.Inject; +import javax.inject.Named; + import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; + import org.apache.maven.RepositoryUtils; import org.apache.maven.api.model.Plugin; import org.apache.maven.cli.internal.extension.model.CoreExtension; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java index b539949ac8..8f5d7688aa 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java @@ -25,6 +25,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Properties; import java.util.Set; + import org.apache.maven.cli.logging.impl.UnsupportedSlf4jBindingConfiguration; import org.codehaus.plexus.util.PropertyUtils; import org.slf4j.ILoggerFactory; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java index 6083377171..5052adc954 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java @@ -19,6 +19,7 @@ package org.apache.maven.cli.logging; import java.io.PrintStream; + import org.slf4j.Logger; import org.slf4j.Marker; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java index d8e0a8a354..837997dfbd 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java @@ -21,6 +21,7 @@ package org.apache.maven.cli.logging.impl; import java.net.URL; import java.util.Map; import java.util.Set; + import org.apache.maven.cli.logging.BaseSlf4jConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java index f20815e233..514538bed1 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java @@ -22,6 +22,7 @@ import java.io.PrintStream; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; + import org.apache.commons.lang3.Validate; import org.eclipse.aether.transfer.AbstractTransferListener; import org.eclipse.aether.transfer.TransferCancelledException; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java index 769b3fa930..2cbd5e6014 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java @@ -24,6 +24,7 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Locale; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.eclipse.aether.transfer.TransferCancelledException; import org.eclipse.aether.transfer.TransferEvent; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java index 1c528a9353..c5c8f09645 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java @@ -19,6 +19,7 @@ package org.apache.maven.cli.transfer; import java.util.Locale; + import org.apache.maven.cli.transfer.AbstractMavenTransferListener.FileSizeFormat; import org.eclipse.aether.transfer.AbstractTransferListener; import org.eclipse.aether.transfer.TransferCancelledException; diff --git a/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java b/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java index db8c757e03..10ceb1c582 100644 --- a/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java +++ b/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java @@ -18,12 +18,10 @@ */ package org.eclipse.sisu.plexus; -import com.google.inject.Injector; -import com.google.inject.Key; -import com.google.inject.Module; -import com.google.inject.TypeLiteral; -import com.google.inject.spi.TypeConverter; -import com.google.inject.spi.TypeConverterBinding; +import javax.annotation.Priority; +import javax.inject.Inject; +import javax.inject.Singleton; + import java.io.StringReader; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; @@ -32,9 +30,13 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Properties; -import javax.annotation.Priority; -import javax.inject.Inject; -import javax.inject.Singleton; + +import com.google.inject.Injector; +import com.google.inject.Key; +import com.google.inject.Module; +import com.google.inject.TypeLiteral; +import com.google.inject.spi.TypeConverter; +import com.google.inject.spi.TypeConverterBinding; import org.apache.maven.api.xml.Dom; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.Xpp3DomBuilder; diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java index b9005d95f1..ed6c159bf3 100644 --- a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java @@ -25,6 +25,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; + import org.apache.commons.cli.Option; import org.codehaus.plexus.util.FileUtils; import org.junit.jupiter.api.Test; diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/CLIReportingUtilsTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/CLIReportingUtilsTest.java index 4a34848f4b..a0d9e4a500 100644 --- a/maven-embedder/src/test/java/org/apache/maven/cli/CLIReportingUtilsTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/cli/CLIReportingUtilsTest.java @@ -18,10 +18,10 @@ */ package org.apache.maven.cli; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class CLIReportingUtilsTest { @Test diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/CleanArgumentTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/CleanArgumentTest.java index 10e2266b5e..f15a1eed65 100644 --- a/maven-embedder/src/test/java/org/apache/maven/cli/CleanArgumentTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/cli/CleanArgumentTest.java @@ -18,10 +18,10 @@ */ package org.apache.maven.cli; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * @author Karl Heinz Marbaise */ diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java index 4d5245fb6b..1f1da2e7cf 100644 --- a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java @@ -18,30 +18,13 @@ */ package org.apache.maven.cli; -import static java.util.Arrays.asList; -import static org.apache.maven.cli.MavenCli.performProfileActivation; -import static org.apache.maven.cli.MavenCli.performProjectActivation; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assumptions.assumeTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.inOrder; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; - import java.io.ByteArrayOutputStream; import java.io.File; import java.io.PrintStream; import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.List; + import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; @@ -64,6 +47,24 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InOrder; +import static java.util.Arrays.asList; +import static org.apache.maven.cli.MavenCli.performProfileActivation; +import static org.apache.maven.cli.MavenCli.performProjectActivation; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.inOrder; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; + public class MavenCliTest { private MavenCli cli; diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java index 56c012d663..9d645ca4e7 100644 --- a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java @@ -18,14 +18,9 @@ */ package org.apache.maven.cli.event; -import static org.mockito.ArgumentMatchers.matches; -import static org.mockito.Mockito.inOrder; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.when; +import java.io.File; import com.google.common.collect.ImmutableList; -import java.io.File; import org.apache.commons.io.FilenameUtils; import org.apache.maven.execution.ExecutionEvent; import org.apache.maven.execution.MavenSession; @@ -39,6 +34,12 @@ import org.mockito.InOrder; import org.mockito.Mockito; import org.slf4j.Logger; +import static org.mockito.ArgumentMatchers.matches; +import static org.mockito.Mockito.inOrder; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.when; + class ExecutionEventLoggerTest { private Logger logger; diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java index 0046550aae..e34786ba49 100644 --- a/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.cli.transfer; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - import java.util.Locale; + import org.apache.maven.cli.transfer.AbstractMavenTransferListener.FileSizeFormat; import org.apache.maven.cli.transfer.AbstractMavenTransferListener.FileSizeFormat.ScaleUnit; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + public class FileSizeFormatTest { @Test diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ArtifactModelSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ArtifactModelSource.java index 355257463f..3351290daf 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ArtifactModelSource.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ArtifactModelSource.java @@ -20,6 +20,7 @@ package org.apache.maven.model.building; import java.io.File; import java.util.Objects; + import org.apache.maven.building.FileSource; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/BuildModelSourceTransformer.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/BuildModelSourceTransformer.java index 2348019099..56adfdec96 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/BuildModelSourceTransformer.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/BuildModelSourceTransformer.java @@ -18,10 +18,12 @@ */ package org.apache.maven.model.building; -import java.io.IOException; -import java.nio.file.Path; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.IOException; +import java.nio.file.Path; + import org.apache.maven.model.transform.BuildToRawPomXMLFilterFactory; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java index 2ddcb2f78f..eb211f5e40 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultBuildPomXMLFilterFactory.java @@ -22,6 +22,7 @@ import java.nio.file.Path; import java.util.Optional; import java.util.function.BiFunction; import java.util.function.Function; + import org.apache.maven.model.Model; import org.apache.maven.model.transform.BuildToRawPomXMLFilterFactory; import org.apache.maven.model.transform.RelativeProject; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index 87386331a6..2b3b5f102a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -18,8 +18,9 @@ */ package org.apache.maven.model.building; -import static org.apache.maven.model.building.Result.error; -import static org.apache.maven.model.building.Result.newResult; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.io.IOException; @@ -39,9 +40,7 @@ import java.util.Objects; import java.util.Properties; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.InputSource; import org.apache.maven.artifact.versioning.DefaultArtifactVersion; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; @@ -93,6 +92,9 @@ import org.codehaus.plexus.interpolation.MapBasedValueSource; import org.codehaus.plexus.interpolation.StringSearchInterpolator; import org.eclipse.sisu.Nullable; +import static org.apache.maven.model.building.Result.error; +import static org.apache.maven.model.building.Result.newResult; + /** * @author Benjamin Bentmann */ diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilderFactory.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilderFactory.java index 2f571d190f..bf573541a0 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilderFactory.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilderFactory.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.util.Arrays; + import org.apache.maven.model.Model; import org.apache.maven.model.composition.DefaultDependencyManagementImporter; import org.apache.maven.model.composition.DependencyManagementImporter; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java index 2bcd299ce5..e667fe6409 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Properties; + import org.apache.maven.model.Model; import org.apache.maven.model.Profile; import org.apache.maven.model.resolution.ModelResolver; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingResult.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingResult.java index 733fec38e5..43417936d9 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingResult.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingResult.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; + import org.apache.maven.model.Model; import org.apache.maven.model.Profile; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java index a276897d7e..40e54a6286 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java @@ -21,6 +21,7 @@ package org.apache.maven.model.building; import java.util.EnumSet; import java.util.List; import java.util.Set; + import org.apache.maven.model.Model; import org.apache.maven.model.io.ModelParseException; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java index 65cae1c638..916e80d42d 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java @@ -18,14 +18,16 @@ */ package org.apache.maven.model.building; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.model.Model; import org.apache.maven.model.io.ModelReader; import org.apache.maven.model.locator.ModelLocator; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelSourceTransformer.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelSourceTransformer.java index 41f948866c..40c91d7076 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelSourceTransformer.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelSourceTransformer.java @@ -20,6 +20,7 @@ package org.apache.maven.model.building; import java.io.IOException; import java.nio.file.Path; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContext.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContext.java index c1eb8bb335..6346a7d3d5 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContext.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContext.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Supplier; + import org.apache.maven.model.Model; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java index 11002ea178..36284ef65a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java @@ -20,6 +20,7 @@ package org.apache.maven.model.building; import java.io.File; import java.net.URI; + import org.apache.maven.building.FileSource; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileToRawModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileToRawModelMerger.java index cce8b74c5c..a7072f9aad 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileToRawModelMerger.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileToRawModelMerger.java @@ -21,6 +21,7 @@ package org.apache.maven.model.building; import java.util.Iterator; import java.util.Map; import java.util.stream.Collectors; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.BuildBase; import org.apache.maven.api.model.CiManagement; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java index 2fc5c8299e..e77f707c45 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java @@ -22,6 +22,7 @@ import java.io.File; import java.util.Date; import java.util.List; import java.util.Properties; + import org.apache.maven.model.Model; import org.apache.maven.model.Profile; import org.apache.maven.model.resolution.ModelResolver; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuilder.java index a2912b81dc..e26ccea5ce 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuilder.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.io.File; + import org.apache.maven.model.Model; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java index 7ca3fbf388..5869a882b2 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java @@ -22,6 +22,7 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.Collections; import java.util.List; + import org.apache.maven.model.Model; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java index 955b7d9777..b9b68a7bb7 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java @@ -22,6 +22,7 @@ import java.io.File; import java.util.Date; import java.util.List; import java.util.Properties; + import org.apache.maven.model.Model; import org.apache.maven.model.Profile; import org.apache.maven.model.resolution.ModelResolver; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingResult.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingResult.java index 1f1e729ffc..f254ec92ef 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingResult.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingResult.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.util.List; + import org.apache.maven.model.Model; import org.apache.maven.model.Profile; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java index 5bcc462c66..cfe4f5db56 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.util.Objects; + import org.apache.maven.building.Source; import org.apache.maven.model.Model; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java index 607104c650..33a9baf728 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.util.Objects; + import org.apache.maven.model.InputLocation; import org.apache.maven.model.building.ModelProblem.Severity; import org.apache.maven.model.building.ModelProblem.Version; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java index 12c18e3c74..65a023a658 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.io.File; + import org.apache.maven.model.Model; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSourceTransformer.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSourceTransformer.java index e76c704319..22bd0be619 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSourceTransformer.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSourceTransformer.java @@ -20,6 +20,7 @@ package org.apache.maven.model.building; import java.io.IOException; import java.nio.file.Path; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/Result.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/Result.java index cd52d921e1..446df1c264 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/Result.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/Result.java @@ -18,15 +18,15 @@ */ package org.apache.maven.model.building; -import static java.util.Collections.singleton; -import static org.apache.maven.model.building.ModelProblem.Severity.ERROR; -import static org.apache.maven.model.building.ModelProblem.Severity.FATAL; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; +import static java.util.Collections.singleton; +import static org.apache.maven.model.building.ModelProblem.Severity.ERROR; +import static org.apache.maven.model.building.ModelProblem.Severity.FATAL; + /** * There are various forms of results that are represented by this class: *
    diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/TransformerContext.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/TransformerContext.java index 1a72f431d3..9441523fe4 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/TransformerContext.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/TransformerContext.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.nio.file.Path; + import org.apache.maven.model.Model; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/UrlModelSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/UrlModelSource.java index ef3a9fab6c..8103d46eb1 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/UrlModelSource.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/UrlModelSource.java @@ -19,6 +19,7 @@ package org.apache.maven.model.building; import java.net.URL; + import org.apache.maven.building.UrlSource; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java b/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java index c662372f94..29bc05e99e 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java @@ -18,11 +18,13 @@ */ package org.apache.maven.model.composition; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.DependencyManagement; import org.apache.maven.api.model.Model; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java b/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java index c6e8b3174c..dc4144588a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java @@ -19,6 +19,7 @@ package org.apache.maven.model.composition; import java.util.List; + import org.apache.maven.api.model.DependencyManagement; import org.apache.maven.api.model.Model; import org.apache.maven.model.building.ModelBuildingRequest; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java index 58e8661f47..31c0a6969f 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java @@ -18,13 +18,15 @@ */ package org.apache.maven.model.inheritance; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.InputLocation; import org.apache.maven.api.model.Model; import org.apache.maven.api.model.ModelBase; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java index b8ecc9fc2d..8e84836998 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java @@ -18,6 +18,8 @@ */ package org.apache.maven.model.interpolation; +import javax.inject.Inject; + import java.io.File; import java.util.ArrayList; import java.util.Collection; @@ -25,7 +27,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; -import javax.inject.Inject; + import org.apache.maven.api.model.Model; import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.model.building.ModelProblemCollector; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java index 77f3b832b7..e6f737d7c8 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java @@ -20,6 +20,7 @@ package org.apache.maven.model.interpolation; import java.util.Date; import java.util.Map; + import org.codehaus.plexus.interpolation.AbstractValueSource; class BuildTimestampValueSource extends AbstractValueSource { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java index e44544da53..a80490e4a8 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java @@ -18,9 +18,11 @@ */ package org.apache.maven.model.interpolation; -import java.util.Properties; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.Properties; + import org.apache.maven.model.building.ModelBuildingRequest; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java index b890bb1661..90b31acca8 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelInterpolator.java @@ -19,6 +19,7 @@ package org.apache.maven.model.interpolation; import java.io.File; + import org.apache.maven.api.model.Model; import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.model.building.ModelProblemCollector; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelVersionProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelVersionProcessor.java index 56fe19e183..20d43bd3f8 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelVersionProcessor.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelVersionProcessor.java @@ -19,6 +19,7 @@ package org.apache.maven.model.interpolation; import java.util.Properties; + import org.apache.maven.model.building.ModelBuildingRequest; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java index e41104fd13..674cdc6513 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java @@ -21,6 +21,7 @@ package org.apache.maven.model.interpolation; import java.io.File; import java.util.Collection; import java.util.List; + import org.apache.maven.model.path.PathTranslator; import org.codehaus.plexus.interpolation.InterpolationPostProcessor; import org.codehaus.plexus.interpolation.util.ValueSourceUtils; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java index 8dc3399524..88318f7b65 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java @@ -18,13 +18,15 @@ */ package org.apache.maven.model.interpolation; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Model; import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.model.building.ModelProblem.Severity; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/UrlNormalizingPostProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/UrlNormalizingPostProcessor.java index 096b0dc137..7bfce95bd5 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/UrlNormalizingPostProcessor.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/UrlNormalizingPostProcessor.java @@ -20,6 +20,7 @@ package org.apache.maven.model.interpolation; import java.util.HashSet; import java.util.Set; + import org.apache.maven.model.path.UrlNormalizer; import org.codehaus.plexus.interpolation.InterpolationPostProcessor; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java b/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java index 7b5a64d704..82f6328055 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java @@ -18,6 +18,10 @@ */ package org.apache.maven.model.io; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -25,9 +29,7 @@ import java.io.Reader; import java.nio.file.Path; import java.util.Map; import java.util.Objects; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.model.InputSource; import org.apache.maven.model.Model; import org.apache.maven.model.building.ModelSourceTransformer; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java b/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java index 451e2854c9..7dc738e6dc 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java @@ -18,6 +18,9 @@ */ package org.apache.maven.model.io; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.OutputStream; @@ -25,8 +28,7 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.util.Map; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Model; import org.apache.maven.model.v4.MavenXpp3Writer; import org.codehaus.plexus.util.WriterFactory; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java index a4f1d2b216..4eec132979 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; + import org.apache.maven.model.Model; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java index bea67e68df..7f344d0b68 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.util.Map; + import org.apache.maven.api.model.Model; /** diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/locator/DefaultModelLocator.java b/maven-model-builder/src/main/java/org/apache/maven/model/locator/DefaultModelLocator.java index eca1f3226a..cc6f915a4d 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/locator/DefaultModelLocator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/locator/DefaultModelLocator.java @@ -18,10 +18,11 @@ */ package org.apache.maven.model.locator; -import java.io.File; import javax.inject.Named; import javax.inject.Singleton; +import java.io.File; + /** * Locates a POM file within a project base directory. * diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java index 075369c759..b142698cd2 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java @@ -18,13 +18,15 @@ */ package org.apache.maven.model.management; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.DependencyManagement; import org.apache.maven.api.model.Exclusion; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java index 748e896286..cf570c5711 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java @@ -18,13 +18,15 @@ */ package org.apache.maven.model.management; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.Model; import org.apache.maven.api.model.Plugin; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java index 8fce3e89e3..7d4576ff93 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java @@ -24,6 +24,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.api.model.BuildBase; import org.apache.maven.api.model.CiManagement; import org.apache.maven.api.model.Dependency; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java index 64897cbe38..df9dfe190e 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java @@ -18,14 +18,16 @@ */ package org.apache.maven.model.normalization; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.function.Function; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Model; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelPathTranslator.java b/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelPathTranslator.java index 719bf6f21f..37fc024c7f 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelPathTranslator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelPathTranslator.java @@ -18,14 +18,16 @@ */ package org.apache.maven.model.path; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Function; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.Model; import org.apache.maven.api.model.Reporting; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelUrlNormalizer.java b/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelUrlNormalizer.java index 9d75d52188..2f43971abb 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelUrlNormalizer.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelUrlNormalizer.java @@ -21,6 +21,7 @@ package org.apache.maven.model.path; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.model.DistributionManagement; import org.apache.maven.model.Model; import org.apache.maven.model.Scm; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultPathTranslator.java b/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultPathTranslator.java index 4e98321aab..8626bb9472 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultPathTranslator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultPathTranslator.java @@ -18,10 +18,11 @@ */ package org.apache.maven.model.path; -import java.io.File; import javax.inject.Named; import javax.inject.Singleton; +import java.io.File; + /** * Resolves relative paths against a specific base directory. * diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/path/ModelPathTranslator.java b/maven-model-builder/src/main/java/org/apache/maven/model/path/ModelPathTranslator.java index fd52df27fe..3811802f30 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/path/ModelPathTranslator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/path/ModelPathTranslator.java @@ -19,6 +19,7 @@ package org.apache.maven.model.path; import java.io.File; + import org.apache.maven.model.Model; import org.apache.maven.model.building.ModelBuildingRequest; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java index 825c726bf2..3ec95ab455 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java @@ -18,10 +18,12 @@ */ package org.apache.maven.model.path; -import java.io.File; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; + import org.apache.maven.api.model.ActivationFile; import org.apache.maven.model.profile.ProfileActivationContext; import org.codehaus.plexus.interpolation.AbstractValueSource; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java index c6674a37a7..72643644de 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java @@ -18,9 +18,11 @@ */ package org.apache.maven.model.plugin; -import java.util.List; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.List; + import org.apache.maven.model.Build; import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportConfigurationExpander.java b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportConfigurationExpander.java index 441d8435ea..87c14a48f5 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportConfigurationExpander.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportConfigurationExpander.java @@ -20,6 +20,7 @@ package org.apache.maven.model.plugin; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.model.Model; import org.apache.maven.model.ReportPlugin; import org.apache.maven.model.ReportSet; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java index a27e7c71f4..b58672c408 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java @@ -18,8 +18,6 @@ */ package org.apache.maven.model.profile; -import static java.util.stream.Collectors.toMap; - import java.io.File; import java.util.Collections; import java.util.List; @@ -27,6 +25,8 @@ import java.util.Map; import java.util.Properties; import java.util.stream.Collectors; +import static java.util.stream.Collectors.toMap; + /** * Describes the environmental context used to determine the activation status of profiles. * diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java index 1afbac5710..6e101c1d46 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java @@ -18,13 +18,15 @@ */ package org.apache.maven.model.profile; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.BuildBase; import org.apache.maven.api.model.Model; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java index 30eaf2ed96..71a66688a4 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java @@ -18,14 +18,16 @@ */ package org.apache.maven.model.profile; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.model.Activation; import org.apache.maven.model.Profile; import org.apache.maven.model.building.ModelProblem.Severity; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileSelector.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileSelector.java index deac3e2aee..c12a4dfe34 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileSelector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/ProfileSelector.java @@ -20,6 +20,7 @@ package org.apache.maven.model.profile; import java.util.Collection; import java.util.List; + import org.apache.maven.model.Profile; import org.apache.maven.model.building.ModelProblemCollector; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java index 102f183dcc..bb8c857a3f 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java @@ -18,10 +18,12 @@ */ package org.apache.maven.model.profile.activation; -import java.io.File; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.io.File; + import org.apache.maven.model.Activation; import org.apache.maven.model.ActivationFile; import org.apache.maven.model.Profile; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java index 0209861bac..0f3f7d1cdd 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java @@ -18,11 +18,13 @@ */ package org.apache.maven.model.profile.activation; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.model.Activation; import org.apache.maven.model.Profile; import org.apache.maven.model.building.ModelProblem.Severity; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java index 7cf824a69f..649cd40e13 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java @@ -20,6 +20,7 @@ package org.apache.maven.model.profile.activation; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.model.Activation; import org.apache.maven.model.ActivationOS; import org.apache.maven.model.Profile; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java index 592a2fabc9..16a586f011 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java @@ -20,6 +20,7 @@ package org.apache.maven.model.profile.activation; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.model.Activation; import org.apache.maven.model.ActivationProperty; import org.apache.maven.model.Profile; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/resolution/ModelResolver.java b/maven-model-builder/src/main/java/org/apache/maven/model/resolution/ModelResolver.java index 6d5a006c9f..9c3c303df3 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/resolution/ModelResolver.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/resolution/ModelResolver.java @@ -19,6 +19,7 @@ package org.apache.maven.model.resolution; import java.util.concurrent.atomic.AtomicReference; + import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Parent; import org.apache.maven.api.model.Repository; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java b/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java index 30ff5ac52a..da1f3d3825 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java @@ -18,13 +18,15 @@ */ package org.apache.maven.model.superpom; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.InputSource; import org.apache.maven.api.model.Model; import org.apache.maven.model.building.ModelProcessor; diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java index ae77f9ed46..18fb8894b3 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java @@ -18,6 +18,10 @@ */ package org.apache.maven.model.validation; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.util.Arrays; import java.util.HashMap; @@ -28,9 +32,7 @@ import java.util.Objects; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.model.Activation; import org.apache.maven.api.model.ActivationFile; import org.apache.maven.api.model.Build; diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/ComplexActivationTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/ComplexActivationTest.java index dd48c8d6d5..6c96644815 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/building/ComplexActivationTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/ComplexActivationTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.model.building; +import java.io.File; +import java.util.Properties; + +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -import java.io.File; -import java.util.Properties; -import org.junit.jupiter.api.Test; - /** * @author Konstantin Perikov */ diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java index f6add026ab..b7af3be3a9 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java @@ -18,18 +18,19 @@ */ package org.apache.maven.model.building; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.io.FileInputStream; import java.nio.file.Paths; + import org.apache.maven.api.model.Model; import org.apache.maven.model.v4.MavenXpp3Reader; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Benjamin Bentmann */ diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderTest.java index 41c264bd8f..7ab8db7c17 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderTest.java @@ -18,11 +18,9 @@ */ package org.apache.maven.model.building; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - import java.io.File; import java.util.concurrent.atomic.AtomicReference; + import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Parent; import org.apache.maven.api.model.Repository; @@ -32,6 +30,9 @@ import org.apache.maven.model.resolution.ModelResolver; import org.apache.maven.model.resolution.UnresolvableModelException; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + /** * @author Guillaume Nodet */ diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java index fa5f796660..59bcc0a1bf 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.model.building; +import java.io.File; +import java.io.IOException; + +import org.codehaus.plexus.util.Os; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assumptions.assumeTrue; -import java.io.File; -import java.io.IOException; -import org.codehaus.plexus.util.Os; -import org.junit.jupiter.api.Test; - /** * Test that validate the solution of MNG-6261 issue * diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/FileToRawModelMergerTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/FileToRawModelMergerTest.java index ce73c07b55..9d7b38904e 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/building/FileToRawModelMergerTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/FileToRawModelMergerTest.java @@ -18,18 +18,19 @@ */ package org.apache.maven.model.building; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasItems; - import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.maven.model.v4.MavenMerger; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasItems; + public class FileToRawModelMergerTest { /** diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java index 04cc82952a..af28a92e11 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/SimpleProblemCollector.java @@ -20,6 +20,7 @@ package org.apache.maven.model.building; import java.util.ArrayList; import java.util.List; + import org.apache.maven.model.Model; /** diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java index d39ee64614..fc0c6771fd 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java @@ -18,13 +18,10 @@ */ package org.apache.maven.model.inheritance; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.io.IOException; import java.nio.file.Path; + import org.apache.maven.api.model.Model; import org.apache.maven.model.building.AbstractModelSourceTransformer; import org.apache.maven.model.building.SimpleProblemCollector; @@ -38,6 +35,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.xmlunit.matchers.CompareMatcher; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Hervé Boutemy */ diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java index c68cde6d16..b50789efac 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java @@ -18,10 +18,6 @@ */ package org.apache.maven.model.interpolation; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.File; import java.text.SimpleDateFormat; import java.util.Arrays; @@ -34,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.TimeZone; + import org.apache.maven.api.model.Build; import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Model; @@ -47,6 +44,10 @@ import org.apache.maven.model.building.SimpleProblemCollector; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author jdcasey */ diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/MavenBuildTimestampTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/MavenBuildTimestampTest.java index 83af795a50..c315cb05b4 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/MavenBuildTimestampTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/MavenBuildTimestampTest.java @@ -18,13 +18,14 @@ */ package org.apache.maven.model.interpolation; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.util.Date; import java.util.HashMap; import java.util.Map; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class MavenBuildTimestampTest { @Test public void testMavenBuildTimestampUsesUTC() { diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/merge/MavenModelMergerTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/merge/MavenModelMergerTest.java index e94a9c5f91..251596c7a7 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/merge/MavenModelMergerTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/merge/MavenModelMergerTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.model.merge; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; - import java.util.Collections; + import org.apache.maven.api.model.Model; import org.apache.maven.api.model.Prerequisites; import org.apache.maven.api.model.Profile; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + public class MavenModelMergerTest { private MavenModelMerger modelMerger = new MavenModelMerger(); diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/path/DefaultUrlNormalizerTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/path/DefaultUrlNormalizerTest.java index 74d25147d8..def334d469 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/path/DefaultUrlNormalizerTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/path/DefaultUrlNormalizerTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.model.path; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; -import org.junit.jupiter.api.Test; - /** * @author Benjamin Bentmann */ diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/AbstractProfileActivatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/AbstractProfileActivatorTest.java index 8c9c0e54f3..bc4216d6a7 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/AbstractProfileActivatorTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/AbstractProfileActivatorTest.java @@ -18,9 +18,8 @@ */ package org.apache.maven.model.profile.activation; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.Properties; + import org.apache.maven.api.model.Profile; import org.apache.maven.model.building.SimpleProblemCollector; import org.apache.maven.model.profile.DefaultProfileActivationContext; @@ -28,6 +27,8 @@ import org.apache.maven.model.profile.ProfileActivationContext; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Provides common services to test {@link ProfileActivator} implementations. * diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/FileProfileActivatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/FileProfileActivatorTest.java index c3c77eb430..610bb7ff22 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/FileProfileActivatorTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/FileProfileActivatorTest.java @@ -18,11 +18,10 @@ */ package org.apache.maven.model.profile.activation; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.File; import java.io.IOException; import java.nio.file.Path; + import org.apache.maven.api.model.Activation; import org.apache.maven.api.model.ActivationFile; import org.apache.maven.api.model.Profile; @@ -33,6 +32,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * Tests {@link FileProfileActivator}. * diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivatorTest.java index e892f15ea5..93df428ad3 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivatorTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivatorTest.java @@ -19,6 +19,7 @@ package org.apache.maven.model.profile.activation; import java.util.Properties; + import org.apache.maven.api.model.Activation; import org.apache.maven.api.model.Profile; import org.junit.jupiter.api.BeforeEach; diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/PropertyProfileActivatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/PropertyProfileActivatorTest.java index 3c0a72ed5a..7f7981eca3 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/PropertyProfileActivatorTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/PropertyProfileActivatorTest.java @@ -19,6 +19,7 @@ package org.apache.maven.model.profile.activation; import java.util.Properties; + import org.apache.maven.api.model.Activation; import org.apache.maven.api.model.ActivationProperty; import org.apache.maven.api.model.Profile; diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java index 8c394303a1..486cb4bc69 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java @@ -18,12 +18,9 @@ */ package org.apache.maven.model.validation; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.InputStream; import java.util.List; + import org.apache.maven.model.Model; import org.apache.maven.model.building.DefaultModelBuildingRequest; import org.apache.maven.model.building.ModelBuildingRequest; @@ -34,6 +31,10 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author Trygve Laugstøl */ diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/BuildToRawPomXMLFilterFactory.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/BuildToRawPomXMLFilterFactory.java index 39685cd079..6dc83351bc 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/BuildToRawPomXMLFilterFactory.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/BuildToRawPomXMLFilterFactory.java @@ -22,6 +22,7 @@ import java.nio.file.Path; import java.util.Optional; import java.util.function.BiFunction; import java.util.function.Function; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; /** diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/CiFriendlyXMLFilter.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/CiFriendlyXMLFilter.java index 6ee497d3da..8ffedcb7d5 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/CiFriendlyXMLFilter.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/CiFriendlyXMLFilter.java @@ -20,6 +20,7 @@ package org.apache.maven.model.transform; import java.util.List; import java.util.function.Function; + import org.apache.maven.model.transform.pull.NodeBufferingParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/FastForwardFilter.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/FastForwardFilter.java index 2e4e61cb8c..2ac0540c06 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/FastForwardFilter.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/FastForwardFilter.java @@ -21,6 +21,7 @@ package org.apache.maven.model.transform; import java.io.IOException; import java.util.ArrayDeque; import java.util.Deque; + import org.apache.maven.model.transform.pull.BufferingParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/ModulesXMLFilter.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/ModulesXMLFilter.java index 32618b7fc3..af06ef9a78 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/ModulesXMLFilter.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/ModulesXMLFilter.java @@ -19,6 +19,7 @@ package org.apache.maven.model.transform; import java.util.List; + import org.apache.maven.model.transform.pull.NodeBufferingParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/ParentXMLFilter.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/ParentXMLFilter.java index 6f71d4b720..7f525e167c 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/ParentXMLFilter.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/ParentXMLFilter.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.function.Function; + import org.apache.maven.model.transform.pull.NodeBufferingParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/RawToConsumerPomXMLFilterFactory.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/RawToConsumerPomXMLFilterFactory.java index b1acdff4ce..2b700a564a 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/RawToConsumerPomXMLFilterFactory.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/RawToConsumerPomXMLFilterFactory.java @@ -19,6 +19,7 @@ package org.apache.maven.model.transform; import java.nio.file.Path; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; /** diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/ReactorDependencyXMLFilter.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/ReactorDependencyXMLFilter.java index 5e415651bc..359217b232 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/ReactorDependencyXMLFilter.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/ReactorDependencyXMLFilter.java @@ -20,6 +20,7 @@ package org.apache.maven.model.transform; import java.util.List; import java.util.function.BiFunction; + import org.apache.maven.model.transform.pull.NodeBufferingParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/RelativePathXMLFilter.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/RelativePathXMLFilter.java index a51a1b9996..181e2eb9bc 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/RelativePathXMLFilter.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/RelativePathXMLFilter.java @@ -19,6 +19,7 @@ package org.apache.maven.model.transform; import java.util.List; + import org.apache.maven.model.transform.pull.NodeBufferingParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/BufferingParser.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/BufferingParser.java index 8e6495bdba..4113771e40 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/BufferingParser.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/BufferingParser.java @@ -25,6 +25,7 @@ import java.util.ArrayDeque; import java.util.Deque; import java.util.Objects; import java.util.regex.Pattern; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/NodeBufferingParser.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/NodeBufferingParser.java index 2fb2e80945..40d9be4be0 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/NodeBufferingParser.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/NodeBufferingParser.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Objects; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/XmlUtils.java b/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/XmlUtils.java index 5fcb2d11d5..a2f71aa55a 100644 --- a/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/XmlUtils.java +++ b/maven-model-transform/src/main/java/org/apache/maven/model/transform/pull/XmlUtils.java @@ -24,6 +24,7 @@ import java.io.IOException; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; + import org.codehaus.plexus.util.xml.XmlStreamReader; import org.codehaus.plexus.util.xml.pull.MXSerializer; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-transform/src/test/java/org/apache/maven/model/transform/AbstractXMLFilterTests.java b/maven-model-transform/src/test/java/org/apache/maven/model/transform/AbstractXMLFilterTests.java index 75ee829cb5..b1d146a45a 100644 --- a/maven-model-transform/src/test/java/org/apache/maven/model/transform/AbstractXMLFilterTests.java +++ b/maven-model-transform/src/test/java/org/apache/maven/model/transform/AbstractXMLFilterTests.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; + import org.apache.maven.model.transform.pull.XmlUtils; import org.codehaus.plexus.util.xml.pull.MXParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; diff --git a/maven-model-transform/src/test/java/org/apache/maven/model/transform/CiFriendlyXMLFilterTest.java b/maven-model-transform/src/test/java/org/apache/maven/model/transform/CiFriendlyXMLFilterTest.java index c33c17e490..3a538a4101 100644 --- a/maven-model-transform/src/test/java/org/apache/maven/model/transform/CiFriendlyXMLFilterTest.java +++ b/maven-model-transform/src/test/java/org/apache/maven/model/transform/CiFriendlyXMLFilterTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.model.transform; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class CiFriendlyXMLFilterTest extends AbstractXMLFilterTests { @Override protected CiFriendlyXMLFilter getFilter(XmlPullParser parser) { diff --git a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ConsumerPomXMLFilterTest.java b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ConsumerPomXMLFilterTest.java index cc07b150b9..94be9c5e69 100644 --- a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ConsumerPomXMLFilterTest.java +++ b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ConsumerPomXMLFilterTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.model.transform; -import static org.xmlunit.assertj.XmlAssert.assertThat; - import java.nio.file.Path; import java.nio.file.Paths; import java.util.Optional; import java.util.function.BiFunction; import java.util.function.Function; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.junit.jupiter.api.Test; +import static org.xmlunit.assertj.XmlAssert.assertThat; + public class ConsumerPomXMLFilterTest extends AbstractXMLFilterTests { @Override protected XmlPullParser getFilter(XmlPullParser orgParser) { diff --git a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ModulesXMLFilterTest.java b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ModulesXMLFilterTest.java index 0ba9b50b93..732a88a215 100644 --- a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ModulesXMLFilterTest.java +++ b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ModulesXMLFilterTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.model.transform; -import static org.xmlunit.assertj.XmlAssert.assertThat; - import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.junit.jupiter.api.Test; +import static org.xmlunit.assertj.XmlAssert.assertThat; + public class ModulesXMLFilterTest extends AbstractXMLFilterTests { @Override diff --git a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ParentXMLFilterTest.java b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ParentXMLFilterTest.java index 77fd604694..4ef1b21931 100644 --- a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ParentXMLFilterTest.java +++ b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ParentXMLFilterTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.model.transform; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.nio.file.Path; import java.nio.file.Paths; import java.util.Optional; import java.util.function.Function; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class ParentXMLFilterTest extends AbstractXMLFilterTests { private Function filterCreator; diff --git a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ReactorDependencyXMLFilterTest.java b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ReactorDependencyXMLFilterTest.java index bc84ebf2c0..207a302e21 100644 --- a/maven-model-transform/src/test/java/org/apache/maven/model/transform/ReactorDependencyXMLFilterTest.java +++ b/maven-model-transform/src/test/java/org/apache/maven/model/transform/ReactorDependencyXMLFilterTest.java @@ -18,13 +18,14 @@ */ package org.apache.maven.model.transform; -import static org.xmlunit.assertj.XmlAssert.assertThat; - import java.util.function.BiFunction; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.xmlunit.assertj.XmlAssert.assertThat; + public class ReactorDependencyXMLFilterTest extends AbstractXMLFilterTests { private BiFunction reactorVersionMapper; diff --git a/maven-model-transform/src/test/java/org/apache/maven/model/transform/RelativePathXMLFilterTest.java b/maven-model-transform/src/test/java/org/apache/maven/model/transform/RelativePathXMLFilterTest.java index 7bb2953c07..875be5ab56 100644 --- a/maven-model-transform/src/test/java/org/apache/maven/model/transform/RelativePathXMLFilterTest.java +++ b/maven-model-transform/src/test/java/org/apache/maven/model/transform/RelativePathXMLFilterTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.model.transform; -import static org.xmlunit.assertj.XmlAssert.assertThat; - import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.junit.jupiter.api.Test; +import static org.xmlunit.assertj.XmlAssert.assertThat; + public class RelativePathXMLFilterTest extends AbstractXMLFilterTests { @Override protected RelativePathXMLFilter getFilter(XmlPullParser parser) { diff --git a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Reader.java b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Reader.java index b447a0dcd8..c469ebd22e 100644 --- a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Reader.java +++ b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Reader.java @@ -21,6 +21,7 @@ package org.apache.maven.model.io.xpp3; import java.io.IOException; import java.io.InputStream; import java.io.Reader; + import org.apache.maven.model.Model; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.xml.pull.EntityReplacementMap; diff --git a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3ReaderEx.java b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3ReaderEx.java index 3dc6bd4aa1..a72c00f9a9 100644 --- a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3ReaderEx.java +++ b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3ReaderEx.java @@ -21,6 +21,7 @@ package org.apache.maven.model.io.xpp3; import java.io.IOException; import java.io.InputStream; import java.io.Reader; + import org.apache.maven.model.InputSource; import org.apache.maven.model.Model; import org.codehaus.plexus.util.ReaderFactory; diff --git a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Writer.java b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Writer.java index 5ff750c23c..c739894c02 100644 --- a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Writer.java +++ b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3Writer.java @@ -21,6 +21,7 @@ package org.apache.maven.model.io.xpp3; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; + import org.apache.maven.model.Model; public class MavenXpp3Writer { diff --git a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3WriterEx.java b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3WriterEx.java index 5d7a8cf6fd..d2431ea56a 100644 --- a/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3WriterEx.java +++ b/maven-model/src/main/java/org/apache/maven/model/io/xpp3/MavenXpp3WriterEx.java @@ -21,6 +21,7 @@ package org.apache.maven.model.io.xpp3; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; + import org.apache.maven.model.InputLocation; import org.apache.maven.model.Model; diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java index c6a4009ec9..a8a4cbacb7 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code ActivationFile}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java index 45d9720ba6..55371e373c 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code ActivationOS}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java index 53e90568f5..dae9bb0341 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code ActivationProperty}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java index 46918dc1a6..eaeb62044d 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Activation}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java index 6551f30b96..6f42f4b7a3 100644 --- a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Build}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java index 7c6271d877..6c765712a5 100644 --- a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code CiManagement}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java index 207efaeb41..66ef525a47 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Contributor}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java index a8e3c92bd5..d63a93694a 100644 --- a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code DependencyManagement}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java index 012b55db52..9b00c53adb 100644 --- a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Dependency}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java index 108ec6cc9e..8da1c65137 100644 --- a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code DeploymentRepository}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java index c217acd293..3ba128318a 100644 --- a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Developer}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java index 3a65e1c9be..cd203804dc 100644 --- a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code DistributionManagement}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java index 3f18242f09..3791d8f64c 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Exclusion}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java index 867a12d636..8d6ec3d6c7 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Extension}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java index 7a44b14ba8..572f558f95 100644 --- a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code IssueManagement}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java index 0fc8027dd8..24ef14ef8d 100644 --- a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code License}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java index d3874d8a49..0c00e70036 100644 --- a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java @@ -18,13 +18,13 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code MailingList}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java index dc58aaf0c7..d3e0616da8 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Model}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java index 33898bb5a7..45029f0aba 100644 --- a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Notifier}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java index 1abe01a3d0..954f29bf36 100644 --- a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java @@ -18,13 +18,13 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Organization}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java index a93cf34664..daf4e34544 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Parent}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java index 425695fe8d..1625a19849 100644 --- a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code PluginConfiguration}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java index 9730210cd7..df1b79e87d 100644 --- a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code PluginContainer}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java index 2c4bc98618..3421c189de 100644 --- a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code PluginExecution}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java index cf540368c8..88a3389cad 100644 --- a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code PluginManagement}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java index 75d10c00bd..5f9c780727 100644 --- a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Plugin}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java index eac99ff53a..1a3fd8982c 100644 --- a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Prerequisites}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java index 9b5c5bda3a..61c539cbb9 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Profile}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java index 9335e35a12..88f203f1c1 100644 --- a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Relocation}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java index 8b620aa7f0..f35b2dc04b 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code ReportPlugin}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java index 9c82b4f2a0..7524fdb1ce 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code ReportSet}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java index 9c2f8d2014..e525e47a4d 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Reporting}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java index 9276352bef..21858905a5 100644 --- a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code RepositoryPolicy}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java index 6078c5e59b..fe3ed0e304 100644 --- a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Repository}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java index 9301dd498d..c94885659e 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Resource}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java index d7e94a80e9..82a576222a 100644 --- a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java @@ -18,13 +18,13 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Scm}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/SerializationTest.java b/maven-model/src/test/java/org/apache/maven/model/SerializationTest.java index 844a7fe2cc..5b8724736a 100644 --- a/maven-model/src/test/java/org/apache/maven/model/SerializationTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/SerializationTest.java @@ -18,16 +18,17 @@ */ package org.apache.maven.model; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; + import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; + public class SerializationTest { @Test diff --git a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java index e3f391e8e0..a002995520 100644 --- a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java @@ -18,12 +18,12 @@ */ package org.apache.maven.model; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; - /** * Tests {@code Site}. * diff --git a/maven-model/src/test/java/org/apache/maven/model/merge/MavenMergerTest.java b/maven-model/src/test/java/org/apache/maven/model/merge/MavenMergerTest.java index cc1a847628..6c068ebcb0 100644 --- a/maven-model/src/test/java/org/apache/maven/model/merge/MavenMergerTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/merge/MavenMergerTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.model.merge; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.is; - import java.util.Arrays; + import org.apache.maven.api.model.Contributor; import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Model; import org.apache.maven.model.v4.MavenMerger; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.is; + /** * MavenMerger is based on same instances, subclasses should override KeyComputer per type * diff --git a/maven-model/src/test/java/org/apache/maven/model/v4/ModelXmlTest.java b/maven-model/src/test/java/org/apache/maven/model/v4/ModelXmlTest.java index 075a0f2201..36e9c4cbf2 100644 --- a/maven-model/src/test/java/org/apache/maven/model/v4/ModelXmlTest.java +++ b/maven-model/src/test/java/org/apache/maven/model/v4/ModelXmlTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.model.v4; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.util.LinkedHashMap; import java.util.Map; + import org.apache.maven.api.model.Model; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class ModelXmlTest { @Test diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java index 3a2e64ca1c..5e76c40d9b 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java @@ -19,6 +19,7 @@ package org.apache.maven.plugin; import java.util.Map; + import org.apache.maven.plugin.logging.Log; import org.apache.maven.plugin.logging.SystemStreamLog; diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java index f463291e42..b895a28e40 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java @@ -20,6 +20,7 @@ package org.apache.maven.plugin; import java.util.Iterator; import java.util.List; + import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptor; diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java index 4ebd2712a3..e3999c7b21 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java @@ -23,6 +23,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Objects; + import org.apache.maven.plugin.Mojo; import org.codehaus.plexus.component.repository.ComponentDescriptor; import org.codehaus.plexus.configuration.PlexusConfiguration; diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java index 430da84773..92654a75da 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java @@ -30,6 +30,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.model.Plugin; diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java index 8f615ae37e..feecd752d9 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java @@ -23,6 +23,7 @@ import java.io.Reader; import java.util.ArrayList; import java.util.List; import java.util.Optional; + import org.apache.maven.internal.xml.XmlPlexusConfiguration; import org.apache.maven.internal.xml.Xpp3DomBuilder; import org.codehaus.plexus.component.repository.ComponentDependency; diff --git a/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/MojoDescriptorTest.java b/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/MojoDescriptorTest.java index eb5dd3d279..237a58fb8c 100644 --- a/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/MojoDescriptorTest.java +++ b/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/MojoDescriptorTest.java @@ -18,10 +18,10 @@ */ package org.apache.maven.plugin.descriptor; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class MojoDescriptorTest { @Test public void getParameterMap() throws DuplicateParameterException { diff --git a/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilderTest.java b/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilderTest.java index 4c9f03439f..65bb898e9a 100644 --- a/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilderTest.java +++ b/maven-plugin-api/src/test/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilderTest.java @@ -18,14 +18,9 @@ */ package org.apache.maven.plugin.descriptor; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.io.IOException; import java.io.Reader; + import org.codehaus.plexus.component.repository.ComponentDependency; import org.codehaus.plexus.component.repository.ComponentRequirement; import org.codehaus.plexus.configuration.PlexusConfiguration; @@ -33,6 +28,12 @@ import org.codehaus.plexus.configuration.PlexusConfigurationException; import org.codehaus.plexus.util.ReaderFactory; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Tests {@link PluginDescriptorBuilder}. * diff --git a/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java b/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java index ab3b089d8e..ca207e7847 100644 --- a/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java +++ b/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java @@ -18,20 +18,21 @@ */ package org.apache.maven.artifact.repository.metadata; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; + import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class MetadataTest { Artifact artifact; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorReaderDelegate.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorReaderDelegate.java index 4fd58cb412..1ea74fcfb0 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorReaderDelegate.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/ArtifactDescriptorReaderDelegate.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import org.apache.maven.model.DependencyManagement; import org.apache.maven.model.DistributionManagement; import org.apache.maven.model.License; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java index b946ca84d6..8a3ed3ed6c 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java @@ -18,14 +18,16 @@ */ package org.apache.maven.repository.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.LinkedHashSet; import java.util.Map; import java.util.Objects; import java.util.Properties; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.model.DistributionManagement; import org.apache.maven.model.Model; import org.apache.maven.model.Relocation; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java index aca46fa99a..4bcb09691c 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCache.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.internal; import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; + import org.apache.maven.building.Source; import org.apache.maven.model.building.ModelCache; import org.eclipse.aether.RepositorySystemSession; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCacheFactory.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCacheFactory.java index 22c23cad9a..e23ef59d3a 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCacheFactory.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCacheFactory.java @@ -20,6 +20,7 @@ package org.apache.maven.repository.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.apache.maven.model.building.ModelCache; import org.eclipse.aether.RepositorySystemSession; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java index e6335d8b4b..c48968f89b 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java @@ -25,6 +25,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; + import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Parent; import org.apache.maven.api.model.Repository; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java index 4b928bf929..15ab81bd03 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java @@ -18,6 +18,10 @@ */ package org.apache.maven.repository.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.FileInputStream; import java.io.InputStream; import java.util.ArrayList; @@ -26,9 +30,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.artifact.repository.metadata.Versioning; import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java index 53f27849e2..6ac599d887 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java @@ -18,6 +18,10 @@ */ package org.apache.maven.repository.internal; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -28,9 +32,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.artifact.repository.metadata.Snapshot; import org.apache.maven.artifact.repository.metadata.SnapshotVersion; import org.apache.maven.artifact.repository.metadata.Versioning; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionSchemeProvider.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionSchemeProvider.java index 39ffcd349d..8bebb05f57 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionSchemeProvider.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionSchemeProvider.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.internal; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + import org.eclipse.aether.util.version.GenericVersionScheme; import org.eclipse.aether.version.VersionScheme; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java index 52c34c1204..86c2f1f716 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.Snapshot; import org.apache.maven.artifact.repository.metadata.SnapshotVersion; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java index 57a5409ccf..534efd768f 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.impl.MetadataGenerator; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java index 86d5307773..799cb5c1ec 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java @@ -25,6 +25,7 @@ import java.io.Writer; import java.util.Collections; import java.util.Date; import java.util.Map; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader; import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Writer; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java index b6c1daac7e..1dd85e300f 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java @@ -18,14 +18,16 @@ */ package org.apache.maven.repository.internal; -import com.google.inject.AbstractModule; -import com.google.inject.Provides; -import com.google.inject.name.Names; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.Collections; import java.util.HashSet; import java.util.Set; -import javax.inject.Named; -import javax.inject.Singleton; + +import com.google.inject.AbstractModule; +import com.google.inject.Provides; +import com.google.inject.name.Names; import org.apache.maven.model.building.DefaultModelBuilderFactory; import org.apache.maven.model.building.ModelBuilder; import org.eclipse.aether.impl.ArtifactDescriptorReader; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java index 66aae78814..f04c2a43be 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java @@ -22,6 +22,7 @@ import java.io.File; import java.util.ArrayList; import java.util.Collection; import java.util.Date; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.eclipse.aether.artifact.Artifact; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadata.java index cc6332bcbd..18fdbba38e 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadata.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadata.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.LinkedHashMap; import java.util.List; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.Plugin; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java index 486fff61f5..b3d68847ec 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java @@ -29,6 +29,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.jar.JarFile; import java.util.zip.ZipEntry; + import org.apache.maven.repository.internal.PluginsMetadata.PluginInfo; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.xml.Xpp3Dom; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGeneratorFactory.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGeneratorFactory.java index 7affc9d464..773ea7de2d 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGeneratorFactory.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGeneratorFactory.java @@ -20,6 +20,7 @@ package org.apache.maven.repository.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.deployment.DeployRequest; import org.eclipse.aether.impl.MetadataGenerator; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java index 00d8a0d5e1..0797fd7fdd 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java @@ -21,6 +21,7 @@ package org.apache.maven.repository.internal; import java.io.File; import java.util.Map; import java.util.Objects; + import org.eclipse.aether.artifact.AbstractArtifact; import org.eclipse.aether.artifact.Artifact; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java index 6279cf0405..f26ace8cd0 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java @@ -27,6 +27,7 @@ import java.util.GregorianCalendar; import java.util.LinkedHashMap; import java.util.Map; import java.util.TimeZone; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.Snapshot; import org.apache.maven.artifact.repository.metadata.SnapshotVersion; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java index 3da533811a..b2f64f2c5f 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataGenerator.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.deployment.DeployRequest; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java index ec672348af..7516c206d8 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java @@ -20,6 +20,7 @@ package org.apache.maven.repository.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.deployment.DeployRequest; import org.eclipse.aether.impl.MetadataGenerator; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java index 12563e2637..8ac1077619 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadata.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.LinkedHashSet; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.Versioning; import org.eclipse.aether.artifact.Artifact; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java index a720454f50..e24e54be47 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGenerator.java @@ -24,6 +24,7 @@ import java.util.Date; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.deployment.DeployRequest; diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java index 660170e240..d333699449 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java @@ -20,6 +20,7 @@ package org.apache.maven.repository.internal; import javax.inject.Named; import javax.inject.Singleton; + import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.deployment.DeployRequest; import org.eclipse.aether.impl.MetadataGenerator; diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/AbstractRepositoryTestCase.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/AbstractRepositoryTestCase.java index 8bf3e5c0f0..e4c9b14a54 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/AbstractRepositoryTestCase.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/AbstractRepositoryTestCase.java @@ -18,10 +18,10 @@ */ package org.apache.maven.repository.internal; -import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; +import javax.inject.Inject; import java.net.MalformedURLException; -import javax.inject.Inject; + import org.apache.maven.repository.internal.util.ConsoleRepositoryListener; import org.apache.maven.repository.internal.util.ConsoleTransferListener; import org.codehaus.plexus.PlexusContainer; @@ -33,6 +33,8 @@ import org.eclipse.aether.repository.LocalRepository; import org.eclipse.aether.repository.RemoteRepository; import org.junit.jupiter.api.BeforeEach; +import static org.codehaus.plexus.testing.PlexusExtension.getTestFile; + @PlexusTest public abstract class AbstractRepositoryTestCase { @Inject diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java index 373195e488..5f3bb92a19 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java @@ -18,12 +18,8 @@ */ package org.apache.maven.repository.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - import java.lang.reflect.Field; + import org.eclipse.aether.RepositoryEvent; import org.eclipse.aether.RepositoryEvent.EventType; import org.eclipse.aether.artifact.DefaultArtifact; @@ -33,6 +29,11 @@ import org.eclipse.aether.resolution.ArtifactDescriptorRequest; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + public class DefaultArtifactDescriptorReaderTest extends AbstractRepositoryTestCase { @Test diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultModelResolverTest.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultModelResolverTest.java index d12eedfb20..7566046920 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultModelResolverTest.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultModelResolverTest.java @@ -18,14 +18,10 @@ */ package org.apache.maven.repository.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.net.MalformedURLException; import java.util.Arrays; import java.util.concurrent.atomic.AtomicReference; + import org.apache.maven.api.model.Dependency; import org.apache.maven.api.model.Parent; import org.apache.maven.model.resolution.ModelResolver; @@ -36,6 +32,11 @@ import org.eclipse.aether.impl.RemoteRepositoryManager; import org.eclipse.aether.impl.VersionRangeResolver; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Test cases for the default {@code ModelResolver} implementation. * diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultVersionResolverTest.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultVersionResolverTest.java index faa2efdc2a..6c4acf2001 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultVersionResolverTest.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultVersionResolverTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.repository.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; - import javax.inject.Inject; + import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.aether.resolution.VersionRequest; import org.eclipse.aether.resolution.VersionResult; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class DefaultVersionResolverTest extends AbstractRepositoryTestCase { @Inject private DefaultVersionResolver versionResolver; diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/MavenRepositorySystemUtilsTest.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/MavenRepositorySystemUtilsTest.java index 2b9c9b9080..eb7b0b5d41 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/MavenRepositorySystemUtilsTest.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/MavenRepositorySystemUtilsTest.java @@ -18,11 +18,11 @@ */ package org.apache.maven.repository.internal; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import org.eclipse.aether.RepositorySystemSession; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; + public class MavenRepositorySystemUtilsTest { @Test diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataTest.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataTest.java index 517364d49c..3d2271c134 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataTest.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataTest.java @@ -18,8 +18,6 @@ */ package org.apache.maven.repository.internal; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Date; @@ -27,12 +25,15 @@ import java.util.GregorianCalendar; import java.util.HashSet; import java.util.Locale; import java.util.Set; + import org.apache.maven.artifact.repository.metadata.Metadata; import org.eclipse.aether.artifact.DefaultArtifact; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class RemoteSnapshotMetadataTest { private Locale defaultLocale; diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java index e666f72d38..023313d2b3 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java @@ -18,14 +18,9 @@ */ package org.apache.maven.repository.internal; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.util.Arrays; import java.util.List; + import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.aether.collection.CollectRequest; @@ -38,6 +33,12 @@ import org.eclipse.aether.resolution.ArtifactRequest; import org.eclipse.aether.resolution.ArtifactResult; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class RepositorySystemTest extends AbstractRepositoryTestCase { @Test public void testResolveVersionRange() throws Exception { diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleRepositoryListener.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleRepositoryListener.java index b5b439c067..603f9938d9 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleRepositoryListener.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleRepositoryListener.java @@ -19,6 +19,7 @@ package org.apache.maven.repository.internal.util; import java.io.PrintStream; + import org.eclipse.aether.AbstractRepositoryListener; import org.eclipse.aether.RepositoryEvent; diff --git a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java index 5272d23b16..aaf648a776 100644 --- a/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java +++ b/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/util/ConsoleTransferListener.java @@ -24,6 +24,7 @@ import java.text.DecimalFormatSymbols; import java.util.Locale; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; + import org.eclipse.aether.transfer.AbstractTransferListener; import org.eclipse.aether.transfer.TransferEvent; import org.eclipse.aether.transfer.TransferResource; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java index 0656c54692..5b80c59d1e 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java @@ -18,6 +18,10 @@ */ package org.apache.maven.settings.building; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.StringReader; @@ -25,9 +29,7 @@ import java.io.StringWriter; import java.util.Collections; import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.settings.Settings; import org.apache.maven.building.FileSource; import org.apache.maven.building.Source; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java index 22a19bd8d6..6ff1388c6b 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java @@ -20,6 +20,7 @@ package org.apache.maven.settings.building; import java.util.ArrayList; import java.util.List; + import org.apache.maven.settings.Settings; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblemCollector.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblemCollector.java index 2aab034c96..c4159b0fbb 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblemCollector.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblemCollector.java @@ -20,6 +20,7 @@ package org.apache.maven.settings.building; import java.util.ArrayList; import java.util.List; + import org.apache.maven.settings.io.SettingsParseException; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/FileSettingsSource.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/FileSettingsSource.java index f652ce295f..6a54419457 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/FileSettingsSource.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/FileSettingsSource.java @@ -19,6 +19,7 @@ package org.apache.maven.settings.building; import java.io.File; + import org.apache.maven.building.FileSource; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java index d05ddd0f32..1b1730aba4 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java @@ -19,6 +19,7 @@ package org.apache.maven.settings.building; import java.util.List; + import org.apache.maven.settings.Settings; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/UrlSettingsSource.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/UrlSettingsSource.java index 9816c4601b..4b86f97efd 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/UrlSettingsSource.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/UrlSettingsSource.java @@ -19,6 +19,7 @@ package org.apache.maven.settings.building; import java.net.URL; + import org.apache.maven.building.UrlSource; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java index 5d5278b1da..6f19d2e917 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java @@ -18,11 +18,13 @@ */ package org.apache.maven.settings.crypto; -import java.util.ArrayList; -import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; + +import java.util.ArrayList; +import java.util.List; + import org.apache.maven.settings.Proxy; import org.apache.maven.settings.Server; import org.apache.maven.settings.building.DefaultSettingsProblem; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java index 107cd87879..947b75173a 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java @@ -21,6 +21,7 @@ package org.apache.maven.settings.crypto; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.apache.maven.settings.Proxy; import org.apache.maven.settings.Server; import org.apache.maven.settings.Settings; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java index db20f9de5d..988787789a 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java @@ -20,6 +20,7 @@ package org.apache.maven.settings.crypto; import java.util.ArrayList; import java.util.List; + import org.apache.maven.settings.Proxy; import org.apache.maven.settings.Server; import org.apache.maven.settings.building.SettingsProblem; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java index be5b65bceb..d912c7de87 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java @@ -18,11 +18,13 @@ */ package org.apache.maven.settings.crypto; -import java.util.Map; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; + +import java.util.Map; + import org.sonatype.plexus.components.cipher.PlexusCipher; import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher; import org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java index 9b80eb9f1c..e31de63720 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java @@ -19,6 +19,7 @@ package org.apache.maven.settings.crypto; import java.util.List; + import org.apache.maven.settings.Proxy; import org.apache.maven.settings.Server; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java index 100ac4af64..91e8ffde81 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java @@ -19,6 +19,7 @@ package org.apache.maven.settings.crypto; import java.util.List; + import org.apache.maven.settings.Proxy; import org.apache.maven.settings.Server; import org.apache.maven.settings.building.SettingsProblem; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsReader.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsReader.java index b1a653fa7b..accb57bd93 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsReader.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsReader.java @@ -18,14 +18,16 @@ */ package org.apache.maven.settings.io; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.settings.Settings; import org.apache.maven.settings.v4.SettingsXpp3Reader; import org.codehaus.plexus.util.ReaderFactory; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java index 4550240d05..a8d6bca0c6 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java @@ -18,6 +18,9 @@ */ package org.apache.maven.settings.io; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.OutputStream; @@ -25,8 +28,7 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.util.Map; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.settings.Settings; import org.apache.maven.settings.v4.SettingsXpp3Writer; import org.codehaus.plexus.util.WriterFactory; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsReader.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsReader.java index b52f0a2df6..257b097a6e 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsReader.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsReader.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; + import org.apache.maven.api.settings.Settings; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsWriter.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsWriter.java index 819581392b..8a7ced6b9e 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsWriter.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/SettingsWriter.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.util.Map; + import org.apache.maven.api.settings.Settings; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java index 0e6aaf7a63..9429227958 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java @@ -26,6 +26,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.maven.api.settings.IdentifiableBase; import org.apache.maven.api.settings.Settings; import org.codehaus.plexus.util.StringUtils; diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java index 4cb0a671a9..36556e9699 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java @@ -18,11 +18,13 @@ */ package org.apache.maven.settings.validation; +import javax.inject.Named; +import javax.inject.Singleton; + import java.util.HashSet; import java.util.List; import java.util.Set; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.settings.Mirror; import org.apache.maven.api.settings.Profile; import org.apache.maven.api.settings.Proxy; diff --git a/maven-settings-builder/src/test/java/org/apache/maven/settings/building/DefaultSettingsBuilderFactoryTest.java b/maven-settings-builder/src/test/java/org/apache/maven/settings/building/DefaultSettingsBuilderFactoryTest.java index 9bcdeb142b..7aadfcb070 100644 --- a/maven-settings-builder/src/test/java/org/apache/maven/settings/building/DefaultSettingsBuilderFactoryTest.java +++ b/maven-settings-builder/src/test/java/org/apache/maven/settings/building/DefaultSettingsBuilderFactoryTest.java @@ -18,11 +18,12 @@ */ package org.apache.maven.settings.building; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import java.io.File; + import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; + /** * @author Benjamin Bentmann */ diff --git a/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java b/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java index c66dc0d893..18c33c20ae 100644 --- a/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java +++ b/maven-settings-builder/src/test/java/org/apache/maven/settings/validation/DefaultSettingsValidatorTest.java @@ -18,13 +18,11 @@ */ package org.apache.maven.settings.validation; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; + import org.apache.maven.api.settings.Mirror; import org.apache.maven.api.settings.Profile; import org.apache.maven.api.settings.Proxy; @@ -37,6 +35,9 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * @author mkleint */ diff --git a/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Reader.java b/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Reader.java index cfaf081276..75cbef3e58 100644 --- a/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Reader.java +++ b/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Reader.java @@ -21,6 +21,7 @@ package org.apache.maven.settings.io.xpp3; import java.io.IOException; import java.io.InputStream; import java.io.Reader; + import org.apache.maven.settings.Settings; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.xml.pull.EntityReplacementMap; diff --git a/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Writer.java b/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Writer.java index 2725af23a7..26c750c072 100644 --- a/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Writer.java +++ b/maven-settings/src/main/java/org/apache/maven/settings/io/xpp3/SettingsXpp3Writer.java @@ -21,6 +21,7 @@ package org.apache.maven.settings.io.xpp3; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; + import org.apache.maven.settings.Settings; public class SettingsXpp3Writer { diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenLoggerFactory.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenLoggerFactory.java index 70fe5abeb6..d37bac17d9 100644 --- a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenLoggerFactory.java +++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenLoggerFactory.java @@ -19,6 +19,7 @@ package org.slf4j.impl; import java.util.Optional; + import org.apache.maven.logwrapper.LogLevelRecorder; import org.apache.maven.logwrapper.MavenSlf4jWrapperFactory; import org.slf4j.Logger; diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java index 129616c757..9fc049fb0f 100644 --- a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java +++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java @@ -18,11 +18,11 @@ */ package org.slf4j.impl; +import java.io.PrintStream; + import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; import static org.apache.maven.shared.utils.logging.MessageUtils.level; -import java.io.PrintStream; - /** * Logger for Maven, that support colorization of levels and stacktraces. This class implements 2 methods introduced in * slf4j-simple provider local copy. diff --git a/maven-slf4j-provider/src/test/java/org/slf4j/impl/MavenLoggerFactoryTest.java b/maven-slf4j-provider/src/test/java/org/slf4j/impl/MavenLoggerFactoryTest.java index 2c3bc00cb1..27cc0a4f3d 100644 --- a/maven-slf4j-provider/src/test/java/org/slf4j/impl/MavenLoggerFactoryTest.java +++ b/maven-slf4j-provider/src/test/java/org/slf4j/impl/MavenLoggerFactoryTest.java @@ -18,6 +18,10 @@ */ package org.slf4j.impl; +import org.apache.maven.logwrapper.LogLevelRecorder; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; + import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -27,10 +31,6 @@ import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.apache.maven.logwrapper.LogLevelRecorder; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; - public class MavenLoggerFactoryTest { @Test public void createsSimpleLogger() { diff --git a/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/LogLevelRecorder.java b/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/LogLevelRecorder.java index 76e3df75e6..d77ca4df1f 100644 --- a/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/LogLevelRecorder.java +++ b/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/LogLevelRecorder.java @@ -20,6 +20,7 @@ package org.apache.maven.logwrapper; import java.util.HashMap; import java.util.Map; + import org.slf4j.event.Level; /** diff --git a/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/MavenSlf4jWrapperFactory.java b/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/MavenSlf4jWrapperFactory.java index bd3a3d382c..afa8bb11f5 100644 --- a/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/MavenSlf4jWrapperFactory.java +++ b/maven-slf4j-wrapper/src/main/java/org/apache/maven/logwrapper/MavenSlf4jWrapperFactory.java @@ -19,6 +19,7 @@ package org.apache.maven.logwrapper; import java.util.Optional; + import org.slf4j.ILoggerFactory; /** diff --git a/maven-slf4j-wrapper/src/test/java/org/apache/maven/logwrapper/LogLevelRecorderTest.java b/maven-slf4j-wrapper/src/test/java/org/apache/maven/logwrapper/LogLevelRecorderTest.java index ce4b7a8be4..adda5cb5a6 100644 --- a/maven-slf4j-wrapper/src/test/java/org/apache/maven/logwrapper/LogLevelRecorderTest.java +++ b/maven-slf4j-wrapper/src/test/java/org/apache/maven/logwrapper/LogLevelRecorderTest.java @@ -18,14 +18,14 @@ */ package org.apache.maven.logwrapper; +import org.junit.jupiter.api.Test; +import org.slf4j.event.Level; + import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.Test; -import org.slf4j.event.Level; - public class LogLevelRecorderTest { @Test public void createsLogLevelRecorder() { diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java index 1326fa06a2..48ca8aaa71 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java @@ -18,15 +18,17 @@ */ package org.apache.maven.toolchain.building; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.util.Collections; import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.toolchain.PersistedToolchains; import org.apache.maven.api.toolchain.TrackableBase; import org.apache.maven.building.Problem; diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java index cd0b83d7b8..afe99f8461 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java @@ -20,6 +20,7 @@ package org.apache.maven.toolchain.building; import java.util.ArrayList; import java.util.List; + import org.apache.maven.building.Problem; import org.apache.maven.toolchain.model.PersistedToolchains; diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java index 5d4a852605..d45480d475 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java @@ -22,6 +22,7 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; + import org.apache.maven.building.Problem; /** diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java index 5b444606ef..74c9197780 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java @@ -19,6 +19,7 @@ package org.apache.maven.toolchain.building; import java.util.List; + import org.apache.maven.building.Problem; import org.apache.maven.toolchain.model.PersistedToolchains; diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java index 6f5cfdca5c..8bda68f91c 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java @@ -18,14 +18,16 @@ */ package org.apache.maven.toolchain.io; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.toolchain.PersistedToolchains; import org.apache.maven.toolchain.v4.MavenToolchainsXpp3Reader; import org.codehaus.plexus.util.ReaderFactory; diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsWriter.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsWriter.java index 43dea0a0fe..3dda1b2bc6 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsWriter.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsWriter.java @@ -18,12 +18,14 @@ */ package org.apache.maven.toolchain.io; +import javax.inject.Named; +import javax.inject.Singleton; + import java.io.IOException; import java.io.Writer; import java.util.Map; import java.util.Objects; -import javax.inject.Named; -import javax.inject.Singleton; + import org.apache.maven.api.toolchain.PersistedToolchains; import org.apache.maven.toolchain.v4.MavenToolchainsXpp3Writer; diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java index 8b3b60608b..0feedb80d8 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Map; + import org.apache.maven.api.toolchain.PersistedToolchains; /** diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsWriter.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsWriter.java index 293e3f5d29..c58dc42af1 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsWriter.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsWriter.java @@ -21,6 +21,7 @@ package org.apache.maven.toolchain.io; import java.io.IOException; import java.io.Writer; import java.util.Map; + import org.apache.maven.api.toolchain.PersistedToolchains; /** diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java index b511577bd5..bd6d880b38 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import org.apache.maven.api.toolchain.PersistedToolchains; import org.apache.maven.api.toolchain.ToolchainModel; import org.apache.maven.api.xml.Dom; diff --git a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java index 362a617ac1..63d4874320 100644 --- a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java +++ b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java @@ -18,17 +18,12 @@ */ package org.apache.maven.toolchain.building; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; - import java.io.IOException; import java.io.InputStream; import java.util.Collections; import java.util.HashMap; import java.util.Map; + import org.apache.maven.api.toolchain.PersistedToolchains; import org.apache.maven.api.toolchain.ToolchainModel; import org.apache.maven.building.StringSource; @@ -44,6 +39,12 @@ import org.mockito.InjectMocks; import org.mockito.MockitoAnnotations; import org.mockito.Spy; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.doThrow; + public class DefaultToolchainsBuilderTest { private static final String LS = System.lineSeparator(); diff --git a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java index 55bcfa535e..432cd15c59 100644 --- a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java +++ b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java @@ -18,14 +18,15 @@ */ package org.apache.maven.toolchain.building; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.util.Collections; + import org.apache.maven.building.Problem; import org.apache.maven.building.ProblemCollector; import org.apache.maven.building.ProblemCollectorFactory; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class ToolchainsBuildingExceptionTest { private static final String LS = System.lineSeparator(); diff --git a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java index 95d77f0fa4..04aad77f1d 100644 --- a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java +++ b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java @@ -18,15 +18,16 @@ */ package org.apache.maven.toolchain.merge; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.InputStream; + import org.apache.maven.api.toolchain.PersistedToolchains; import org.apache.maven.api.toolchain.TrackableBase; import org.apache.maven.api.xml.Dom; import org.apache.maven.toolchain.v4.MavenToolchainsXpp3Reader; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class MavenToolchainMergerTest { private MavenToolchainMerger merger = new MavenToolchainMerger(); diff --git a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/DomBuilder.java b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/DomBuilder.java index b9abd32727..09afaff419 100644 --- a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/DomBuilder.java +++ b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/DomBuilder.java @@ -19,6 +19,7 @@ package org.apache.maven.internal.xml; import java.io.Reader; + import org.codehaus.plexus.util.xml.pull.MXParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3Dom.java b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3Dom.java index 4373f3988a..1831149ae8 100644 --- a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3Dom.java +++ b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3Dom.java @@ -33,6 +33,7 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.maven.api.xml.Dom; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; import org.codehaus.plexus.util.xml.SerializerXMLWriter; diff --git a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomBuilder.java b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomBuilder.java index 077efca5b6..6f3422dcc7 100644 --- a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomBuilder.java +++ b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomBuilder.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.api.xml.Dom; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.xml.pull.MXParser; diff --git a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomWriter.java b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomWriter.java index c6da086242..39fc46c6fe 100644 --- a/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomWriter.java +++ b/maven-xml-impl/src/main/java/org/apache/maven/internal/xml/Xpp3DomWriter.java @@ -21,6 +21,7 @@ package org.apache.maven.internal.xml; import java.io.PrintWriter; import java.io.Writer; import java.util.Map; + import org.apache.maven.api.xml.Dom; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; import org.codehaus.plexus.util.xml.XMLWriter; diff --git a/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java b/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java index 7db5160784..45ec61fb14 100644 --- a/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java +++ b/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.maven.api.xml.Dom; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlSerializer; diff --git a/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java b/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java index 7982b04538..dd5ac296a6 100644 --- a/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java +++ b/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java @@ -21,6 +21,7 @@ package org.codehaus.plexus.util.xml; import java.io.IOException; import java.io.InputStream; import java.io.Reader; + import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-xml-impl/src/test/java/org/apache/maven/internal/xml/Xpp3DomTest.java b/maven-xml-impl/src/test/java/org/apache/maven/internal/xml/Xpp3DomTest.java index 4abd156cc8..aab1aacb88 100644 --- a/maven-xml-impl/src/test/java/org/apache/maven/internal/xml/Xpp3DomTest.java +++ b/maven-xml-impl/src/test/java/org/apache/maven/internal/xml/Xpp3DomTest.java @@ -18,17 +18,18 @@ */ package org.apache.maven.internal.xml; -import static org.junit.jupiter.api.Assertions.assertEquals; - import java.io.IOException; import java.io.StringReader; import java.util.List; import java.util.stream.Collectors; + import org.apache.maven.api.xml.Dom; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class Xpp3DomTest { /** diff --git a/pom.xml b/pom.xml index 8f15235900..7a4ecbd650 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ under the License. maven-parent 39 - + maven