The error message is a bit misleading... If you change the repoUrl and snapshotRepoUrl options to point to your Nexus, you still need to provide a .jenkins-ci.org file in your home directory that contains your Nexus credentials. See https://wiki.jenkins-ci.org/display/JENKINS/Gradle+JPI+Plugin#GradleJPIPlugin-Releasing .
You can also set the configurePublishing option to false to provide your own Gradle publishing configuration. But that's an advanced topic. You need to have a look at the Gradle docs and the gradle-jpi-plugin sources. See https://docs.gradle.org/2.3/userguide/publishing_maven.html and https://github.com/jenkinsci/gradle-jpi-plugin/blob/0.12.1/src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPlugin.groovy#L274-336 for details. Daniel On Mon, Jul 13, 2015 at 6:44 PM, Ahasan Habib <[email protected]> wrote: > I am trying to deploy my plugin in nexus. I am using jpi plugin to build > using gradle. Bellow I have given gradle.properties file contents: > > apply plugin: 'org.jenkins-ci.jpi' > > group = '' > > version = '' > > description = "" > > sourceCompatibility = 1.8 > > targetCompatibility = 1.8 > > > > buildscript { > > repositories { > > mavenLocal() > > maven { > > url "https://nexus url to download dependencies" > > } > > } > > dependencies { > > classpath 'org.jenkins-ci.tools:gradle-jpi-plugin:0.12.1' > > } > > } > > > > > jenkinsPlugin { > > coreVersion = '1.609.1' // Version of Jenkins core this plugin depends on. > > fileExtension = 'hpi' > > // use the plugin class loader before the core class loader, defaults to > false > > pluginFirstClassLoader = true > > > // the output directory for the localizer task relative to the project > root, defaults to the value shown > > localizerOutputDir = "${project.buildDir}/generated-src/localizer" > > > > // plugin URL on GitHub, optional > > gitHubUrl = 'github url' > > > // URL used to deploy the plugin, defaults to the value shown > > repoUrl = 'url of nexus to deoploy' > > > // URL used to deploy snapshots of the plugin, defaults to the value shown > > snapshotRepoUrl = 'url of nexus to deploy snapshots' > > > // disable configuration of Maven Central, the local Maven cache and the > Jenkins Maven repository, defaults to true > > configureRepositories = true > > > // skip configuration of publications and repositories for the Maven > Publishing plugin, defaults to true > > configurePublishing = true > > } > > > dependencies { > > ...... > > } > > > > When I try to run gradle publish it gives me message : Trying to deploy to > Jenkins community repository but there's no credential file ......./. > jenkins-ci.org > > > How can I override the Jenkins community repository with my nexus > information, so that it will deploy to nexus. > > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/a4062583-1346-4eaf-a7a0-95725badccac%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/a4062583-1346-4eaf-a7a0-95725badccac%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAKqW32AQGUmRQPkquosiXPVzvcKZAtDXhRHuELyeJA9qTfEd0g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
