Skip to content

Commit e50e593

Browse files
committed
Do not allow MavenProjects without description or URL.
They are required for upload to Maven Central.
1 parent 90a1bcf commit e50e593

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,11 @@ def __init__(self, suite, name, deps, excludedLibs, platformDependent, theLicens
27402740
self._localExtension = self._remoteExtension = "jar"
27412741
else:
27422742
self._localExtension = self._remoteExtension
2743-
self.description = self.pom.get_text("description", "")
2743+
self.description = self.pom.get_text("description")
2744+
if not self.description:
2745+
mx.abort(f"MavenProject {self.name} does not have a description, which is required by Maven Central")
2746+
if not self.pom.get_text("url"):
2747+
mx.abort(f"MavenProject {self.name} does not have a url, which is required by Maven Central")
27442748
self.sourcesname = f"{self.name}-sources.{self._localExtension}"
27452749
self.sourcesPath = os.path.join(self.get_output_root(), self.sourcesname)
27462750
self.path = self._default_path()

0 commit comments

Comments
 (0)