Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user-defined tokens in ivyLayout pattern. #57

Merged
merged 1 commit into from
Sep 24, 2015
Merged

Allow user-defined tokens in ivyLayout pattern. #57

merged 1 commit into from
Sep 24, 2015

Conversation

lourot
Copy link
Contributor

@lourot lourot commented Sep 22, 2015

This PR adds the possibility to use user-defined ivy tokens in the path where ivy.xml will be pushed to Artifactory. The DSL looks like

artifactory {
    publish {
        repository {
            ivy {
                ivyLayout = "[organization]/[module]/[myGreatToken]/[revision]/ivy-[revision].xml"
            }
        }
    }
}

// ...

publishing.publications.create("Ivy_myGreatPublication", IvyPublication) {
    organisation = "com.tomtom"
    descriptor.extraInfo("dummy", "myGreatToken", "myGreatValue")
}

dummy is a so-called "namespace", that isn't taken into account when resolving the layout. The DSL forces us to provide one though, see https://docs.gradle.org/2.7/javadoc/org/gradle/api/publish/ivy/IvyModuleDescriptorSpec.html .

As a side effect, the produced ivy.xml contains:

  <info organisation="com.tomtom" module="myGreatModule" revision="1.0.2-SNAPSHOT" status="snapshot" publication="20150921173700">
    <ns:myGreatToken xmlns:ns="dummy">myGreatValue</ns:myGreatToken>
  </info>

A TomTom-internal review has already been performed by @maikelvdh and @ffung, see https://github.com/AurelienLourot/build-info/pull/1 .
@martinm82, you might also be interested.

eyalbe4 added a commit that referenced this pull request Sep 24, 2015
…ternal

Allow user-defined tokens in ivyLayout pattern.
@eyalbe4 eyalbe4 merged commit 688b2e9 into jfrog:master Sep 24, 2015
@lourot
Copy link
Contributor Author

lourot commented Sep 24, 2015

Thanks for merging!

@lourot lourot deleted the user-defined-ivy-tokens_external branch September 24, 2015 15:17
@eyalbe4
Copy link
Contributor

eyalbe4 commented Sep 24, 2015

Sure this @AurelienLourot .
Thanks a lot for this great contribution.
This Jira issue! tracks this code merge,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants