Jenkins Artifactory Plugin Does Not Generate POM File

I successfully create a gradle project in Jenkins and deploy jars in artifactory. However, when I try to reuse them in another project, additional dependencies are not recognized / not loaded. I assume this is due to a missing pom file in artifactory.

In artifactory, JAR files are loaded correctly, but there is no POM file next to it.

Do I understand correctly that I need this POM file for gradle to allow jar to hang when trying to load it again? And why is the POM file not generated?

Job Settings:

Gradle Archival Integration

Project uses the Artifactory Gradle Plugin = false
Capture and publish build info = true
Publish artifacts to Artifactory = true
    Publish Maven descriptors = true
Use Maven compatible patterns = true
    patterns are default: [organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]

Addition:

use gradle wrapper = true
tasks = build
+4
source share
2 answers

Maven ( jar) pom (.pom extension), ( ). .pom.

, maven. Jenkins mvn clean package, jar. Artifactory Jenkins Artifactory, Maven (GAV, groupId, artifactId, ). .pom .
Maven, package install. install .pom ( Maven).

, mvn clean install, Artifactory Jenkins .jar .pom.

gradle . , jar, Artifactory Jenkins Artifactory, .pom . , gradle assemble gradle build, , .pom. , Jenkins a gradle install, maven, SO-, , :

31.6.3.
Maven . . Maven.

31.6.4. Maven POM
Maven gradle POM .

: " maven , java-", , .pom, maven-publish publishToMavenLocal.

, : .jar .pom ( : Jenkins, ), . Artifactory Jenkins .


( SO), install createPom gradle build, POM :

task createPom << { 
    pom { 
        project { 
            groupId 'company'
            artifactId project.name
            version "$version"
        }
    }.writeTo("pom.xml")
}
+11

:

Include Patterns: *.pom *.jar

build.gradle maven:

apply plugin: 'maven-publish'

pom Artifactory. , Maven true.

0

Source: https://habr.com/ru/post/1622935/


All Articles