aflierl commented on issue #125:
URL: https://github.com/apache/plc4x-extras/issues/125#issuecomment-3914255585

   The problem is that the `artifactId` clash prevents proper inheritance from 
their parent POMs, which carry all the version information. Let me explain:
   
   When building the Kafka integration package, we get the following warnings 
(but the ZIP is built nevertheless):
   
   ```console
   [INFO] Building PLC4J: Integrations: Apache Kafka 0.13.1                  
[4/4]
   [INFO]   from plc4j/integrations/apache-kafka/pom.xml
   [INFO] --------------------------------[ jar 
]---------------------------------
   [WARNING] The POM for org.apache.plc4x:plc4j-scraper:jar:0.13.1 is invalid, 
transitive dependencies (if any) will not be available: 8 problems were 
encountered while building the effective model for 
org.apache.plc4x:plc4j-scraper:0.13.1
   [ERROR] 'dependencies.dependency.version' for 
com.fasterxml.jackson.core:jackson-core:jar is missing. @
   [ERROR] 'dependencies.dependency.version' for 
com.fasterxml.jackson.core:jackson-annotations:jar is missing. @
   [ERROR] 'dependencies.dependency.version' for 
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar is missing. @
   [ERROR] 'dependencies.dependency.version' for 
com.fasterxml.jackson.core:jackson-databind:jar is missing. @
   [ERROR] 'dependencies.dependency.version' for 
org.apache.commons:commons-math3:jar is missing. @
   [ERROR] 'dependencies.dependency.version' for 
org.apache.commons:commons-lang3:jar is missing. @
   [ERROR] 'dependencies.dependency.version' for 
org.apache.commons:commons-collections4:jar is missing. @
   [ERROR] 'dependencies.dependency.version' for org.awaitility:awaitility:jar 
is missing. @
   
   [WARNING] The POM for org.apache.plc4x:plc4j-connection-cache:jar:0.13.1 is 
invalid, transitive dependencies (if any) will not be available: 1 problem was 
encountered while building the effective model for 
org.apache.plc4x:plc4j-connection-cache:0.13.1
   [ERROR] 'dependencies.dependency.version' for org.awaitility:awaitility:jar 
is missing. @
   ```
   
   Upon further inspection, it turns out that both the PLC4J scraper and 
connection cache POMs do not specify their versions directly but instead 
inherit them from their parent POM:
   - https://github.com/apache/plc4x/blob/develop/plc4j/tools/scraper/pom.xml
   - 
https://github.com/apache/plc4x/blob/develop/plc4j/tools/connection-cache/pom.xml
   
   The dependency and inheritance hierarchy looks like this:
   
   ```mermaid
   flowchart TB
   
   subgraph plc4x-extras
     direction LR
     plc4j-apache-kafka
     plc4j-integrations
     plc4j-extras-tools["plc4j-tools"]
     plc4j-extras
     plc4x-extras-parent
   end
   
   subgraph plc4x
     direction LR
     plc4j-connection-cache
     plc4j-scraper
     plc4j-tools
     plc4j
     plc4x-parent["plc4x-parent<br/>(has dependency versions)"]
   end
   
   plc4j-apache-kafka -.-> plc4j-connection-cache
   plc4j-apache-kafka -.-> plc4j-scraper
   
   plc4j-apache-kafka --> plc4j-integrations
   plc4j-integrations --> plc4j-extras
   plc4j-extras-tools --> plc4j-extras
   plc4j-extras --> plc4x-extras-parent
   
   plc4j-connection-cache --> plc4j-tools
   plc4j-scraper --> plc4j-tools
   plc4j-tools --> plc4j
   plc4j --> plc4x-parent
   
   style plc4j-extras-tools fill:red
   style plc4j-tools fill:red
   ```
   
   (solid arrows: POM inheritance, dotted arrows: dependency)
   
   So dependency resolution *should* follow the green arrows and end up finding 
the dependency versions in `plc4x-parent` but instead – because of the clashing 
`artifactId` – follows the red arrows, ending up in `plc4x-extras-parent` where 
it does not find any versions.
   
   ```mermaid
   flowchart TB
   
   subgraph plc4x-extras
     direction LR
     plc4j-apache-kafka
     plc4j-integrations
     plc4j-extras-tools["plc4j-tools"]
     plc4j-extras
     plc4x-extras-parent
   end
   
   subgraph plc4x
     direction LR
     plc4j-connection-cache
     plc4j-scraper
     plc4j-tools
     plc4j
     plc4x-parent["plc4x-parent<br/>(has dependency versions)"]
   end
   
   plc4j-apache-kafka -.-> plc4j-connection-cache
   plc4j-apache-kafka -.-> plc4j-scraper
   
   plc4j-apache-kafka --> plc4j-integrations
   plc4j-integrations --> plc4j-extras
   plc4j-extras-tools --> plc4j-extras
   plc4j-extras --> plc4x-extras-parent
   
   plc4j-connection-cache --> plc4j-tools
   plc4j-scraper --> plc4j-tools
   plc4j-tools --> plc4j
   plc4j --> plc4x-parent
   
   plc4j-apache-kafka ==> plc4j-connection-cache
   plc4j-connection-cache ==> plc4j-tools
   plc4j-tools ==> plc4j
   plc4j ==> plc4x-parent
   
   plc4j-apache-kafka ==> plc4j-connection-cache
   plc4j-connection-cache ==> plc4j-extras-tools
   plc4j-extras-tools ==> plc4j-extras
   plc4j-extras ==> plc4x-extras-parent
   
   style plc4j-extras-tools fill:red
   style plc4j-tools fill:red
   
   linkStyle 10,11,12,13 stroke:green
   linkStyle 14,15,16,17 stroke:red
   ```
   
   That's why the dependencies are reported as missing and are not included in 
the shaded uber ZIP.
   
   I hope that makes sense.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to