Skip to content

Commit

Permalink
feat(maven): lookup parent homepage/scm information from pom (#9722)
Browse files Browse the repository at this point in the history
  • Loading branch information
twendelmuth committed Jun 25, 2021
1 parent 222ef91 commit 7fd1e2f
Show file tree
Hide file tree
Showing 24 changed files with 801 additions and 13 deletions.
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-all-info/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-all-info</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
12 changes: 12 additions & 0 deletions lib/datasource/maven/__fixtures__/child-all-info/pom.xml
@@ -0,0 +1,12 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
<scm>
<!-- example taken from https://maven.apache.org/scm/git.html -->
<url>scm:git:http://www.github.com/child-scm/child</url>
</scm>
<url>https://child-home.example.com</url>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-empty/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-no-info</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
4 changes: 4 additions & 0 deletions lib/datasource/maven/__fixtures__/child-empty/pom.xml
@@ -0,0 +1,4 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
</parent>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-no-info/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-no-info</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
7 changes: 7 additions & 0 deletions lib/datasource/maven/__fixtures__/child-no-info/pom.xml
@@ -0,0 +1,7 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
</project>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>package</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
17 changes: 17 additions & 0 deletions lib/datasource/maven/__fixtures__/child-parent-cycle/child.pom.xml
@@ -0,0 +1,17 @@

<!--
License
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>2.0.0</version>
</parent>
<groupId>org.example</groupId>
<artifactId>child</artifactId>
<name>Generic Package</name>
<description>Generic Maven Package</description>
</project>
@@ -0,0 +1,8 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.example</groupId>
<artifactId>child</artifactId>
<version>2.0.0</version>
</parent>
<url>https://parent-home.example.com</url>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-scm-gitatcolon/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-scm-gitatcolon</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1,6 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<scm>
<!-- as seen in https://repo.maven.apache.org/maven2/org/freemarker/freemarker/2.3.20/freemarker-2.3.20.pom -->
<url>git@github.com:child-scm/child</url>
</scm>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-scm-gitatslash/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-scm-gitatslash</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1,6 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<scm>
<!-- as seen in https://repo.maven.apache.org/maven2/ro/nextreports/nextreports-engine/9.2/nextreports-engine-9.2.pom -->
<url>git@github.com/child-scm/child</url>
</scm>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-scm-gitprotocol/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-scm-gitprotocol</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1,6 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<scm>
<!-- as seen in https://repo.maven.apache.org/maven2/org/xhtmlrenderer/flying-saucer-parent/9.1.9/flying-saucer-parent-9.1.9.pom -->
<url>git://github.com/child-scm/child</url>
</scm>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-scm/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-scm</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-scm/pom.xml
@@ -0,0 +1,11 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
<scm>
<!-- example taken from https://maven.apache.org/scm/git.html -->
<url>scm:git:https://www.github.com/child-scm/child</url>
</scm>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/child-url/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>child-url</artifactId>
<version>2.0.0</version>
<versioning>
<versions>
<version>2.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
8 changes: 8 additions & 0 deletions lib/datasource/maven/__fixtures__/child-url/pom.xml
@@ -0,0 +1,8 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
<url>https://child-home.example.com</url>
</project>
11 changes: 11 additions & 0 deletions lib/datasource/maven/__fixtures__/parent-scm-homepage/meta.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
<versioning>
<versions>
<version>1.0.0</version>
</versions>
<lastUpdated>20130301200000</lastUpdated>
</versioning>
</metadata>
7 changes: 7 additions & 0 deletions lib/datasource/maven/__fixtures__/parent-scm-homepage/pom.xml
@@ -0,0 +1,7 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<scm>
<!-- example taken from https://maven.apache.org/scm/git.html -->
<url>scm:git:git://www.github.com/parent-scm/parent</url>
</scm>
<url>https://parent-home.example.com</url>
</project>

0 comments on commit 7fd1e2f

Please sign in to comment.