lightbend / config

configuration library for JVM languages using HOCON files
https://lightbend.github.io/config/
6.12k stars 968 forks source link

Problems with com.typesafe/config and maven-dependency-plugin #784

Open grgrzybek opened 1 year ago

grgrzybek commented 1 year ago

We have a project which uses:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-cassandra</artifactId>
    <version>${project.update.spring-boot-dependencies}</version>
</dependency>

and maven-dependency-plugin:copy-dependencies goal.

We (jboss-fuse/redhat-fuse) see this when building:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:copy-dependencies (unpack-dependencies) on project fuse-springboot-patch-repository: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16
[ERROR] : 1 problem was encountered while building the effective model for com.typesafe:config:1.4.1
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16
[ERROR] -> [Help 1]

Thanks to new feature of Maven 3.9.2 and its option -Dmaven.repo.local.recordReverseTree=true, we've tracked the dependency (~/.m2/repository/com/typesafe/config/1.4.1/.tracking/org.jboss.redhat-fuse_fuse-springboot-patch-metadata_jar_7.11.1.fuse-sb2-7_11_1-00025.dep):

com.typesafe:config:pom:1.4.1
  com.typesafe:config:jar:1.4.1 (compile) (project)
    com.datastax.oss:java-driver-core:jar:4.11.3 (compile) (project)
      org.springframework.data:spring-data-cassandra:jar:3.2.12 (compile) (project)
        org.springframework.boot:spring-boot-starter-data-cassandra:jar:2.5.15 (compile) (project)
          org.jboss.redhat-fuse:fuse-springboot-patch-metadata:jar:7.11.1.fuse-sb2-7_11_1-00025 (project)

Repository: central (https://repo.maven.apache.org/maven2, default, releases)

The problem is that com.typesafe/config/1.4.1/pom doesn't have parent, doesn't include maven-bundle-plugin declaration but uses:

<packaging>bundle</packaging>

I have completely no idea how SBT works, but I believe this problem may affect more users.