Uploading SWC to Maven Repo
Hi,
How do I go about uploading the resulting swc of the build task to a Maven repository?
If I apply plugin: 'maven' I get the following error:
A problem occurred evaluating root project 'client'.
Cause: Cannot add a configuration with name 'default' as a
configuration with that name already exists.
Thanks,
Ernesto
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Yennick Trevels on 15 Nov, 2011 10:37 PM
mmm, looks like we're already using that configuration name in GradleFx, so that's probably the cause of this conflict. I'll try to find a solution for this (probably during the weekend).
2 Posted by Ernesto Morales... on 16 Nov, 2011 05:50 PM
Yennick,
Thanks -- sounds good.
Ernesto
Support Staff 3 Posted by Yennick Trevels on 20 Nov, 2011 05:51 PM
It's more complicated then I thought it would be. Apparently the maven plugin makes use of the java plugin and that's why it pulls in those configurations and tasks, so I'm afraid those two are somewhat bound to each other. I've opened a topic on the Gradle forum to ask if there's a solution for this: http://forums.gradle.org/gradle/topics/maven_plugin_imports_java_pl...
4 Posted by Ernesto Morales... on 21 Nov, 2011 08:12 PM
Hi Yennick,
Thanks for the update. From the forum link, looks like you've found a solution. Please keep me posted.
Regards,
Ernesto
Support Staff 5 Posted by Yennick Trevels on 21 Nov, 2011 08:30 PM
Well, only for part of the problem :)
I got the problem fixed that you encountered with the duplicate 'default' configuration, but when applying the maven plugin it doesn't add the install task because the maven plugin only configures the install task when the java plugin is present.
So hopefully they can come up with a solution.
Support Staff 6 Posted by Yennick Trevels on 26 Nov, 2011 01:33 PM
I've opened an improvement request on the Gradle bugtracker: http://issues.gradle.org/browse/GRADLE-1963
I'm 99% sure this is something they need to fix in the Gradle plugin, because it shouldn't depend on the java plugin to add the install task.
I've put everything in place so that GradleFx should be compatible with the Maven plugin once they fix the issue, so these changes will be in the next GradleFx release (probably in one of the following days).
Support Staff 7 Posted by Maxime Cowez on 05 Mar, 2012 10:09 AM
Hi Yennick,
It seems your improvement request isn't getting the love it deserves (though I registered especially to vote for it). Can you think of a workaround? This is close to a blocking issue for me :(
I'm currently working around it by using a 'flatDir' repository, but that requires a local path. I'd much rather upload to the local maven cache.
Support Staff 8 Posted by Yennick Trevels on 05 Mar, 2012 10:22 AM
Maybe I'll have to implement the install task myself or fix that change request myself. In the meantime, can you try the following:
I think this should do somewhat the same thing. Then you can install them to your local repository with "gradle uploadArchives". Hope this works :)
Support Staff 9 Posted by Maxime Cowez on 05 Mar, 2012 11:03 AM
Success!!
Definitly a better workaround.
Thanks a lot for your quick reply.
Yennick Trevels closed this discussion on 11 Jun, 2012 06:36 AM.