Return Packagedata objects from parsing a Maven pom file at `location` or using the provided `text` (one or the other but not both).
(
location,
datasource_id,
package_type,
primary_language,
base_url='https://repo1.maven.org/maven2',
package_only=False,
)
| 1192 | |
| 1193 | |
| 1194 | def parse( |
| 1195 | location, |
| 1196 | datasource_id, |
| 1197 | package_type, |
| 1198 | primary_language, |
| 1199 | base_url='https://repo1.maven.org/maven2', |
| 1200 | package_only=False, |
| 1201 | ): |
| 1202 | """ |
| 1203 | Return Packagedata objects from parsing a Maven pom file at `location` or |
| 1204 | using the provided `text` (one or the other but not both). |
| 1205 | """ |
| 1206 | package = _parse( |
| 1207 | datasource_id=datasource_id, |
| 1208 | package_type=package_type, |
| 1209 | primary_language=primary_language, |
| 1210 | location=location, |
| 1211 | base_url=base_url, |
| 1212 | package_only=package_only, |
| 1213 | ) |
| 1214 | if package: |
| 1215 | return package |
| 1216 | |
| 1217 | |
| 1218 | def _parse( |
no test coverage detected