You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/10/06 10:24:35 UTC
[maven-enforcer] 04/04: [MENFORCER-320] - RequireProfileIdsExist
check fails if no profiles have been specified - RequireProfileIdsExist
check must not fail if there are no profiles in the pom.xml and no profiles
have been specified in the command line - fix site: breadcrumbs on the
"requireProfileIdsExist" page.
This is an automated email from the ASF dual-hosted git repository.
khmarbaise pushed a commit to branch MENFORCER-320
in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git
commit d94f3b5f61ff482939f3aae2823f61f6d1aa6761
Author: Alex Shesterov <al...@gmail.com>
AuthorDate: Fri Oct 5 15:29:18 2018 +0200
[MENFORCER-320] - RequireProfileIdsExist check fails if no profiles have been specified
- RequireProfileIdsExist check must not fail if there are no profiles
in the pom.xml and no profiles have been specified in the command line
- fix site: breadcrumbs on the "requireProfileIdsExist" page.
---
.../maven/plugins/enforcer/RequireProfileIdsExist.java | 12 ++++++------
enforcer-rules/src/site/apt/requireProfileIdsExist.apt.vm | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProfileIdsExist.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProfileIdsExist.java
index 9a16546..770f644 100644
--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProfileIdsExist.java
+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProfileIdsExist.java
@@ -64,13 +64,13 @@ public class RequireProfileIdsExist extends AbstractNonCacheableEnforcerRule
for ( org.apache.maven.settings.Profile profile : session.getSettings().getProfiles() )
{
profileIds.remove( profile.getId() );
-
- if ( profileIds.isEmpty() )
- {
- return;
- }
}
-
+
+ if ( profileIds.isEmpty() )
+ {
+ return;
+ }
+
StringBuilder sb = new StringBuilder();
if ( profileIds.size() > 1 )
{
diff --git a/enforcer-rules/src/site/apt/requireProfileIdsExist.apt.vm b/enforcer-rules/src/site/apt/requireProfileIdsExist.apt.vm
index 8da72a4..49e84ac 100644
--- a/enforcer-rules/src/site/apt/requireProfileIdsExist.apt.vm
+++ b/enforcer-rules/src/site/apt/requireProfileIdsExist.apt.vm
@@ -16,7 +16,7 @@
~~ under the License.
-----
- Require Upper Bound Dependencies
+ Require Existence of Profiles Specified on the Commandline
-----
-----
2017-09-25