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 <agoodsp...@cfglife.com>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 <yo...@jfrog.org>*
>
> 06/06/2011 06:36 PM
> Please respond to
> artifactory-users@lists.sourceforge.net
>
> To
> artifactory-users@lists.sourceforge.net
> 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
> <*agoodsp...@cfglife.com*<agoodsp...@cfglife.com>>
> 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*
> **Artifactory-users@lists.sourceforge.net*<Artifactory-users@lists.sourceforge.net>
> *
> **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
> _______________________________________________
> Artifactory-users mailing list
> Artifactory-users@lists.sourceforge.net
> 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
> Artifactory-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>
>
--
Chief Architect
JFrog Ltd
http://www.jfrog.org/
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
Artifactory-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/artifactory-users