forked from wala/WALA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-maven-jars.py
executable file
·42 lines (37 loc) · 984 Bytes
/
build-maven-jars.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
# script to build jars for maven central
import sys
import subprocess
import os
# action should be either 'install' (for local test)
# or 'deploy' (for deployment to maven central).
# if current version is SNAPSHOT, will only be deployed
# to sonatype's staging servers. otherwise, will be
# deployed to maven central
action = sys.argv[1]
# projects for which we should build jars, in order
# will be prefixed with 'com.ibm.wala.'
projects = [
"util",
"shrike",
"core",
"cast",
"cast.java",
"cast.java.ecj",
"cast.js",
"cast.js.rhino",
"dalvik",
"scandroid"
]
for proj in projects:
full_proj = "com.ibm.wala." + proj
print(full_proj)
os.chdir(full_proj)
mvnCmd = "mvn -f mvncentral.xml clean " + action
try:
subprocess.check_output(mvnCmd, shell=True)
except subprocess.CalledProcessError as e:
print("OUTPUT")
print(e.output)
raise
os.chdir("..")