├── .asf.yaml ├── .git-blame-ignore-revs ├── .github ├── ISSUE_TEMPLATE │ ├── BUG.yml │ ├── FEATURE.yml │ └── config.yml ├── dependabot.yml ├── pull_request_template.md ├── release-drafter.yml └── workflows │ ├── maven-verify.yml │ ├── pr-automation.yml │ ├── release-drafter.yml │ └── stale.yml ├── .gitignore ├── CONTRIBUTING.md ├── Jenkinsfile ├── LICENSE ├── NOTICE ├── README.md ├── deploySite.bat ├── deploySite.sh ├── enforcer-api ├── pom.xml └── src │ ├── custom-rule-sample │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── example │ │ │ └── custom │ │ │ └── rule │ │ │ └── MyCustomRule.java │ └── usage-pom.xml │ ├── main │ ├── assembly │ │ └── custom-rule-sample.xml │ └── java │ │ └── org │ │ └── apache │ │ └── maven │ │ └── enforcer │ │ └── rule │ │ └── api │ │ ├── AbstractEnforcerRule.java │ │ ├── AbstractEnforcerRuleBase.java │ │ ├── AbstractEnforcerRuleConfigProvider.java │ │ ├── EnforcerLevel.java │ │ ├── EnforcerLogger.java │ │ ├── EnforcerRule.java │ │ ├── EnforcerRule2.java │ │ ├── EnforcerRuleBase.java │ │ ├── EnforcerRuleError.java │ │ ├── EnforcerRuleException.java │ │ └── EnforcerRuleHelper.java │ └── site │ ├── apt │ ├── index.apt │ └── writing-a-custom-rule.apt.vm │ └── site.xml ├── enforcer-rules ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── maven │ │ └── enforcer │ │ └── rules │ │ ├── AbstractStandardEnforcerRule.java │ │ ├── AlwaysFail.java │ │ ├── AlwaysPass.java │ │ ├── BanDependencyManagementScope.java │ │ ├── BanDistributionManagement.java │ │ ├── BanDuplicatePomDependencyVersions.java │ │ ├── BannedPlugins.java │ │ ├── BannedRepositories.java │ │ ├── EvaluateBeanshell.java │ │ ├── ExternalRules.java │ │ ├── ReactorModuleConvergence.java │ │ ├── RequireActiveProfile.java │ │ ├── RequireExplicitDependencyScope.java │ │ ├── RequireJavaVendor.java │ │ ├── RequireMatchingCoordinates.java │ │ ├── RequireNoRepositories.java │ │ ├── RequireOS.java │ │ ├── RequirePluginVersions.java │ │ ├── RequirePrerequisite.java │ │ ├── RequireProfileIdsExist.java │ │ ├── RequireReleaseVersion.java │ │ ├── RequireSameVersions.java │ │ ├── RequireSnapshotVersion.java │ │ ├── checksum │ │ ├── NormalizeLineSeparatorReader.java │ │ ├── RequireFileChecksum.java │ │ └── RequireTextFileChecksum.java │ │ ├── dependency │ │ ├── BanDynamicVersions.java │ │ ├── BanTransitiveDependencies.java │ │ ├── BannedDependencies.java │ │ ├── BannedDependenciesBase.java │ │ ├── DependencyConvergence.java │ │ ├── DependencyVersionMap.java │ │ ├── RequireReleaseDeps.java │ │ ├── RequireUpperBoundDeps.java │ │ └── ResolverUtil.java │ │ ├── files │ │ ├── AbstractRequireFiles.java │ │ ├── RequireFilesDontExist.java │ │ ├── RequireFilesExist.java │ │ └── RequireFilesSize.java │ │ ├── property │ │ ├── AbstractPropertyEnforcerRule.java │ │ ├── RequireEnvironmentVariable.java │ │ └── RequireProperty.java │ │ ├── utils │ │ ├── ArtifactMatcher.java │ │ ├── ArtifactUtils.java │ │ ├── EnforcerRuleUtils.java │ │ ├── ExpressionEvaluator.java │ │ ├── OSUtil.java │ │ ├── ParentNodeProvider.java │ │ ├── ParentsVisitor.java │ │ └── PluginWrapper.java │ │ └── version │ │ ├── AbstractVersionEnforcer.java │ │ ├── RequireJavaVersion.java │ │ └── RequireMavenVersion.java │ ├── site │ ├── apt │ │ ├── Images.odp │ │ ├── alwaysFail.apt.vm │ │ ├── alwaysPass.apt.vm │ │ ├── banDependencyManagementScope.apt.vm │ │ ├── banDistributionManagement.apt.vm │ │ ├── banDuplicatePomDependencyVersions.apt.vm │ │ ├── banDynamicVersions.apt.vm │ │ ├── banTransitiveDependencies.apt.vm │ │ ├── bannedDependencies.apt.vm │ │ ├── bannedPlugins.apt.vm │ │ ├── bannedRepositories.apt.vm │ │ ├── dependencyConvergence.apt.vm │ │ ├── evaluateBeanshell.apt.vm │ │ ├── externalRules.apt.vm │ │ ├── index.apt │ │ ├── reactorModuleConvergence.apt.vm │ │ ├── requireActiveProfile.apt.vm │ │ ├── requireEnvironmentVariable.apt.vm │ │ ├── requireExplicitDependencyScope.apt.vm │ │ ├── requireFileChecksum.apt.vm │ │ ├── requireFilesDontExist.apt.vm │ │ ├── requireFilesExist.apt.vm │ │ ├── requireFilesSize.apt.vm │ │ ├── requireJavaVendor.apt.vm │ │ ├── requireJavaVersion.apt.vm │ │ ├── requireMatchingCoordinates.apt.vm │ │ ├── requireMavenVersion.apt.vm │ │ ├── requireNoRepositories.apt.vm │ │ ├── requireOS.apt.vm │ │ ├── requirePluginVersions.apt.vm │ │ ├── requirePrerequisite.apt.vm │ │ ├── requireProfileIdsExist.apt.vm │ │ ├── requireProperty.apt.vm │ │ ├── requireReleaseDeps.apt.vm │ │ ├── requireReleaseVersion.apt.vm │ │ ├── requireSameVersions.apt.vm │ │ ├── requireSnapshotVersion.apt.vm │ │ ├── requireTextFileChecksum.apt.vm │ │ ├── requireUpperBoundDeps.apt.vm │ │ └── versionRanges.apt │ ├── resources │ │ └── images │ │ │ ├── module.png │ │ │ ├── root-with-modules.png │ │ │ ├── root-with-parent-and-modules.png │ │ │ ├── root-with-parent.png │ │ │ └── root.png │ └── site.xml │ └── test │ ├── java │ └── org │ │ └── apache │ │ └── maven │ │ └── enforcer │ │ └── rules │ │ ├── BanDependencyManagementScopeTest.java │ │ ├── BanDistributionManagementTest.java │ │ ├── EnforcerTestUtils.java │ │ ├── ReactorModuleConvergenceTest.java │ │ ├── RequireActiveProfileTest.java │ │ ├── RequirePrerequisiteTest.java │ │ ├── TestAlwaysFail.java │ │ ├── TestAlwaysPass.java │ │ ├── TestBannedRepositories.java │ │ ├── TestEvaluateBeanshell.java │ │ ├── TestExternalRules.java │ │ ├── TestRequireJavaVendor.java │ │ ├── TestRequireNoRepositories.java │ │ ├── TestRequireOS.java │ │ ├── TestRequirePluginVersions.java │ │ ├── TestRequireReleaseVersion.java │ │ ├── TestRequireSnapshotVersion.java │ │ ├── checksum │ │ ├── TestNormalizeLineSeparatorReader.java │ │ ├── TestRequireFileChecksum.java │ │ └── TestRequireTextFileChecksum.java │ │ ├── dependency │ │ ├── BannedDependenciesTest.java │ │ ├── RequireReleaseDepsTest.java │ │ └── RequireUpperBoundDepsTest.java │ │ ├── files │ │ ├── TestRequireFilesDontExist.java │ │ ├── TestRequireFilesExist.java │ │ └── TestRequireFilesSize.java │ │ ├── property │ │ ├── TestRequireEnvironmentVariable.java │ │ └── TestRequireProperty.java │ │ ├── utils │ │ ├── DependencyNodeBuilder.java │ │ ├── EnforcerRuleUtilsHelper.java │ │ ├── MockEnforcerExpressionEvaluator.java │ │ ├── TestArtifactMatcher.java │ │ └── TestMockEnforcerExpressionEvaluator.java │ │ └── version │ │ ├── TestAbstractVersionEnforcer.java │ │ ├── TestMavenVersion.java │ │ └── TestRequireJavaVersion.java │ └── resources │ ├── enforcer-rules │ ├── allow-findbugs.xsl │ ├── banned-dependencies.xml │ └── pass.xml │ └── requirePluginVersions │ ├── checkPluginPropertyVersion │ └── pom.xml │ ├── checkPluginVersionProfile │ └── pom.xml │ ├── getPomRecursively │ ├── b │ │ ├── c │ │ │ └── pom.xml │ │ └── pom.xml │ └── pom.xml │ ├── parentExpression │ ├── child │ │ └── pom.xml │ └── pom.xml │ ├── parentRelativePath │ ├── parent │ │ └── pom.xml │ └── pom.xml │ └── parentRelativePathDirectory │ ├── parent │ └── pom.xml │ └── pom.xml ├── maven-enforcer-extension ├── pom.xml └── src │ ├── it │ ├── mrm │ │ └── settings.xml │ └── projects │ │ ├── defaults │ │ ├── .mvn │ │ │ ├── enforcer-extension.xml │ │ │ └── extensions.xml │ │ └── pom.xml │ │ └── invoker.properties │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── maven │ │ └── extensions │ │ └── enforcer │ │ └── EnforceExtension.java │ └── site │ ├── apt │ └── index.apt │ ├── markdown │ └── usage.md.vm │ └── site.xml ├── maven-enforcer-plugin ├── pom.xml └── src │ ├── it │ ├── mrm │ │ ├── repository │ │ │ ├── menforcer126_maven-plugin-1.0.pom │ │ │ ├── menforcer128_api-1.4.0.pom │ │ │ ├── menforcer128_api-1.5.0.pom │ │ │ ├── menforcer128_api-1.6.0.pom │ │ │ ├── menforcer128_classic-0.9.9.pom │ │ │ ├── menforcer134_model-1.0-20130423.042904-7222.pom │ │ │ ├── menforcer134_model-1.0-20130423.044324-5638.pom │ │ │ ├── menforcer134_modelbuilder-1.0-SNAPSHOT.pom │ │ │ ├── menforcer134_project-1.0-SNAPSHOT.pom │ │ │ ├── menforcer138_archiver-2.1.1.pom │ │ │ ├── menforcer138_classworlds-1.1-alpha-2.pom │ │ │ ├── menforcer138_container-default-1.0-alpha-9-stable-1.pom │ │ │ ├── menforcer138_io-2.0.3.pom │ │ │ ├── menforcer138_utils-1.0.4.pom │ │ │ ├── menforcer138_utils-3.0.pom │ │ │ ├── menforcer146_b-1.0.pom │ │ │ ├── menforcer146_x-1.1.pom │ │ │ ├── menforcer146_x-2.1.pom │ │ │ ├── menforcer146_x-3.1.pom │ │ │ ├── menforcer152-1.0.pom │ │ │ ├── menforcer158_utils-1.0.pom │ │ │ ├── menforcer192_a-1.0.pom │ │ │ ├── menforcer192_a-2.0.pom │ │ │ ├── menforcer192_b-1.0.pom │ │ │ ├── menforcer192_c-1.0.pom │ │ │ ├── menforcer192_c-2.0.pom │ │ │ ├── menforcer269_project-higher-1.0.0.pom │ │ │ ├── menforcer269_project-lower-1.0.0.pom │ │ │ ├── menforcer269_project-middle-1.0.0.pom │ │ │ ├── menforcer358_core-5.2.7.pom │ │ │ ├── menforcer358_core-5.2.8.pom │ │ │ ├── menforcer358_parent-5.2.7.pom │ │ │ ├── menforcer359-1.0.pom │ │ │ ├── menforcer426-a-1.0.pom │ │ │ ├── menforcer426-b-1.0.pom │ │ │ ├── menforcer427-1.0.pom │ │ │ ├── menforcer427_a-1.0.pom │ │ │ ├── menforcer427_b-1.0.pom │ │ │ ├── menforcer466_requires_api150-1.0.pom │ │ │ ├── menforcer466_requires_utils30-1.0.pom │ │ │ ├── menforcer494_dependency-1.0-SNAPSHOT.pom │ │ │ ├── menforcer494_dependency-2.0.pom │ │ │ ├── menforcer494_project-1.0-SNAPSHOT.pom │ │ │ ├── menforcer72_junit-3.8.1.pom │ │ │ ├── menforcer72_logging-1.1.1.pom │ │ │ └── menforcer85_api-1.0-SNAPSHOT.pom │ │ └── settings.xml │ └── projects │ │ ├── MENFORCER-306 │ │ ├── parent │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── MENFORCER-395 │ │ └── pom.xml │ │ ├── MENFORCER-408 │ │ └── pom.xml │ │ ├── MENFORCER-434 │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── always-fail-warn │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── always-fail │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── always-pass │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-dependency-management-scope-fail │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-distribution-management-multi-module-build │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-distribution-management-multi-module-except-site │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-distribution-management │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-duplicate-dependencies-versions │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-dynamic-versions-scope-all-scopes │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-dynamic-versions-verbose │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-dynamic-versions │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-pom-dependency-version-utf8-with-bom │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-pom-dependency-version │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-transitive-dependencies-direct-dep1 │ │ └── pom.xml │ │ ├── ban-transitive-dependencies-direct-dep2 │ │ └── pom.xml │ │ ├── ban-transitive-dependencies-direct-dep3 │ │ └── pom.xml │ │ ├── ban-transitive-dependencies-fail │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── ban-transitive-dependencies │ │ └── pom.xml │ │ ├── banned-dependencies-fail │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── banned-dependencies-multi-module │ │ ├── mod1 │ │ │ └── pom.xml │ │ ├── mod2 │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── banned-dependencies-versionrange-fail │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── banned-dependencies-versionrange │ │ └── pom.xml │ │ ├── banned-dependencies-wildcards │ │ └── pom.xml │ │ ├── banned-dependencies │ │ └── pom.xml │ │ ├── banned-plugins-fails │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── banned-plugins │ │ └── pom.xml │ │ ├── builds_a_pom_noop │ │ ├── module │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── ci-friendly │ │ ├── app │ │ │ └── pom.xml │ │ ├── lib │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── test.properties │ │ ├── cli-always-fail-deprecated │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── cli-always-fail │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── cli-always-pass-deprecated │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── cli-always-pass │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── cli-banned-plugins │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── cli-skip-rules │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── dependencies_converge │ │ ├── module │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── dependencies_converge_exclude_wildcard │ │ └── pom.xml │ │ ├── dependencies_not_converging │ │ ├── invoker.properties │ │ ├── module │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── dependencies_not_converging_test_scope │ │ ├── module │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── dependency-convergence-cycle │ │ └── pom.xml │ │ ├── dependency-convergence-ranges │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── dependency-convergence_excludedScopes │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── dependency-convergence_include-all-exclude_failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── dependency-convergence_include-all-exclude_success │ │ └── pom.xml │ │ ├── dependency-convergence_include-empty_failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── dependency-convergence_include-empty_success │ │ └── pom.xml │ │ ├── dependency-convergence_include-exclude_failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── dependency-convergence_include_failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── dependency-convergence_include_success │ │ └── pom.xml │ │ ├── dependency-convergence_transitive_provided │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── display-info │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── evaluate-beanshell │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── external-rules-always-fail │ │ ├── enforcer-rules.xml │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── external-rules-always-pass │ │ ├── enforcer-rules.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── multimodule-ban-transitive-dependencies │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── multimodule-ban-transitive-dependencies_failure │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── multimodule-require-release-dependencies-exclude │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── multimodule-require-release-dependencies-exclude_failure │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── multimodule-require-release-dependencies-snapshot-parent_failure │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── multimodule-require-release-dependencies │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── multimodule │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── non-exeisting-optional-dependency │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-active-profile-all │ │ └── pom.xml │ │ ├── require-active-profile-from-settings │ │ └── pom.xml │ │ ├── require-active-profile-inherited │ │ ├── invoker.properties │ │ ├── parent │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── require-active-profile │ │ └── pom.xml │ │ ├── require-dependency-scope │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-environment-variable │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-file-checksum │ │ ├── LICENSE │ │ ├── pom.xml │ │ ├── setup.groovy │ │ └── verify.groovy │ │ ├── require-files-dont-exist │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-files-exist │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-files-size │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-java-vendor-multi-module │ │ ├── invoker.properties │ │ ├── mod1 │ │ │ └── pom.xml │ │ ├── mod2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-java-version │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-matching-coordinates │ │ ├── mod2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ ├── test-multimodule-mod1 │ │ │ └── pom.xml │ │ └── verify.groovy │ │ ├── require-maven-version │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories-allow-plugin-repo │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories-allow-repo │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories_failure │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories_failure_allowed-plugin-repo │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories_failure_plugin-repositories │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories_failure_repositories │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories_mm │ │ ├── child │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-no-repositories_mm_ci │ │ ├── child │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-os │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-plugin-versions-ci │ │ ├── child │ │ │ └── pom.xml │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-plugin-versions-custom-packaging │ │ └── pom.xml │ │ ├── require-plugin-versions-expressions │ │ └── pom.xml │ │ ├── require-plugin-versions-expressions2 │ │ ├── module1 │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── require-plugin-versions-mm-ci-friendly │ │ ├── invoker.properties │ │ ├── menforcer281-module │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── require-plugin-versions-plugin-with-extensions │ │ └── pom.xml │ │ ├── require-plugin-versions-plugin-with-integration-test-lifecycle │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ └── pom.xml │ │ ├── require-plugin-versions-projectGAVexpressions │ │ └── pom.xml │ │ ├── require-plugin-versions │ │ └── pom.xml │ │ ├── require-plugin-versions_failure │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-plugin-versions_inherit │ │ └── pom.xml │ │ ├── require-profile-id-exist_defined_in_parent │ │ ├── MENFORCER-322-module │ │ │ └── pom.xml │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-profile-ids-exist_failure │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-profile-ids-exist_success │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── require-property │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-release-dependencies-excludes │ │ └── pom.xml │ │ ├── require-release-dependencies-excludes_failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── require-release-dependencies │ │ └── pom.xml │ │ ├── require-release-version │ │ └── pom.xml │ │ ├── require-same-versions_failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── require-same-versions_multi-module-build │ │ ├── invoker.properties │ │ ├── module1 │ │ │ └── pom.xml │ │ ├── module2 │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-same-versions_success │ │ └── pom.xml │ │ ├── require-same-versions_with-dependencies-failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── require-same-versions_with-dependencies-success │ │ └── pom.xml │ │ ├── require-snapshot-version_failure │ │ ├── invoker.properties │ │ └── pom.xml │ │ ├── require-snapshot-version_failure_parent-ci-friendly │ │ ├── invoker.properties │ │ ├── module │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-snapshot-version_success │ │ └── pom.xml │ │ ├── require-snapshot-version_success_parent-ci-friendly │ │ ├── module │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── require-textfile-checksum │ │ ├── LICENSE │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-dependencies-managed_failure │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-dependencies-managed_success │ │ └── pom.xml │ │ ├── require-upper-bound-dependencies-scope-change │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-dependencies-scope-optional │ │ └── pom.xml │ │ ├── require-upper-bound-dependencies-unique_failure │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-dependencies-unique_success │ │ └── pom.xml │ │ ├── require-upper-bound-deps_failure │ │ ├── invoker.properties │ │ ├── module │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-deps_failure_show_scopes │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-deps_ignored │ │ ├── module │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-deps_includes │ │ ├── invoker.properties │ │ ├── module │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── verify.groovy │ │ ├── require-upper-bound-deps_success │ │ ├── module │ │ │ └── pom.xml │ │ └── pom.xml │ │ ├── require-upper-bound-exclude_wildcard │ │ └── pom.xml │ │ └── resolve_collect_dependencies │ │ ├── invoker.properties │ │ ├── pom.xml │ │ ├── src │ │ └── assembly │ │ │ └── extjars.xml │ │ └── verify.groovy │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── maven │ │ └── plugins │ │ └── enforcer │ │ ├── DisplayInfoMojo.java │ │ ├── EnforceMojo.java │ │ └── internal │ │ ├── AbstractEnforcerLogger.java │ │ ├── DefaultEnforcementRuleHelper.java │ │ ├── EnforcerLoggerError.java │ │ ├── EnforcerLoggerWarn.java │ │ ├── EnforcerRuleCache.java │ │ ├── EnforcerRuleDesc.java │ │ ├── EnforcerRuleManager.java │ │ └── EnforcerRuleManagerException.java │ ├── site │ ├── apt │ │ ├── examples │ │ │ └── check-specific-rule-via-cli.apt.vm │ │ ├── index.apt │ │ ├── thirdparty-rules.apt │ │ └── usage.apt.vm │ ├── fml │ │ └── faq.fml │ └── site.xml │ └── test │ └── java │ └── org │ └── apache │ └── maven │ └── plugins │ └── enforcer │ ├── MockEnforcerRule.java │ ├── TestEnforceMojo.java │ ├── TestRule1.java │ ├── TestRule2.java │ └── internal │ └── EnforcerRuleManagerTest.java ├── pom.xml └── src └── site ├── resources └── download.cgi ├── site.xml └── xdoc └── download.xml.vm /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Parent 38 - reformat 17 | 40637c64ae6e60de8bbef101991e2840903286da 18 | f7537e773595adde7aa6f689acb742bc056004bf 19 | 20 | # Parent 39 - reformat 21 | 95c6d291b92a60912e35d5e0f203744ab06b9550 -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser 19 | 20 | blank_issues_enabled: false 21 | 22 | contact_links: 23 | 24 | - name: Project Mailing Lists 25 | url: https://maven.apache.org/mailing-lists.html 26 | about: Please ask a question or discuss here 27 | 28 | - name: Old JIRA Issues 29 | url: https://issues.apache.org/jira/projects/MENFORCER 30 | about: Please search old JIRA issues 31 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | version: 2 18 | updates: 19 | - package-ecosystem: maven 20 | directory: "/" 21 | schedule: 22 | interval: daily 23 | 24 | - package-ecosystem: "github-actions" 25 | directory: "/" 26 | schedule: 27 | interval: "daily" -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | _extends: maven-gh-actions-shared 19 | -------------------------------------------------------------------------------- /.github/workflows/maven-verify.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: Verify 19 | 20 | on: 21 | push: 22 | pull_request: 23 | 24 | jobs: 25 | build: 26 | name: Verify 27 | uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4 28 | -------------------------------------------------------------------------------- /.github/workflows/pr-automation.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: PR Automation 19 | on: 20 | pull_request_target: 21 | types: 22 | - closed 23 | 24 | jobs: 25 | pr-automation: 26 | name: PR Automation 27 | uses: apache/maven-gh-actions-shared/.github/workflows/pr-automation.yml@v4 28 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: Release Drafter 19 | on: 20 | push: 21 | branches: 22 | - master 23 | workflow_dispatch: 24 | 25 | jobs: 26 | update_release_draft: 27 | uses: apache/maven-gh-actions-shared/.github/workflows/release-drafter.yml@v4 28 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: Stale 19 | 20 | on: 21 | schedule: 22 | - cron: '33 4 * * *' 23 | issue_comment: 24 | types: [ 'created' ] 25 | 26 | jobs: 27 | stale: 28 | uses: 'apache/maven-gh-actions-shared/.github/workflows/stale.yml@v4' 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .project 3 | .classpath 4 | .settings 5 | .idea/ 6 | .svn 7 | *.iml 8 | .checkstyle 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | asfMavenTlpPlgnBuild() 21 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache Maven Enforcer 2 | Copyright 2007-2013 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /deploySite.bat: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM http://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | mvn -Preporting clean site site:stage %* 21 | mvn scm-publish:publish-scm %* 22 | -------------------------------------------------------------------------------- /deploySite.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | mvn -Preporting clean site site:stage $@ 23 | mvn scm-publish:publish-scm $@ 24 | -------------------------------------------------------------------------------- /enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerLevel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.enforcer.rule.api; 20 | 21 | /** 22 | * Levels steering whether a rule should fail a build or just display a warning. 23 | * 24 | * @author Mirko Friedenhagen 25 | * @since 1.4 26 | */ 27 | public enum EnforcerLevel { 28 | 29 | /** 30 | * Fail the build. 31 | */ 32 | ERROR, 33 | /** 34 | * Just warn. 35 | */ 36 | WARN 37 | } 38 | -------------------------------------------------------------------------------- /enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.enforcer.rule.api; 20 | 21 | /** 22 | * Interface to be implemented by any rules as of version 2.0 executed by the enforcer. 23 | * 24 | * @author Mirko Friedenhagen 25 | * @since 1.4 26 | * @deprecated Please see 27 | * Writing a custom rule 28 | */ 29 | @Deprecated 30 | public interface EnforcerRule2 extends EnforcerRule {} 31 | -------------------------------------------------------------------------------- /enforcer-api/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | ~~ Licensed to the Apache Software Foundation (ASF) under one 2 | ~~ or more contributor license agreements. See the NOTICE file 3 | ~~ distributed with this work for additional information 4 | ~~ regarding copyright ownership. The ASF licenses this file 5 | ~~ to you under the Apache License, Version 2.0 (the 6 | ~~ "License"); you may not use this file except in compliance 7 | ~~ with the License. You may obtain a copy of the License at 8 | ~~ 9 | ~~ http://www.apache.org/licenses/LICENSE-2.0 10 | ~~ 11 | ~~ Unless required by applicable law or agreed to in writing, 12 | ~~ software distributed under the License is distributed on an 13 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | ~~ KIND, either express or implied. See the License for the 15 | ~~ specific language governing permissions and limitations 16 | ~~ under the License. 17 | 18 | ------ 19 | Introduction 20 | ------ 21 | Brian Fox 22 | ------ 23 | 2007-09-01 24 | ------ 25 | 26 | Maven Enforcer Rule API - Extending The Loving Iron Fist of Maven\x99 27 | 28 | Custom rules are easy to make with the <<>>. These rules can then be invoked with the 29 | {{{../../plugins/maven-enforcer-plugin/}maven-enforcer-plugin}}. 30 | 31 | See {{{./writing-a-custom-rule.html}Writing a Custom Rule}} for instructions on how to make your own rule. 32 | -------------------------------------------------------------------------------- /enforcer-rules/src/site/apt/Images.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-enforcer/1566d065b5551009ae64cba06896921cce18374c/enforcer-rules/src/site/apt/Images.odp -------------------------------------------------------------------------------- /enforcer-rules/src/site/resources/images/module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-enforcer/1566d065b5551009ae64cba06896921cce18374c/enforcer-rules/src/site/resources/images/module.png -------------------------------------------------------------------------------- /enforcer-rules/src/site/resources/images/root-with-modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-enforcer/1566d065b5551009ae64cba06896921cce18374c/enforcer-rules/src/site/resources/images/root-with-modules.png -------------------------------------------------------------------------------- /enforcer-rules/src/site/resources/images/root-with-parent-and-modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-enforcer/1566d065b5551009ae64cba06896921cce18374c/enforcer-rules/src/site/resources/images/root-with-parent-and-modules.png -------------------------------------------------------------------------------- /enforcer-rules/src/site/resources/images/root-with-parent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-enforcer/1566d065b5551009ae64cba06896921cce18374c/enforcer-rules/src/site/resources/images/root-with-parent.png -------------------------------------------------------------------------------- /enforcer-rules/src/site/resources/images/root.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/maven-enforcer/1566d065b5551009ae64cba06896921cce18374c/enforcer-rules/src/site/resources/images/root.png -------------------------------------------------------------------------------- /enforcer-rules/src/test/resources/enforcer-rules/banned-dependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | 26 | com.google.code.findbugs:jsr305 27 | com.google.guava:listenablefuture 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /enforcer-rules/src/test/resources/enforcer-rules/pass.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /maven-enforcer-extension/src/it/projects/defaults/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | org.apache.maven.its.enforcer 26 | test 27 | 1.0 28 | 29 | 30 | -------------------------------------------------------------------------------- /maven-enforcer-extension/src/it/projects/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | invoker.goals.1 = validate 18 | invoker.goals.2 = verify 19 | invoker.buildResult.2 = failure 20 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer128_api-1.4.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer128_api 25 | 1.4.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer128_api-1.5.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer128_api 25 | 1.5.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer128_api-1.6.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer128_api 25 | 1.6.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer138_utils-1.0.4.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer138_utils 25 | 1.0.4 26 | 27 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer138_utils-3.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer138_utils 25 | 3.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer146_x-1.1.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer146-x 25 | 1.1 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer146_x-2.1.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer146-x 25 | 2.1 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer146_x-3.1.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer146-x 25 | 3.1 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer158_utils-1.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer158_utils 25 | 1.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer192_a-1.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer192-a 25 | 1.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer192_a-2.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer192-a 25 | 2.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer192_b-1.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer192-b 25 | 1.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer358_core-5.2.7.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer358_core 25 | 5.2.7 26 | 27 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer358_core-5.2.8.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer358_core 25 | 5.2.8 26 | 27 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer427_a-1.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer427-a 25 | 1.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer427_b-1.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer427-b 25 | 1.0 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/mrm/repository/menforcer72_junit-3.8.1.pom: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 4.0.0 23 | org.apache.maven.plugins.enforcer.its 24 | menforcer72_junit 25 | 3.8.1 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/MENFORCER-434/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/always-fail-warn/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[WARNING] Rule 0: org.apache.maven.enforcer.rules.AlwaysFail warned with message:' ) 21 | 22 | 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/always-fail/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/always-fail/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.AlwaysFail failed with message:' ) 21 | assert buildLog.text.contains( 'alwaysFail test message' ) 22 | 23 | 24 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/always-pass/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass passed' ) 21 | 22 | 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-dependency-management-scope-fail/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-distribution-management-multi-module-build/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-distribution-management-multi-module-build/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] BUILD FAILURE' ) 21 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.BanDistributionManagement failed with message:' ) 22 | assert buildLog.text.contains( 'You have defined a repository in distributionManagement.' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-distribution-management-multi-module-except-site/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] BUILD SUCCESS' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-distribution-management/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.BanDistributionManagement passed' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-duplicate-dependencies-versions/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | 20 | # Maven 4 check itself such rules 21 | invoker.maven.version = !4+ 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-duplicate-dependencies-versions/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.BanDuplicatePomDependencyVersions failed with message:' ) 21 | assert buildLog.text.contains( 'Found 1 duplicate dependency declarations in this project:' ) 22 | assert buildLog.text.contains( '- dependencyManagement.dependencies.dependency[org.apache.maven.plugins.enforcer.its:menforcer128_api:jar] (2 times)' ) 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-dynamic-versions-scope-all-scopes/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-dynamic-versions-verbose/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-dynamic-versions/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-pom-dependency-version-utf8-with-bom/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | 20 | # Maven 4 check itself such rules 21 | invoker.maven.version = !4+ 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-pom-dependency-version-utf8-with-bom/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.BanDuplicatePomDependencyVersions failed with message:' ) 21 | assert buildLog.text.contains( 'Found 1 duplicate dependency declaration in this project:' ) 22 | assert buildLog.text.contains( '- dependencies.dependency[org.apache.maven.plugins.enforcer.its:menforcer152:jar] (2 times)' ) 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-pom-dependency-version/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | 20 | # Maven 4 check itself such rules 21 | invoker.maven.version = !4+ 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-pom-dependency-version/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.BanDuplicatePomDependencyVersions failed with message:' ) 21 | assert buildLog.text.contains( 'Found 1 duplicate dependency declaration in this project:' ) 22 | assert buildLog.text.contains( '- dependencies.dependency[org.apache.maven.plugins.enforcer.its:menforcer152:jar] (2 times)' ) 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-transitive-dependencies-fail/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ban-transitive-dependencies-fail/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.dependency.BanTransitiveDependencies failed with message:' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/banned-dependencies-fail/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/banned-dependencies-fail/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File( basedir, 'build.log' ).text 20 | assert buildLog.contains( 'org.apache.maven.plugins.enforcer.its:menforcer128_api:jar:1.4.0 <--- banned via the exclude/include list' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/mod1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | test-multimodule-project 28 | 1.0 29 | 30 | 31 | test-multimodule-mod1 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/banned-dependencies-versionrange-fail/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/banned-dependencies-versionrange-fail/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.dependency.BannedDependencies failed with message:' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/banned-plugins-fails/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/banned-plugins-fails/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File( basedir, 'build.log' ).text 20 | assert buildLog.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.BannedPlugins failed with message:' ) 21 | assert buildLog =~ /org.codehaus.mojo:build-helper-maven-plugin:maven-plugin:.* <--- banned plugin/ 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ci-friendly/lib/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | org.apache.maven.its.enforcer 26 | cifriendly 27 | ${revision}${changelist} 28 | 29 | lib 30 | 31 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/ci-friendly/test.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | revision=1.0.0 18 | changelist=QP_2383 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-fail-deprecated/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | invoker.goals = validate -Drules=AlwaysFail 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-fail-deprecated/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | assert !buildLog.contains('[INFO] Always pass!') 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-fail/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | invoker.goals = validate -Denforcer.rules=AlwaysFail 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-fail/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | assert !buildLog.contains('[INFO] Always pass!') 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-pass-deprecated/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | invoker.goals = validate -Drules=AlwaysPass 18 | invoker.buildResult = success 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-pass-deprecated/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | assert buildLog.contains('[INFO] Always pass!') 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-pass/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | invoker.goals = validate -Denforcer.rules=AlwaysPass 18 | invoker.buildResult = success 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-always-pass/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | assert buildLog.contains('[INFO] Always pass!') 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-banned-plugins/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | invoker.goals = enforcer:enforce -Denforcer.rules=bannedPlugins 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-banned-plugins/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | assert buildLog.contains('org.apache.maven.plugins.enforcer.its:menforcer126_maven-plugin:maven-plugin:1.0 <--- banned plugin') 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-skip-rules/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate -Denforcer.skipRules=alwaysFail -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/cli-skip-rules/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | assert buildLog.contains('[INFO] Always pass!') 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependencies_not_converging/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependency-convergence-ranges/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.maven.version = 3.9.2+ 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependency-convergence_excludedScopes/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependency-convergence_include-all-exclude_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependency-convergence_include-empty_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependency-convergence_include-exclude_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependency-convergence_include_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/dependency-convergence_transitive_provided/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | File buildLog = new File(basedir, 'build.log') 21 | 22 | rulesExecuted = buildLog.readLines() 23 | .findAll {it == '[INFO] Rule 0: org.apache.maven.enforcer.rules.dependency.DependencyConvergence passed'} 24 | 25 | // Rule should be executed in each module 26 | assert rulesExecuted.size() == 3 -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/display-info/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | File buildLog = new File( basedir, 'build.log' ) 21 | assert buildLog.text.contains( 'Maven Version:' ) 22 | assert buildLog.text.contains( 'JDK Version:' ) 23 | assert buildLog.text.contains( 'Java Vendor:' ) 24 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/evaluate-beanshell/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | File buildLog = new File(basedir, 'build.log') 21 | assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.EvaluateBeanshell passed') 22 | assert buildLog.text.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.EvaluateBeanshell passed') 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/external-rules-always-fail/enforcer-rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/external-rules-always-fail/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/external-rules-always-fail/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | File buildLog = new File(basedir, 'build.log') 21 | assert buildLog.text.contains('[INFO] Rule Config Provider org.apache.maven.enforcer.rules.ExternalRules executed') 22 | assert buildLog.text.contains('[ERROR] Rule 0: org.apache.maven.enforcer.rules.AlwaysFail failed with message:') 23 | assert buildLog.text.contains('[ERROR] Rule 1: org.apache.maven.enforcer.rules.AlwaysFail failed with message:') 24 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/external-rules-always-pass/enforcer-rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/external-rules-always-pass/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | File buildLog = new File(basedir, 'build.log') 21 | assert buildLog.text.contains('[INFO] Rule Config Provider org.apache.maven.enforcer.rules.ExternalRules executed') 22 | assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.AlwaysPass passed') 23 | assert buildLog.text.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.AlwaysPass passed') 24 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-ban-transitive-dependencies/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-ban-transitive-dependencies_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate 19 | invoker.buildResult = failure 20 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-ban-transitive-dependencies_failure/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | 21 | assert buildLog.text.contains( 'Rule 0: org.apache.maven.enforcer.rules.dependency.BanTransitiveDependencies failed with message:' ) 22 | assert buildLog.text.contains( 'org.apache.maven.its.enforcer:module1:jar:1.0-SNAPSHOT has transitive dependencies:' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-exclude/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-exclude/module1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | multimodule 28 | 1.0-SNAPSHOT 29 | 30 | module1 31 | 32 | 33 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-exclude_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate 19 | invoker.buildResult = failure 20 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-exclude_failure/module1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | multimodule 28 | 1.0-SNAPSHOT 29 | 30 | module1 31 | 32 | 33 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-exclude_failure/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | 21 | assert buildLog.text.contains( 'Rule 0: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps failed with message:' ) 22 | assert buildLog.text =~ /org.apache.maven.its.enforcer:module1:jar:1.0-SNAPSHOT.*is not a release dependency/ -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-snapshot-parent_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate 19 | invoker.buildResult = failure 20 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-snapshot-parent_failure/module1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | multimodule 28 | 1.0-SNAPSHOT 29 | 30 | module1 31 | 32 | 33 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-snapshot-parent_failure/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | org.apache.maven.its.enforcer 26 | multimodule 27 | 1.0-SNAPSHOT 28 | pom 29 | 30 | 31 | module1 32 | module2 33 | 34 | 35 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies-snapshot-parent_failure/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | 21 | assert buildLog.text.contains( 'Rule 0: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps failed with message:' ) 22 | assert buildLog.text.contains( 'Parent Cannot be a snapshot: org.apache.maven.its.enforcer:multimodule:pom:1.0-SNAPSHOT' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule-require-release-dependencies/module1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | multimodule 28 | 1.0 29 | 30 | module1 31 | 32 | 33 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = validate 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/multimodule/module1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | multimodule 28 | 1.0-SNAPSHOT 29 | 30 | module1 31 | 32 | 33 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-active-profile-inherited/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = help:active-profiles enforcer:enforce -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-dependency-scope/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-dependency-scope/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File(basedir, 'build.log') 20 | assert buildLog.text.contains('[ERROR] Dependency org.apache.jackrabbit.vault:vault-cli:jar @ line 65, column 21 does not have an explicit scope defined!') 21 | assert buildLog.text.contains('Found 1 missing dependency scope. Look at the errors emitted above for the details.') 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-environment-variable/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File(basedir, 'build.log') 20 | 21 | assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.property.RequireEnvironmentVariable passed') 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-file-checksum/LICENSE: -------------------------------------------------------------------------------- 1 | Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-file-checksum/setup.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def file = new File (basedir,"LICENSE") 21 | 22 | file.write(file.text.normalize()) -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-files-dont-exist/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | 21 | // rule executed 22 | assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesDontExist passed') 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-files-exist/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | 21 | // rule executed 22 | assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesExist passed') 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-files-size/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | 21 | // rule executed 22 | assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesSize passed') 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = -T3 verify -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/mod1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | test-multimodule-project 28 | 1.0 29 | 30 | 31 | test-multimodule-mod1 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/mod2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | test-multimodule-project 28 | 1.0 29 | 30 | 31 | test-multimodule-mod2 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-java-vendor-multi-module/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | File buildLog = new File(basedir, 'build.log') 21 | 22 | rulesExecuted = buildLog.readLines() 23 | .findAll {it == '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireJavaVendor passed'} 24 | 25 | assert rulesExecuted.size() == 1 -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-java-version/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | 21 | // rule executed 22 | assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed') 23 | assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed') 24 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-matching-coordinates/test-multimodule-mod1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | test-multimodule-project 28 | 1.0 29 | 30 | 31 | org.apache.maven.its.enforcer.somepackage 32 | test-multimodule-mod1 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-maven-version/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File(basedir, 'build.log').text 20 | 21 | // rule executed 22 | assert buildLog.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed') 23 | assert buildLog.contains('[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed') 24 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories-allow-plugin-repo/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories-allow-plugin-repo/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories failed with message:' ) 21 | assert buildLog.text.contains( 'Some poms have repositories defined:' ) 22 | assert buildLog.text.contains( 'org.apache.maven.its.enforcer:test version:1.0 has repositories [com.asual.maven.public]' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories-allow-repo/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories-allow-repo/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories failed with message:' ) 21 | assert buildLog.text.contains( 'Some poms have repositories defined:' ) 22 | assert buildLog.text.contains( 'org.apache.maven.its.enforcer:test version:1.0 has plugin repositories [plugin-repo]' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories passed' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories failed with message:' ) 21 | assert buildLog.text.contains( 'Some poms have repositories defined:' ) 22 | assert buildLog.text.contains( 'org.apache.maven.its.enforcer:test version:1.0 has repositories [com.asual.maven.public]' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure_allowed-plugin-repo/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure_allowed-plugin-repo/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories failed with message:' ) 21 | assert buildLog.text.contains( 'Some poms have repositories defined:' ) 22 | assert buildLog.text.contains( 'org.apache.maven.its.enforcer:test version:1.0 has repositories [com.asual.maven.public]' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure_plugin-repositories/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure_plugin-repositories/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories failed with message:' ) 21 | assert buildLog.text.contains( 'Some poms have repositories defined:' ) 22 | assert buildLog.text.contains( 'org.apache.maven.its.enforcer:test version:1.0 has plugin repositories [repo]' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure_repositories/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_failure_repositories/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories failed with message:' ) 21 | assert buildLog.text.contains( 'Some poms have repositories defined:' ) 22 | assert buildLog.text.contains( 'org.apache.maven.its.enforcer:test version:1.0 has repositories [com.asual.maven.public]' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_mm/child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | test 28 | 1.0 29 | 30 | 31 | child 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_mm/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories passed' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_mm_ci/child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | test 28 | ${revision} 29 | 30 | 31 | child 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-no-repositories_mm_ci/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireNoRepositories passed' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-os/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File(basedir, 'build.log') 20 | assert buildLog.text.contains('OS Info - Arch') 21 | assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.RequireOS passed') 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions-ci/child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | test 28 | ${revision} 29 | 30 | 31 | child 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions-ci/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions-ci/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequirePluginVersions failed with message:' ) 21 | assert buildLog.text.contains( "Some plugins are missing valid versions or depend on Maven ${mavenVersion} defaults (LATEST, RELEASE, SNAPSHOT, TIMESTAMP SNAPSHOT as plugin version are not allowed)" ) 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | invoker.goals = install -Drevision=0.10.0-SNAPSHOT 18 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/menforcer281-module/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | org.apache.maven.its.enforcer 26 | menforcer281-parent 27 | ${revision} 28 | 29 | 30 | menforcer281-module 31 | pom 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions-plugin-with-integration-test-lifecycle/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Bundle-SymbolicName: pluginWithIntegrationTestLifecycle 2 | Bundle-Version: 1.0.0.qualifier -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-plugin-versions_failure/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequirePluginVersions failed with message:' ) 21 | assert buildLog.text.contains( "Some plugins are missing valid versions or depend on Maven ${mavenVersion} defaults (LATEST, RELEASE as plugin version are not allowed)" ) -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-profile-id-exist_defined_in_parent/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # MENFORCER-322 19 | 20 | # test building the top level project 21 | invoker.goals.1 = clean compile 22 | invoker.profiles.1 = a,b 23 | 24 | # test building the module 25 | invoker.project.2 = MENFORCER-322-module 26 | invoker.goals.2 = clean compile 27 | invoker.profiles.2 = a,b 28 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-profile-id-exist_defined_in_parent/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def buildLog = new File( basedir, 'build.log' ) 21 | assert !( buildLog.text.contains( "The requested profile doesn't exist: a" ) ) 22 | assert !( buildLog.text.contains( "The requested profile doesn't exist: b" ) ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-profile-ids-exist_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | invoker.profiles = c 20 | 21 | # Maven 4 check itself such rules 22 | invoker.maven.version = !4+ 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-profile-ids-exist_failure/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( "The requested profile doesn't exist: c" ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-profile-ids-exist_success/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.profiles = a -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-property/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File(basedir, 'build.log') 20 | assert buildLog.text.contains('[INFO] Rule 0: org.apache.maven.enforcer.rules.property.RequireProperty passed') 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-release-dependencies-excludes_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-same-versions_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-same-versions_multi-module-build/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-same-versions_multi-module-build/module1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | require-same-versions_multi-module-build 28 | 1.0-SNAPSHOT 29 | 30 | module1 31 | 32 | 33 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-same-versions_multi-module-build/module2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | require-same-versions_multi-module-build 28 | 1.0-SNAPSHOT 29 | 30 | module2 31 | 1.1-SNAPSHOT 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-same-versions_multi-module-build/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( '[INFO] BUILD FAILURE' ) 21 | assert buildLog.text.contains( '[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireSameVersions failed with message:' ) 22 | assert buildLog.text.contains( 'Top level project has version 1.0-SNAPSHOT but current module has different version 1.1-SNAPSHOT' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-same-versions_with-dependencies-failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-snapshot-version_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-snapshot-version_failure_parent-ci-friendly/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult = failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-snapshot-version_failure_parent-ci-friendly/module/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | menforcer-346-parent 28 | ${revision} 29 | 30 | 31 | menforcer-346-module 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-snapshot-version_failure_parent-ci-friendly/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( 'This project cannot be a release:org.apache.maven.its.enforcer:menforcer-346-parent:pom:1.0' ) 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-snapshot-version_success_parent-ci-friendly/module/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 4.0.0 24 | 25 | 26 | org.apache.maven.its.enforcer 27 | menforcer-346-parent 28 | ${revision} 29 | 30 | 31 | menforcer-346-module 32 | 33 | 34 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-textfile-checksum/LICENSE: -------------------------------------------------------------------------------- 1 | Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-dependencies-managed_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-dependencies-scope-change/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure 19 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-dependencies-unique_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-dependencies-unique_failure/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | File buildLog = new File( basedir, 'build.log' ) 20 | assert buildLog.text.contains( 'Rule 0: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps failed with message:' ) 21 | assert buildLog.text.contains( 'Require upper bound dependencies error for org.apache.maven.plugins.enforcer.its:menforcer134_model:1.0-20130423.042904-7222. Paths to dependency are:' ) 22 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-deps_failure/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-deps_failure_show_scopes/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-deps_ignored/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def LS = System.getProperty( "line.separator" ) 20 | File buildLog = new File( basedir, 'build.log' ) 21 | 22 | assert buildLog.text.contains( 'Ignoring requireUpperBoundDeps in org.apache.maven.plugins.enforcer.its:menforcer128_api' ) 23 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/require-upper-bound-deps_includes/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.buildResult=failure -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/resolve_collect_dependencies/invoker.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | invoker.goals = clean package -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/it/projects/resolve_collect_dependencies/verify.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | assert new File( basedir, 'target/resolve_collect_dependencies-1.0-extjars.zip' ).isFile() 20 | 21 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/site/apt/thirdparty-rules.apt: -------------------------------------------------------------------------------- 1 | ~~ Licensed to the Apache Software Foundation (ASF) under one 2 | ~~ or more contributor license agreements. See the NOTICE file 3 | ~~ distributed with this work for additional information 4 | ~~ regarding copyright ownership. The ASF licenses this file 5 | ~~ to you under the Apache License, Version 2.0 (the 6 | ~~ "License"); you may not use this file except in compliance 7 | ~~ with the License. You may obtain a copy of the License at 8 | ~~ 9 | ~~ http://www.apache.org/licenses/LICENSE-2.0 10 | ~~ 11 | ~~ Unless required by applicable law or agreed to in writing, 12 | ~~ software distributed under the License is distributed on an 13 | ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | ~~ KIND, either express or implied. See the License for the 15 | ~~ specific language governing permissions and limitations 16 | ~~ under the License. 17 | 18 | ------ 19 | Thirdparty Rules 20 | ------ 21 | Jason Dillon 22 | ------ 23 | 2018-08-27 24 | ------ 25 | 26 | Thirdparty Rules 27 | 28 | * {{{https://sonatype.github.io/ossindex-maven/enforcer-rules/}Sonatype OSS Index - Ban Vulnerable Dependencies}} 29 | 30 | * {{{https://www.mojohaus.org/extra-enforcer-rules/}MojoHaus - Extra Enforcer Rules}} 31 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/TestRule1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.enforcer; 20 | 21 | import org.apache.maven.enforcer.rule.api.AbstractEnforcerRule; 22 | 23 | public class TestRule1 extends AbstractEnforcerRule { 24 | 25 | @Override 26 | public void execute() {} 27 | } 28 | -------------------------------------------------------------------------------- /maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/TestRule2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.maven.plugins.enforcer; 20 | 21 | import org.apache.maven.enforcer.rule.api.AbstractEnforcerRule; 22 | 23 | public class TestRule2 extends AbstractEnforcerRule { 24 | 25 | @Override 26 | public void execute() {} 27 | } 28 | -------------------------------------------------------------------------------- /src/site/resources/download.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Just call the standard mirrors.cgi script. It will use download.html 21 | # as the input template. 22 | exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* --------------------------------------------------------------------------------