Hi, I have a question please. I have a module, tha...
# community-support
b
Hi, I have a question please. I have a module, that depends on another modules configuration. That configuration has an artifact with a 'classifier' specified.
Copy code
dependencies {
   api project(path: ":cavis-native:cavis-native-lib", configuration: "runtimeElements")
}
That works so far, the correct artifact gets pulled in. Now when I am publishing using MavenPublish, the generated POM is missing the classifier
Copy code
<dependency>
      <groupId>net.brutex.cavis.cavis-native</groupId>
      <artifactId>cavis-native-lib</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
This is how configuration runtimeElements is set in the "producing" module:
Copy code
--------------------------------------------------
Variant runtimeElements
--------------------------------------------------
Elements of runtime for main.

Capabilities
    - net.brutex.cavis.cavis-native:cavis-native-lib:1.0.0-SNAPSHOT (default capability)
Attributes
    - org.gradle.category            = library
    - org.gradle.dependency.bundling = external
    - org.gradle.jvm.version         = 8
    - org.gradle.libraryelements     = jar
    - org.gradle.usage               = java-runtime
Artifacts
    - build\libs\cavis-native-lib-1.0.0-SNAPSHOT-windows-x86_64-avx2-cpu.jar (artifactType = jar, classifier = windows-x86_64-avx2-cpu)
    - build\libs\cavis-native-lib-1.0.0-SNAPSHOT-windows-x86_64-avx2-cuda.jar (artifactType = jar, classifier = windows-x86_64-avx2-cuda)
    - build\libs\cavis-native-lib-1.0.0-SNAPSHOT.jar (artifactType = jar)
How can I achieve to to have the classifier included when publishing the POM dependencies ? Here is the concept used https://docs.gradle.org/current/userguide/variant_model.html, but I am looking about mapping to maven POM, rather mapping from maven. Gradle 7.5.1 Thank you. Cheers Brian