The 'artifactoryPublish' task can be (roughly) seen as a superset of
'uploadArchives':
(1) It can deploy artifacts to Artifactory, including ivy descriptors and
poms (specified by explicit file path, or by behind-the-scene dependency on
the default uploadArchives/install tasks)
(2) It can publish a
build-info<http://wiki.jfrog.org/confluence/display/RTF/Build+Integration>
json
metadata object that includes all traceable information about the build,
which is accesible from the UI and REST API (some views require Pro)
(3) It can define Artifactory as the first point from which artifacts should
be resolved
(4) Finally, Deployment via 'artifactoryPublish' is currently also more
optimized, especially for very big artifacts
So, with the Artifactory plugin you want to use the 'artifactoryPublish'
task for publishing. We will make the docs clearer about that.
Yoav
On Tue, Jun 7, 2011 at 6:47 PM, Andy Goodspeed <[email protected]>wrote:
> Hi Fred.
>
> I am running:
>
> gradle uploadArchives
>
> So my task here should be artifactoryPublish? That does indeed seem to give
> me the sort of response I am expecting (Failed to deploy file: HTTP response
> code: 401. HTTP response message: Unauthorized).
>
> I guess I am missing a semantic difference. What does uploadArchives do
> relative to artifactoryPublish?
>
> ...
> Upload tasks
> ------------
> uploadArchives - Uploads all artifacts belonging to configuration
> ':archives'.
> ...
> Other tasks
> -----------
> artifactoryPublish - Generates build info from build artifacts
> ...
>
> Thanks!
>
>
>
> *Frederic Simon <[email protected]>*
>
> 06/07/2011 11:13 AM
> Please respond to
> [email protected]
>
> To
> [email protected]
> cc
> Subject
> Re: [Artifactory-users] Artifactory plugin for Gradle
>
>
>
>
> Hi,
>
> What gradle command are you running?
> By default artifactoryPublish publishes the "archives" configuration and
> all artifacts attached to it.
> One reason for what you are experiencing maybe: No jar were build and added
> to the configuration, artifactoryPublish will find and empty configuration
> and will not publish anything.
> What is strange is that with the default java plugin, uploadArchives
> depends on the jar task which should compile and add the default jar to the
> archives configuration!
>
> To solve the above you can do the following:
> 1) Add another configurations that contains artifacts you want published:
> artifactory {
> defaults { publishConfigs( 'otherConfigName' ) }
> }
>
> 2) Force a dependency of the artifactoryPublish task to the task producing
> the artifacts:
> artifactoryPublish {
> dependsOn myTaskProducingArtifacts
> }
>
> 3) Alwsays run "gradle build artifactoryPublish" together.
>
> Hope this help,
> Fred.
>
> On Tue, Jun 7, 2011 at 2:39 PM, Andy Goodspeed
> <*[email protected]*<[email protected]>>
> wrote:
> Thanks for the information, Yoav. I do not get those messages when I add
> "defaults{publishPom = false}" to the publish closure and also the task
> "uploadArchives{uploadDescriptor = true}", but it does not seem to do
> anything else either.
>
> There still does not seem to be anything getting published, nor an
> authentication error as I would expect due to the credentials I am
> providing. It just ends with:
>
> ...
> :uploadArchives
>
> BUILD SUCCESSFUL
>
> What am I missing?
>
> *Yoav Landman <**[email protected]* <[email protected]>*>*
>
> 06/06/2011 06:36 PM
>
>
> Please respond to*
> **[email protected]*<[email protected]>
>
> To
> *[email protected]*<[email protected]>
> cc
> Subject
> Re: [Artifactory-users] Artifactory plugin for Gradle
>
>
>
>
>
>
> As the error indicates, the project is configured to publish ivy and pom
> files (true, by default), but none are configured.
>
> You can turn off ivy and pom publishing in the 'defaults' section of the
> plugin
> *DSL*<http://wiki.jfrog.org/confluence/display/RTF/Gradle+Artifactory+Plugin>(publishPom=false
> and publishIvy=false); configure the specific location for
> the ivy file and pom file (ivyDescriptor= and mavenDescriptor=); or, set up
> ivy/pom publishing.
>
> For example to configure ivy uploading for the upload task configuration
> ('archives' in this case), use:
>
> uploadArchives {
> uploadDescriptor = true
> }
>
> You didn't apply the 'maven' plugin, so I assume you wish pom publishing to
> be off.
>
> HTH,
> Yoav
>
> On Mon, Jun 6, 2011 at 10:09 PM, Andy Goodspeed
> <*[email protected]*<[email protected]>>
> wrote:
> I am trying to get my Gradle build to upload to Artifactory using the
> plugin. It doesn't seem to be working and I have no idea why.
>
> I gave up working on this with my live projects and am now working on a
> simple test project. It is a Java project with one class and one dependency
> (log4j). Everything works, including resolving the dependency and generating
> the jar, up to the upload. I have even tried using invalid credentials in
> hopes of eliciting an error of some sort.
>
> Below is my build.gradle. Why am I not getting gradletest.jar uploaded to
> lib-release-local in my Artifactory instance, an error, or something? Is it
> trying to give me a hint with:
>
> Cannot publish Ivy descriptor if ivyDescriptor not set in task
> ':artifactoryPublish'
> And task 'uploadArchives' does not export the Ivy descriptor.
> Cannot publish Maven descriptor if mavenDescriptor not set in task
> ':artifactoryPublish'
> And default install task for project ':' is not an Upload task
>
> Thanks.
>
> -Andrew Goodspeed
>
> "How *reliable* [is he]? How shallow is the ocean? How cold is the sun?"
> -Douglas Adams (Arthur Dent)
>
> --build.gradle--
>
> apply plugin: 'java'
> apply plugin: 'artifactory'
>
> // Project root name cannot be set here, so check that settings.gradle (or
> whatever) has it set properly
> assert name == 'gradletest'
>
> // "group" equates to "organisation"
> group = '*com.me* <http://com.me/>'
>
> artifactory {
> contextUrl =
> '*http://artifactory.me.com/artifactory*<http://artifactory.me.com/artifactory>
> '
>
> publish {
> repository {
> repoKey = 'libs-release-local'
> username = 'hacker'
> password = 'unauthorized'
> ivy {
> ivyLayout =
> '[organization]/[module]/[revision]/[type]s/ivy-[revision].xml'
> artifactLayout =
> '[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]'
> mavenCompatible = false
> }
> }
> }
>
> resolve {
> repository {
> repoKey = 'libs-release'
> }
> }
> }
>
> dependencies {
> compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.5.8'
> }
>
> sourceSets {
> main {
> java {
> srcDir 'src'
> }
> }
> }
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.*
> **http://p.sf.net/sfu/ephox-dev2dev* <http://p.sf.net/sfu/ephox-dev2dev>
> _______________________________________________
> Artifactory-users mailing list*
> **[email protected]*<[email protected]>
> *
> **https://lists.sourceforge.net/lists/listinfo/artifactory-users*<https://lists.sourceforge.net/lists/listinfo/artifactory-users>
>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.*
> **http://p.sf.net/sfu/ephox-dev2dev* <http://p.sf.net/sfu/ephox-dev2dev>
> _______________________________________________
> Artifactory-users mailing list*
> **[email protected]*<[email protected]>
> *
> **https://lists.sourceforge.net/lists/listinfo/artifactory-users*<https://lists.sourceforge.net/lists/listinfo/artifactory-users>
>
>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.*
> **http://p.sf.net/sfu/ephox-dev2dev* <http://p.sf.net/sfu/ephox-dev2dev>
> _______________________________________________
> Artifactory-users mailing list*
> **[email protected]*<[email protected]>
> *
> **https://lists.sourceforge.net/lists/listinfo/artifactory-users*<https://lists.sourceforge.net/lists/listinfo/artifactory-users>
>
>
>
>
> --
> Chief Architect
> JFrog Ltd*
> **http://www.jfrog.org/* <http://www.jfrog.org/>*
> **http://twitter.com/freddy33* <http://twitter.com/freddy33>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Artifactory-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>
>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Artifactory-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>
>
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users