Skip to content

Commit

Permalink
[GR-53394] Fix spurious validation error for MavenProject.
Browse files Browse the repository at this point in the history
PullRequest: mx/1786
  • Loading branch information
timfel committed Apr 11, 2024
2 parents 5588b93 + 7739128 commit e8e08ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/mx/_impl/mavenproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ def get_section(element: ET.Element, path: str, errorstr=None):
return result

match_not_empty(parsed_pom, "url", self.suite.url, "include suite url")
match_not_empty(parsed_pom, "description", getattr(self.suite, "description", ""), "suite description")
match_not_empty(
parsed_pom,
"description",
getattr(self, "description", getattr(self.suite, "description", "")),
"suite description",
)
if devs := get_section(parsed_pom, "developers"):
if dev := get_section(devs, "developer"):
for attr in ["name", "email", "organization"]:
Expand All @@ -285,7 +290,7 @@ def get_section(element: ET.Element, path: str, errorstr=None):
if not licenses:
cb(f"Generated POM for {self} does not include licenses")
expected_licenses: List[mx.License] = cast(List[mx.License], list(self.theLicense))
if len(licenses) != expected_licenses:
if len(licenses) != len(expected_licenses):
cb(f"Generated POM for {self} has different licenses than suite")
for pl in licenses:
for l in expected_licenses:
Expand Down
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18147,7 +18147,7 @@ def alarm_handler(signum, frame):
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.22.2") # [GR-51382] Replace maxrss in favor of rsspercentiles as the default tracker
version = VersionSpec("7.22.3") # [GR-53394] Fix spurious validation error for MavenProject.

_mx_start_datetime = datetime.utcnow()

Expand Down

0 comments on commit e8e08ac

Please sign in to comment.