Grails 3 - How to Post to Artifactory

I have several Grails 3 projects. Most of them are plugins, and one is the main application, which depends on the plugins.

Can someone who successfully published the Grails 3 project in the Artifactory refactor tell how you did it? What gradle plugin are you using and what do you need to add to your build.gradle to make it work?

Regards Rob

+2
build.gradle gradle
source share
2 answers

I wrote an answer:

http://rvanderwerf.blogspot.com/2015/07/how-to-publish-grails-3-plugin.html

Basically, you need to cut anything in the POM without a version on it, since Grails / Boot managed these deps.

+1
source share

I just started working with grails 3, in particular version 3.2.8.

I found that placing the next entry at the end of build.gradle works where artifactory_user, artifactory_password, artifactory_snapshotUrl and artifactory_releaseUrl are defined in gradle.properties.

publishing { repositories { maven { credentials { username artifactory_user password artifactory_password } if (version.endsWith('SNAPSHOT')) { url artifactory_snapshotUrl } else { url artifactory_releaseUrl } } } } 

The gradle.properties file reads:

 grailsVersion=3.2.8 grailsWrapperVersion=1.0.0 gormVersion=6.0.9.RELEASE gradleWrapperVersion=3.4.1 app_version=0.0.1-SNAPSHOT artifactory_user=admin artifactory_password=password artifactory_contextUrl=http://myserver.myorg.org:8081/artifactory artifactory_snapshotUrl=http://myserver.myorg.org:8081/artifactory/libs-snapshot-local artifactory_releaseUrl=http://myserver.myorg.org:8081/artifactory/libs-release-local 
0
source share

All Articles