|
7 | 7 |
|
8 | 8 | import os
|
9 | 9 | import shutil
|
| 10 | +import xml.etree.ElementTree as ET |
| 11 | + |
10 | 12 | from setuptools import Command
|
11 | 13 | from setuptools import setup
|
12 | 14 | from setuptools.command.install import install
|
|
46 | 48 | # argparse is part of python2.7 but must be declared for python2.6
|
47 | 49 | 'argparse',
|
48 | 50 | ]
|
49 |
| -REMOTE_MAVEN_PACKAGES = [ |
50 |
| - # (group id, artifact id, version), |
51 |
| - ('software.amazon.awssdk', 'kinesis', '2.17.52'), |
52 |
| - ('software.amazon.awssdk', 'annotations', '2.17.52'), |
53 |
| - ('software.amazon.awssdk', 'apache-client', '2.17.52'), |
54 |
| - ('software.amazon.awssdk', 'auth', '2.17.52'), |
55 |
| - ('software.amazon.awssdk', 'aws-cbor-protocol', '2.17.52'), |
56 |
| - ('software.amazon.awssdk', 'aws-core', '2.17.52'), |
57 |
| - ('software.amazon.awssdk', 'aws-json-protocol', '2.17.52'), |
58 |
| - ('software.amazon.awssdk', 'aws-query-protocol', '2.17.52'), |
59 |
| - ('software.amazon.awssdk', 'cloudwatch', '2.17.52'), |
60 |
| - ('software.amazon.awssdk', 'dynamodb', '2.17.52'), |
61 |
| - ('software.amazon.awssdk', 'http-client-spi', '2.17.52'), |
62 |
| - ('software.amazon.awssdk', 'json-utils', '2.17.52'), |
63 |
| - ('software.amazon.awssdk', 'metrics-spi', '2.17.52'), |
64 |
| - ('software.amazon.awssdk', 'netty-nio-client', '2.17.52'), |
65 |
| - ('software.amazon.awssdk', 'protocol-core', '2.17.52'), |
66 |
| - ('software.amazon.awssdk', 'profiles', '2.17.52'), |
67 |
| - ('software.amazon.awssdk', 'regions', '2.17.52'), |
68 |
| - ('software.amazon.awssdk', 'sdk-core', '2.17.52'), |
69 |
| - ('software.amazon.awssdk', 'sts', '2.17.52'), |
70 |
| - ('software.amazon.awssdk', 'third-party-jackson-core', '2.17.52'), |
71 |
| - ('software.amazon.awssdk', 'third-party-jackson-dataformat-cbor', '2.17.52'), |
72 |
| - ('software.amazon.awssdk', 'utils', '2.17.52'), |
73 |
| - ('software.amazon.eventstream', 'eventstream', '1.0.1'), |
74 |
| - ('software.amazon.ion', 'ion-java', '1.5.1'), |
75 |
| - ('software.amazon.glue', 'schema-registry-serde', '1.1.5'), |
76 |
| - ('software.amazon.kinesis', 'amazon-kinesis-client-multilang', '2.3.9'), |
77 |
| - ('software.amazon.kinesis', 'amazon-kinesis-client', '2.3.9'), |
78 |
| - ('com.amazonaws', 'aws-java-sdk-core', '1.12.3'), |
79 |
| - ('com.amazonaws', 'aws-java-sdk-sts', '1.12.3'), |
80 |
| - ('com.amazonaws', 'jmespath-java', '1.12.3'), |
81 |
| - ('com.fasterxml.jackson.core', 'jackson-annotations', '2.12.4'), |
82 |
| - ('com.fasterxml.jackson.core', 'jackson-core', '2.12.4'), |
83 |
| - ('com.fasterxml.jackson.core', 'jackson-databind', '2.12.4'), |
84 |
| - ('com.fasterxml.jackson.dataformat', 'jackson-dataformat-cbor', '2.12.4'), |
85 |
| - ('io.netty', 'netty-codec-http', '4.1.68.Final'), |
86 |
| - ('io.netty', 'netty-codec-http2', '4.1.68.Final'), |
87 |
| - ('io.netty', 'netty-codec', '4.1.68.Final'), |
88 |
| - ('io.netty', 'netty-transport', '4.1.68.Final'), |
89 |
| - ('io.netty', 'netty-resolver', '4.1.68.Final'), |
90 |
| - ('io.netty', 'netty-common', '4.1.68.Final'), |
91 |
| - ('io.netty', 'netty-buffer', '4.1.68.Final'), |
92 |
| - ('io.netty', 'netty-handler', '4.1.68.Final'), |
93 |
| - ('io.netty', 'netty-transport-native-epoll', '4.1.68.Final'), |
94 |
| - ('io.netty', 'netty-transport-native-unix-common', '4.1.68.Final'), |
95 |
| - ('io.reactivex.rxjava2', 'rxjava', '2.2.21'), |
96 |
| - ('com.beust', 'jcommander', '1.81'), |
97 |
| - ('com.google.guava', 'guava', '31.0.1-jre'), |
98 |
| - ('com.google.code.findbugs', 'jsr305', '3.0.2'), |
99 |
| - ('com.google.errorprone', 'error_prone_annotations', '2.7.1'), |
100 |
| - ('com.google.j2objc', 'j2objc-annotations', '1.3'), |
101 |
| - ('com.google.protobuf', 'protobuf-java', '3.17.1'), |
102 |
| - ('com.typesafe.netty', 'netty-reactive-streams-http', '2.0.5'), |
103 |
| - ('com.typesafe.netty', 'netty-reactive-streams', '2.0.5'), |
104 |
| - ('org.apache.commons', 'commons-lang3', '3.12.0'), |
105 |
| - ('org.apache.commons', 'commons-collections4', '4.4'), |
106 |
| - ('org.apache.httpcomponents', 'httpclient', '4.5.13'), |
107 |
| - ('org.apache.httpcomponents', 'httpcore', '4.4.14'), |
108 |
| - ('org.checkerframework', 'checker-qual', '2.5.2'), |
109 |
| - ('org.codehaus.mojo', 'animal-sniffer-annotations', '1.20'), |
110 |
| - ('org.reactivestreams', 'reactive-streams', '1.0.3'), |
111 |
| - ('org.slf4j', 'slf4j-api', '1.7.30'), |
112 |
| - ('commons-beanutils', 'commons-beanutils', '1.9.4'), |
113 |
| - ('commons-codec', 'commons-codec', '1.15'), |
114 |
| - ('commons-collections', 'commons-collections', '3.2.2'), |
115 |
| - ('commons-io', 'commons-io', '2.9.0'), |
116 |
| - ('commons-logging', 'commons-logging', '1.2'), |
117 |
| - ('ch.qos.logback', 'logback-classic', '1.2.7'), |
118 |
| - ('ch.qos.logback', 'logback-core', '1.2.7'), |
119 |
| - ('joda-time', 'joda-time', '2.10.10') |
120 |
| -] |
121 | 51 |
|
| 52 | +maven_pom_root = ET.parse('pom.xml').getroot() |
| 53 | +maven_pom_version = '{http://maven.apache.org/POM/4.0.0}' |
| 54 | +REMOTE_MAVEN_PACKAGES = [tuple(dep.find(maven_pom_version + attr).text for attr in ['groupId', 'artifactId', 'version']) |
| 55 | + for dep in maven_pom_root.iter(f'{maven_pom_version}dependency')] |
122 | 56 |
|
123 | 57 | class MavenJarDownloader:
|
124 | 58 |
|
|
0 commit comments