Skip to content

joonfrog/apple_demo

Repository files navigation

This is a sample multi module gradle project to demo issues with artifactory gradle plugin:

  • The genrated pom.xml misses entries for runtimeOnly dependencies. In the present example, demo-impl has compile dependency on demo-client & demo-client has runtimeOnly dependency on demo-api. Notice that the final pom.xml of demo-client generated by artifactory plugin is missing dependency entry for demo-api completely. As a result of this, runtime exception occurs while running demo-impl.

  • This repo was setup to run with our internal Jenkins/Artifactory, followings has to be changed for this project to work with a different one:

    • Jenkisfile:
      1. ARTIFACTORY = credentials('jenkins-artifactory-creds') --> applicable Jenkins credentials to be used.
      2. Docker image to build has to be changed.
      3. The publish stage has to be updated to use: correct ArtifactoryURL, repositories (resolve/deploy) and Artifactory Creds.
    • gradle.properties: values to be set as applicable
  • Steps to reproduce the issue:

    1. Deploy all the project through Jenkins to artifactory plugin.
    2. Try to run the demo-impl project with following command: gradle :demo-impl:run
    3. Verify the pom.xml of "demo-client" in artifactory server.
  • Notes on jenkins-artifactory-plugin

    • version: 2.16.1
    • IVY descriptor deployment is enabled by default.
    • artifactoryPublish doesn't seem to resolve inter module dependencies and that's why we need to execute the same twice (so that dependencies are already available while dependent artifact is being deployed).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages