diff --git a/mx.py b/mx.py index fe12b916..730feabe 100755 --- a/mx.py +++ b/mx.py @@ -11794,6 +11794,7 @@ def _maven_deploy_dists(dists, versionGetter, repo, settingsXml, gpg=False, keyid=None, generateJavadoc=False, + generateDummyJavadoc=False, deployMapFiles=False, deployRepoMetadata=False): if repo != maven_local_repository(): @@ -11863,7 +11864,7 @@ def _maven_deploy_dists(dists, versionGetter, repo, settingsXml, tmpJavadocJar = tempfile.NamedTemporaryFile('w', suffix='.jar', delete=False) tmpJavadocJar.close() javadocPath = tmpJavadocJar.name - if getattr(dist, "noMavenJavadoc", False): + if getattr(dist, "noMavenJavadoc", False) or generateDummyJavadoc: with zipfile.ZipFile(javadocPath, 'w', compression=zipfile.ZIP_DEFLATED) as arc: arc.writestr("index.html", "No Javadoc") else: @@ -12051,7 +12052,9 @@ def maven_deploy(args): parser.add_argument('--skip', action='store', help='Comma-separated list of globs of distributions not to be deployed') parser.add_argument('--skip-existing', action='store_true', help='Do not deploy distributions if already in repository') parser.add_argument('--validate', help='Validate that maven metadata is complete enough for publication', default='compat', choices=['none', 'compat', 'full']) - parser.add_argument('--suppress-javadoc', action='store_true', help='Suppress javadoc generation and deployment') + javadoc_parser = parser.add_mutually_exclusive_group() + javadoc_parser.add_argument('--suppress-javadoc', action='store_true', help='Suppress javadoc generation and deployment') + javadoc_parser.add_argument('--dummy-javadoc', action='store_true', help='Generate and deploy dummy javadocs, as if every distribution has `"noMavenJavadoc": True`') parser.add_argument('--all-distribution-types', help='Include all distribution types. By default, only JAR distributions are included', action='store_true') parser.add_argument('--all-distributions', help='Include all distributions, regardless of the maven flags.', action='store_true') version_parser = parser.add_mutually_exclusive_group() @@ -12119,6 +12122,7 @@ def versionGetter(_suite): gpg=args.gpg, keyid=args.gpg_keyid, generateJavadoc=generateJavadoc, + generateDummyJavadoc=args.generate_javadoc, deployRepoMetadata=args.with_suite_revisions_metadata) has_deployed_dist = True if not has_deployed_dist: @@ -18783,7 +18787,7 @@ def alarm_handler(signum, frame): abort(1, killsig=signal.SIGINT) # The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue -version = VersionSpec("6.45.1") # GR-48321 Fix JARDistribution exclude list not triggering rebuild +version = VersionSpec("6.46.0") # GR-48450: The maven-deploy command can force generation of dummy javadoc. _mx_start_datetime = datetime.utcnow() _last_timestamp = _mx_start_datetime