Skip to content

Commit df0fef5

Browse files
committed
Use -X instead of --debug for Maven debug logging
In Maven 3, the `--debug` option enabled verbose debug logging. However, in Maven 4, it behaves like `mvnDebug`, causing Maven to pause and wait for a debugger connection. To ensure consistent behavior across Maven 3 and 4, switch from `--debug` to `-X`, which retains verbose debug logging in both versions.
1 parent ee80dd1 commit df0fef5

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

java-utils/mvn_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def goal_callback(option, opt_str, value, parser):
127127
mvn_args.append("-Dxmvn.compat=20-rpmbuild-raw")
128128

129129
if options.debug:
130-
mvn_args.append("--debug")
130+
mvn_args.append("-X")
131131

132132
if options.xmvn_debug or options.debug:
133133
mvn_args.append("-Dxmvn.debug")

test/data/mvn_build/all_out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--batch-mode --offline --debug -Dxmvn.debug -Dmaven.test.skip=true package org.fedoraproject.xmvn:xmvn-mojo:builddep
1+
--batch-mode --offline -X -Dxmvn.debug -Dmaven.test.skip=true package org.fedoraproject.xmvn:xmvn-mojo:builddep

test/data/mvn_build/debug_out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--batch-mode --offline --debug -Dxmvn.debug verify org.fedoraproject.xmvn:xmvn-mojo:install org.apache.maven.plugins:maven-javadoc-plugin:aggregate org.fedoraproject.xmvn:xmvn-mojo:builddep
1+
--batch-mode --offline -X -Dxmvn.debug verify org.fedoraproject.xmvn:xmvn-mojo:install org.apache.maven.plugins:maven-javadoc-plugin:aggregate org.fedoraproject.xmvn:xmvn-mojo:builddep

0 commit comments

Comments
 (0)