Uploaded image for project: 'Gradle Artifactory Plug-in'
  1. Gradle Artifactory Plug-in
  2. GAP-35

Adding a way to upload an "external artifact" (or document the existing way)

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Labels:
      None
    • Environment:

      Debian GNU/Linux 5.0, SUN JDK 1.6.0_20

      Description

      Hi,
      I have a gradle script that delegates the production of an output artifact to some external code (actually the grails-gradle plugin), hence I know the path of the artifact, but it is not "declared" the usual gradle way (i.e. through an artifacts{} closure).
      I've also seen the build-info-extractor-gradle plugin detects the artifacts for the configuration of the buildInfo task.
      So my question is: How can I expose my artifact to the gradle-artifactory plugin?

      Following the threads

      I've tried with a task declared as follows:

      build.gradle
      ...
      task publishWar(
      //commented only to reduce the overall build time
      /*dependsOn: "grails-war"*/
      ) {
          configurations.add "buildInfo"
          configurations.buildInfo.addArtifact(new DefaultPublishArtifact("myWar", "war", "war", null, new Date(), file('target/myWar.war')))
      }
      ...
      

      but it always ends up with a new build in artifactory having no module records.
      Any idea? I would at least know if the problem could be in the artifact detection phase or somewhere else.

      Kind regards
      Davide

        Attachments

          Activity

            People

            • Assignee:
              cohen.tomer Tomer Cohen
              Reporter:
              davide.cavestro Davide Cavestro
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: