tools/maven: avoid using PEX for the mvn script
The PEX wrapper ignores the exit code of the wrapped script, and always exits with status 1, obscuring the true status of the command. Since mvn.py doesn't use other libraries, we can just run it directly. Change-Id: Ie7c3467cb3b8163cff79334a190fc29381dd2f72
This commit is contained in:
parent
ad2d416cf7
commit
20217595ab
@ -31,8 +31,3 @@ maven_package(
|
||||
},
|
||||
war = {'gerrit-war': '//:release'},
|
||||
)
|
||||
|
||||
python_binary(
|
||||
name = 'mvn',
|
||||
main = 'mvn.py',
|
||||
)
|
||||
|
@ -36,9 +36,11 @@ def maven_package(
|
||||
|
||||
build_cmd = ['buck', 'build']
|
||||
|
||||
mvn_cmd = ['$(exe //tools/maven:mvn)', '-v', version]
|
||||
# This is not using python_binary() to avoid the baggage and bugs
|
||||
# that PEX brings along.
|
||||
mvn_cmd = ['python', 'tools/maven/mvn.py', '-v', version]
|
||||
api_cmd = mvn_cmd[:]
|
||||
api_targets = [ '//tools/maven:mvn' ]
|
||||
api_targets = []
|
||||
for type,d in [('jar', jar), ('java-source', src), ('javadoc', doc)]:
|
||||
for a,t in sorted(d.iteritems()):
|
||||
api_cmd.append('-s %s:%s:$(location %s)' % (a,type,t))
|
||||
@ -66,7 +68,7 @@ def maven_package(
|
||||
)
|
||||
|
||||
war_cmd = mvn_cmd[:]
|
||||
war_targets = [ '//tools/maven:mvn' ]
|
||||
war_targets = []
|
||||
for a,t in sorted(war.iteritems()):
|
||||
war_cmd.append('-s %s:war:$(location %s)' % (a,t))
|
||||
war_targets.append(t)
|
||||
|
Loading…
Reference in New Issue
Block a user