-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56d13f9
commit 1622775
Showing
4 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const pomParser = require('pom-parser') | ||
|
||
module.exports = async () => { | ||
try { | ||
const opts = { | ||
filePath: 'pom.xml', | ||
} | ||
const pomPromise = new Promise((resolve, reject) => { | ||
pomParser.parse(opts, (err, pomResponse) => { | ||
if (err) { | ||
reject(err) | ||
return | ||
} | ||
|
||
resolve(pomResponse.pomObject) | ||
}) | ||
}) | ||
|
||
const { | ||
project: { | ||
groupid, artifactid, version, description, | ||
}, | ||
} = await pomPromise | ||
return { | ||
name: `${groupid}.${artifactid}`, | ||
version: version, | ||
description: description, | ||
} | ||
} catch (e) { | ||
return null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4864,6 +4864,14 @@ pn@^1.1.0: | |
resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" | ||
integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== | ||
|
||
pom-parser@^1.2.0: | ||
version "1.2.0" | ||
resolved "https://registry.yarnpkg.com/pom-parser/-/pom-parser-1.2.0.tgz#d705b379432c6ed33bbbadc096c0263d37eb44fe" | ||
integrity sha512-v5QRdaXWS/Qg2KX3rYNSI8dxuEH1DVh8HcayKQwqfaGFVzI5EJxHqK2ThBBsRvmscEHkbyPrBzno1sq9l54uiA== | ||
dependencies: | ||
traverse "^0.6.6" | ||
xml2js "^0.4.9" | ||
|
||
posix-character-classes@^0.1.0: | ||
version "0.1.1" | ||
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" | ||
|
@@ -5397,7 +5405,7 @@ sane@^2.0.0: | |
optionalDependencies: | ||
fsevents "^1.2.3" | ||
|
||
sax@^1.2.4: | ||
sax@>=0.6.0, sax@^1.2.4: | ||
version "1.2.4" | ||
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" | ||
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== | ||
|
@@ -6060,6 +6068,11 @@ tr46@^1.0.1: | |
dependencies: | ||
punycode "^2.1.0" | ||
|
||
traverse@^0.6.6: | ||
version "0.6.6" | ||
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" | ||
integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= | ||
|
||
trim-newlines@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" | ||
|
@@ -6440,6 +6453,19 @@ xml-name-validator@^3.0.0: | |
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" | ||
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== | ||
|
||
xml2js@^0.4.9: | ||
version "0.4.23" | ||
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" | ||
integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== | ||
dependencies: | ||
sax ">=0.6.0" | ||
xmlbuilder "~11.0.0" | ||
|
||
xmlbuilder@~11.0.0: | ||
version "11.0.1" | ||
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" | ||
integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== | ||
|
||
[email protected]: | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" | ||
|