Skip to content
Snippets Groups Projects
Commit 2cba82f6 authored by Sergio Zharinov's avatar Sergio Zharinov Committed by Rhys Arkins
Browse files

fix(maven): Default group ID for plugins (#5102)

parent e4164115
No related branches found
No related tags found
No related merge requests found
...@@ -32,9 +32,14 @@ interface MavenProp { ...@@ -32,9 +32,14 @@ interface MavenProp {
function depFromNode(node: XmlElement): PackageDependency | null { function depFromNode(node: XmlElement): PackageDependency | null {
if (!node.valueWithPath) return null; if (!node.valueWithPath) return null;
const groupId = node.valueWithPath('groupId'); let groupId = node.valueWithPath('groupId');
const artifactId = node.valueWithPath('artifactId'); const artifactId = node.valueWithPath('artifactId');
const currentValue = node.valueWithPath('version'); const currentValue = node.valueWithPath('version');
if (!groupId && node.name === 'plugin') {
groupId = 'org.apache.maven.plugins';
}
if (groupId && artifactId && currentValue) { if (groupId && artifactId && currentValue) {
const depName = `${groupId}:${artifactId}`; const depName = `${groupId}:${artifactId}`;
const versionNode = node.descendantWithPath('version'); const versionNode = node.descendantWithPath('version');
......
...@@ -34,6 +34,16 @@ Object { ...@@ -34,6 +34,16 @@ Object {
"https://maven.atlassian.com/content/repositories/atlassian-public/", "https://maven.atlassian.com/content/repositories/atlassian-public/",
], ],
}, },
Object {
"currentValue": "2.4.2",
"datasource": "maven",
"depName": "org.apache.maven.plugins:maven-release-plugin",
"fileReplacePosition": 1287,
"registryUrls": Array [
"https://repo.maven.apache.org/maven2",
"https://maven.atlassian.com/content/repositories/atlassian-public/",
],
},
Object { Object {
"currentValue": "1.8.1", "currentValue": "1.8.1",
"datasource": "maven", "datasource": "maven",
......
...@@ -35,6 +35,16 @@ Array [ ...@@ -35,6 +35,16 @@ Array [
"https://maven.atlassian.com/content/repositories/atlassian-public/", "https://maven.atlassian.com/content/repositories/atlassian-public/",
], ],
}, },
Object {
"currentValue": "2.4.2",
"datasource": "maven",
"depName": "org.apache.maven.plugins:maven-release-plugin",
"fileReplacePosition": 1287,
"registryUrls": Array [
"https://repo.maven.apache.org/maven2",
"https://maven.atlassian.com/content/repositories/atlassian-public/",
],
},
Object { Object {
"currentValue": "1.8.1", "currentValue": "1.8.1",
"datasource": "maven", "datasource": "maven",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment