Skip to content

Instantly share code, notes, and snippets.

@inedo-builds
Last active May 30, 2019 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inedo-builds/54eb40bb847298df7ec6edca721666f3 to your computer and use it in GitHub Desktop.
Save inedo-builds/54eb40bb847298df7ec6edca721666f3 to your computer and use it in GitHub Desktop.
Export Maven metadata from ProGet (PostgreSQL)
SELECT xmlelement(name "Package", xmlattributes("GroupId_Text" AS "Group",
"ArtifactId_Text" AS "Id",
"Name_Text" AS "Name",
"Description_Text" AS "Description",
"ReleaseVersion_Text" AS "Release",
"LatestVersion_Text" AS "Latest"),
(SELECT xmlagg(xmlelement(name "Version", xmlattributes("Version_Text" AS "Version",
"File_Type" AS "Type",
"File_SHA1_Bytes" AS "SHA1",
"File_MD5_Bytes" AS "MD5",
"File_Size" AS "Size",
"Updated_Date" AS "Updated",
"Cached_Indicator" AS "Cached",
"Download_Count" AS "Downloads",
"LastDownloaded_Date" AS "Downloaded",
"FileName_Text" AS "FileName")))
FROM "MavenArtifactFiles" F
WHERE F."MavenArtifact_Id" = M."MavenArtifact_Id")
)
FROM "MavenArtifacts" M
WHERE M."Feed_Id" = <Feed ID>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment