I tried adding 'artifactory.publish.maven = false' to my gradle.properties
but the exception is the same.
On another note (maybe this should be a separate thread) is there a way to
set these artifactory properties from the build.gradle file? I ask because
I'm trying to create one common script to be applied across a large number
of projects in my organization. I'm using something like:
apply {
apply from: 'http://artifactory.blah/artifactory/repo/build/common.gradle
'
}
It works well since I can just maintain the common script in artifactory and
reduce duplicating any code throughout subprojects. However, I can't figure
out how to set properties like
artifactory.publish.repoKey = libs-snapshots-local
without using a gradle.properties file. I tried looking at the projectAPI,
used the setProperty method but it didn't work. Any suggestions?
Thanks,
Kallin Nagelberg
On Fri, Oct 15, 2010 at 12:53 PM, Tomer Cohen <[email protected]> wrote:
> Hi Kalin,
>
> Can you try to set the following property in your gradle.properties:
>
> artifactory.publish.maven=false
>
> This will indicate if the exception is only for Gradle generating a pom.xml
> for your project.
>
> Thanks,
> Tomer
>
> On Fri, Oct 15, 2010 at 5:45 PM, Kallin Nagelberg <
> [email protected]> wrote:
>
>> Sorry for the wrong reply, here's my version info:
>>
>> C:\dev\gradle_test>gradle -version
>>
>> ------------------------------------------------------------
>> Gradle 0.9-rc-1
>> ------------------------------------------------------------
>>
>> Gradle buildtime: Wednesday, 4 August 2010 8:04:33 AM EST
>> Groovy: 1.7.3
>> Ant: Apache Ant version 1.8.1 compiled on April 30 2010
>> Ivy: 2.2.0-rc1
>> Java: 1.6.0_12
>> JVM: 11.2-b01
>> JVM Vendor: Sun Microsystems Inc.
>> OS Name: Windows XP
>>
>> On Sat, Oct 9, 2010 at 6:12 AM, Tomer Cohen <[email protected]> wrote:
>>
>>> Hi Kallin,
>>>
>>> It looks like this occurs when Gradle is trying to create a POM for your
>>> artifact.
>>>
>>> What version of Gradle are you using?
>>>
>>> Thanks,
>>>
>>> Tomer
>>>
>>>
>>> On 10/08/2010 10:19 PM, Kallin Nagelberg wrote:
>>>
>>> I've set the login/password and am getting an exception in the
>>> DefaultMavenPomFactory,
>>>
>>> * Exception is:
>>> org.gradle.api.tasks.LocationAwareTaskExecutionException: Build file
>>> 'C:\dev\gradle_test\build.gradle'
>>> Execution failed for task ':uploadArchives'.
>>> at
>>> org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:63)
>>> at
>>> org.gradle.api.internal.tasks.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:41)
>>> at
>>> org.gradle.api.internal.project.taskfactory.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:32)
>>> at
>>> org.gradle.api.internal.project.taskfactory.ExecutionShortCircuitTaskExecuter.execute(ExecutionShortCircuitTaskExecuter.java:50)
>>> at
>>> org.gradle.api.internal.tasks.SkipTaskExecuter.doExecute(SkipTaskExecuter.java:57)
>>> at
>>> org.gradle.api.internal.tasks.SkipTaskExecuter.execute(SkipTaskExecuter.java:35)
>>> at
>>> org.gradle.api.internal.tasks.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:32)
>>> at
>>> org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:231)
>>> at
>>> org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167)
>>> at
>>> org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160)
>>> at
>>> org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78)
>>> at
>>> org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:161)
>>> at
>>> org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
>>> at
>>> org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:153)
>>> at
>>> org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:107)
>>> at
>>> org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:75)
>>> at org.gradle.launcher.Main.execute(Main.java:93)
>>> at org.gradle.launcher.Main.main(Main.java:42)
>>> at org.gradle.launcher.GradleMain.main(GradleMain.java:49)
>>> Caused by: org.gradle.api.GradleException: Could not publish
>>> configurations [configuration ':archives'].
>>> at
>>> org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService.publish(ErrorHandlingIvyService.java:44)
>>> at
>>> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.publish(DefaultConfiguration.java:211)
>>> at org.gradle.api.tasks.Upload.upload(Upload.java:57)
>>> at
>>> org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:158)
>>> at
>>> org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
>>> at org.gradle.api.tasks.Upload_Decorated.invokeMethod(Unknown
>>> Source)
>>> at
>>> org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
>>> at
>>> org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:131)
>>> at
>>> org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:129)
>>> at
>>> org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:55)
>>> ... 18 common frames omitted
>>> Caused by: java.lang.NullPointerException: null
>>> at
>>> org.gradle.api.internal.artifacts.publish.maven.DefaultMavenPomFactory.createMavenPom(DefaultMavenPomFactory.java:44)
>>> at
>>> org.gradle.api.internal.artifacts.publish.maven.deploy.BasePomFilterContainer.getDefaultPomFilter(BasePomFilterContainer.java:97)
>>> at
>>> org.gradle.api.internal.artifacts.publish.maven.deploy.BasePomFilterContainer.getActivePomFilters(BasePomFilterContainer.java:83)
>>> at
>>> org.gradle.api.internal.artifacts.publish.maven.deploy.DefaultArtifactPomContainer.addArtifact(DefaultArtifactPomContainer.java:49)
>>> at
>>> org.gradle.api.internal.artifacts.publish.maven.deploy.AbstractMavenResolver.publish(AbstractMavenResolver.java:154)
>>> at
>>> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:281)
>>> at
>>> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:260)
>>> at
>>> org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher.publish(DefaultIvyDependencyPublisher.java:54)
>>> at
>>> org.gradle.api.internal.artifacts.ivyservice.DefaultIvyService.publish(DefaultIvyService.java:144)
>>> at
>>> org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsIvyService.publish(ShortcircuitEmptyConfigsIvyService.java:61)
>>> at
>>> org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService.publish(ErrorHandlingIvyService.java:42)
>>> ... 27 common frames omitted
>>> 16:08:03.339 [main] ERROR org.gradle.launcher.Main -
>>> BUILD FAILED
>>>
>>> 16:08:03.339 [main] INFO org.gradle.launcher.Main - Total time: 9.35
>>> secs
>>> 16:08:03.355 [main] INFO o.g.logging.ProgressLoggingBridge -
>>>
>>>
>>> I now have 4 properties in gradle.properties like:
>>>
>>> artifactory.publish.repoKey = libs-snapshots-local
>>> artifactory.contextUrl = http://myhost/artifactory
>>> artifactory.publish.username = myuser
>>> artifactory.publish.password = mypassword
>>>
>>>
>>> Any ideas?
>>> Thanks,
>>> - Kallin Nagelberg
>>>
>>>
>>>
>>> On Fri, Oct 8, 2010 at 10:15 AM, Tomer Cohen <[email protected]> wrote:
>>>
>>>> Hi Kallin,
>>>>
>>>> The exception you got usually indicates that Gradle was unable to upload
>>>> the archives due invalid credentials.
>>>> Please add the following 2 properties to your gradle.properties.
>>>>
>>>> artifactory.publish.username= "your username"
>>>> artifactory.publish.password= "your password"
>>>>
>>>> If there is still a problem, please run Gradle with the -d switch. This
>>>> should give a more verbose log, and will allow us to analyze the problem.
>>>>
>>>> HTH
>>>>
>>>> Tomer
>>>>
>>>>
>>>> On 10/08/2010 04:08 PM, Kallin Nagelberg wrote:
>>>>
>>>> Thanks Tomer,
>>>>
>>>> I have read through that documentation many times for clues. I had
>>>> imagined that all properties were optional, and that the plugin would use
>>>> the artifactory defaults for choosing 'libs-releases-local', etc. I added a
>>>> couple properties to the gradle.properties file and got some activity:
>>>>
>>>> artifactory.publish.repoKey = libs-releases-local
>>>> artifactory.contextUrl = http://myhost/artifactory
>>>>
>>>> but it just produces a low-level exception now:
>>>>
>>>> C:\dev\gradle_test>gradle uploadArchives
>>>> :compileJava UP-TO-DATE
>>>> :processResources UP-TO-DATE
>>>> :classes UP-TO-DATE
>>>> :jar UP-TO-DATE
>>>> :uploadArchives
>>>> Download
>>>> http://myhost/artifactory/libs-releases-local;buildInfo.build.number=1286546640477;buildInfo.build.name=gradle_test/com/gradle_test/0.1-SNAPSHOT/gradle_test-0.1-SNAPSHOT.jar
>>>>
>>>> FAILURE: Build failed with an exception.
>>>>
>>>> * Where:
>>>> Build file 'C:\dev\gradle_test\build.gradle'
>>>>
>>>> * What went wrong:
>>>> Execution failed for task ':uploadArchives'.
>>>> Cause: Could not publish configurations [configuration ':archives'].
>>>>
>>>> * Try:
>>>> Run with -s or -d option to get more details. Run with -S option to get
>>>> the full (very verbose) stacktrace.
>>>>
>>>> BUILD FAILED
>>>>
>>>> Total time: 9.73 secs
>>>> java.util.NoSuchElementException
>>>> at java.util.LinkedList.remove(LinkedList.java:788)
>>>> at java.util.LinkedList.removeFirst(LinkedList.java:134)
>>>> at
>>>> org.gradle.logging.AbstractProgressLoggingAwareFormatter.format(AbstractProgressLoggingAwareFormatter.java:56)
>>>> at
>>>> org.gradle.logging.Slf4jLoggingConfigurer$LoggingDestination$1.format(Slf4jLoggingConfigurer.java:191)
>>>> at
>>>> org.gradle.logging.Slf4jLoggingConfigurer$Appender.append(Slf4jLoggingConfigurer.java:237)
>>>> at
>>>> org.gradle.logging.Slf4jLoggingConfigurer$Appender.append(Slf4jLoggingConfigurer.java:227)
>>>> at
>>>> ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:85)
>>>> at
>>>> ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:64)
>>>>
>>>> Maybe I'm missing something trivial? It would be nice to have a simple
>>>> example of all that is required in that documentation.
>>>>
>>>> Thanks,
>>>> -Kallin Nagelberg
>>>>
>>>>
>>>> On Thu, Oct 7, 2010 at 5:06 PM, Tomer Cohen <[email protected]> wrote:
>>>>
>>>>>
>>>>> Hi Kallin
>>>>>
>>>>> The plugin defines a new task called buildInfo which executes the
>>>>> uploadArchives to the repository that is defined in gradle.properties
>>>>>
>>>>> please see
>>>>> http://wiki.jfrog.org/confluence/display/RTD/Gradle+Artifactory+Plugin
>>>>> for all relevant properties you can configure for the plugin.
>>>>>
>>>>> HTH
>>>>>
>>>>> Tomer
>>>>> --
>>>>> View this message in context:
>>>>> http://forums.jfrog.org/artifactory-gradle-plugin-example-tp5612937p5613007.html
>>>>> Sent from the Artifactory - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Beautiful is writing same markup. Internet Explorer 9 supports
>>>>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
>>>>> Spend less time writing and rewriting code and more time creating
>>>>> great
>>>>> experiences on the web. Be a part of the beta today.
>>>>> http://p.sf.net/sfu/beautyoftheweb
>>>>> _______________________________________________
>>>>> Artifactory-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Beautiful is writing same markup. Internet Explorer 9 supports
>>>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
>>>> Spend less time writing and rewriting code and more time creating great
>>>> experiences on the web. Be a part of the beta
>>>> today.http://p.sf.net/sfu/beautyoftheweb
>>>>
>>>>
>>>> _______________________________________________
>>>> Artifactory-users mailing
>>>> [email protected]https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Beautiful is writing same markup. Internet Explorer 9 supports
>>>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
>>>> Spend less time writing and rewriting code and more time creating great
>>>> experiences on the web. Be a part of the beta today.
>>>> http://p.sf.net/sfu/beautyoftheweb
>>>> _______________________________________________
>>>> Artifactory-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Beautiful is writing same markup. Internet Explorer 9 supports
>>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
>>> Spend less time writing and rewriting code and more time creating great
>>> experiences on the web. Be a part of the beta
>>> today.http://p.sf.net/sfu/beautyoftheweb
>>>
>>>
>>> _______________________________________________
>>> Artifactory-users mailing
>>> [email protected]https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Beautiful is writing same markup. Internet Explorer 9 supports
>>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
>>> Spend less time writing and rewriting code and more time creating great
>>> experiences on the web. Be a part of the beta today.
>>> http://p.sf.net/sfu/beautyoftheweb
>>> _______________________________________________
>>> Artifactory-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download new Adobe(R) Flash(R) Builder(TM) 4
>> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
>> Flex(R) Builder(TM)) enable the development of rich applications that run
>> across multiple browsers and platforms. Download your free trials today!
>> http://p.sf.net/sfu/adobe-dev2dev
>>
>> _______________________________________________
>> Artifactory-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> Artifactory-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>
>
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users