Skip to content

Commit

Permalink
4.x: fix parent </relativePath> (#71)
Browse files Browse the repository at this point in the history
* Add support for setting </relativePath>

* Add </relativePath> to parent

* Fix copyright and checkstyle

* Fix MainTest

---------

Co-authored-by: Romain Grecourt <[email protected]>
  • Loading branch information
barchetta and romain-grecourt authored Aug 6, 2024
1 parent 9a856b5 commit f078db7
Show file tree
Hide file tree
Showing 113 changed files with 143 additions and 17 deletions.
13 changes: 11 additions & 2 deletions etc/scripts/updateparent.awk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!awk -f
#
# Copyright (c) 2023 Oracle and/or its affiliates.
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@
#
BEGIN {
if (gavs == "") {
print "Must provide one or more GAVs using '-v gavs=g1:a1:v1,g2:a2:v2"
print "Must provide one or more GAVs using '-v gavs=g1:a1:v1,g2:a2:v2"
exit 1
}

Expand All @@ -48,6 +48,7 @@ BEGIN {
inParent="false"
parentGroupId=""
parentArtifactId=""
parentRelativePath="false"
FS="[<>]"
}

Expand All @@ -74,12 +75,20 @@ BEGIN {
}
}

/<relativePath/ && inParent == "true" {
parentRelativePath="true"
}

/<\/parent>/ {
inParent="false"
parentGroupId=""
parentArtifactId=""
if (parentRelativePath == "false") {
printf("%s<relativePath/>\n", $1$1)
}
}


{
print $0
}
Expand Down
1 change: 1 addition & 0 deletions examples/config/basics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-basics</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/config/changes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-changes</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/config/git/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-git</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/config/mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-mapping</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/config/metadata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-metadata</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/config/overrides/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-overrides</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/config/profiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-profiles</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/config/sources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
<artifactId>helidon-examples-config-sources</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/cors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples</groupId>
<artifactId>helidon-examples-cors</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/dbclient/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>helidon-examples-dbclient-jdbc</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/dbclient/mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>helidon-examples-dbclient-mongodb</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/dbclient/pokemons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>helidon-examples-dbclient-pokemons</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/employee-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.employee</groupId>
<artifactId>helidon-examples-employee-app</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/graphql/basics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.graphql</groupId>
<artifactId>helidon-examples-graphql-basics</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/health/basics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.health</groupId>
<artifactId>helidon-examples-health-basics</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/cdi/datasource-hikaricp-h2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.integrations.cdi</groupId>
<artifactId>helidon-integrations-examples-datasource-hikaricp-h2</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.integrations.cdi</groupId>
<artifactId>helidon-integrations-examples-datasource-hikaricp-mysql</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/cdi/datasource-hikaricp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.integrations.cdi</groupId>
<artifactId>helidon-examples-integrations-datasource-hikaricp</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/cdi/jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.integrations.cdi</groupId>
<artifactId>helidon-integrations-examples-jpa</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/cdi/pokemons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.integrations.cdi</groupId>
<artifactId>helidon-integrations-examples-pokemons</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion examples/integrations/micrometer/mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -104,4 +105,4 @@
</plugins>
</build>

</project>
</project>
1 change: 1 addition & 0 deletions examples/integrations/micrometer/se/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.micrometer-project</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/micronaut/data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>helidon-examples-integrations-micronaut-data</artifactId>
<version>1.0.0-SNAPSHOT</version>
Expand Down
3 changes: 2 additions & 1 deletion examples/integrations/microstream/greetings-mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>helidon-examples-integrations-microstream-greetings-mp</artifactId>
Expand Down Expand Up @@ -81,4 +82,4 @@
</plugins>
</build>

</project>
</project>
1 change: 1 addition & 0 deletions examples/integrations/microstream/greetings-se/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>helidon-examples-integrations-microstream-greetings-se</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/neo4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>helidon-examples-integration-neo4j</artifactId>
<version>1.0.0-SNAPSHOT</version>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/oci/atp-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.oci</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/oci/atp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.oci</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/oci/metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<properties>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/oci/objectstorage-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.oci</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/oci/objectstorage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.oci</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/oci/vault-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.oci</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/oci/vault/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.oci</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/vault/hcp-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.vault</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/integrations/vault/hcp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>

<groupId>io.helidon.examples.integrations.vault</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/jbatch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.jbatch</groupId>
<artifactId>helidon-examples-jbatch</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/logging/jul/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.logging</groupId>
<artifactId>helidon-examples-logging-jul</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/logging/log4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.logging</groupId>
<artifactId>helidon-examples-logging-log4j</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/logging/logback-aot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.logging</groupId>
<artifactId>helidon-examples-logging-slf4j-aot</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/logging/slf4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.logging</groupId>
<artifactId>helidon-examples-logging-slf4j</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/media/multipart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.media</groupId>
<artifactId>helidon-examples-media-multipart</artifactId>
Expand Down
1 change: 1 addition & 0 deletions examples/messaging/jms-websocket-mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-mp</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.jms</groupId>
<artifactId>helidon-examples-jms-websocket-mp</artifactId>
Expand Down
Loading

0 comments on commit f078db7

Please sign in to comment.