this question related this one. i'm having lot of trouble uploading .jar file this site. following documentation steps described here , here i've created build.gradle file:
// first, apply publishing plugin buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "com.gradle.publish:plugin-publish-plugin:0.9.1" } } apply plugin: "com.gradle.plugin-publish" // apply other plugins here, e.g. java plugin plugin written in java or // groovy plugin plugin written in groovy apply plugin: "java" // if plugin has external java dependencies, gradle attempt // downloaded them jcenter using plugins dsl // should use jcenter dependency resolution in own // project. repositories { jcenter() } dependencies { compile gradleapi() compile localgroovy() //not needed java plugins // other dependencies plugin requires compile filetree(dir: "/usr/local/bin", include: ["*.jar"]) compile filetree(dir: "/usr/lib/jvm/java-8-jdk/jre/lib/", include: ["*.jar"]) compile filetree(dir: "/home/kiara/applab/kiara/kiaragen/lib/", include: ["*.jar"]) } pluginbundle { // these settings set whole plugin bundle website = 'http://www.gradle.org/' vcsurl = 'https://github.com/gradle/gradle' // tags , description can set whole bundle here, can // set / overridden in config specific plugins description = 'kiaragen version 0.1.0' version = '0.1.0' // plugins block can contain multiple plugin entries. // // name each plugin block below (greetingsplugin, goodbyeplugin) // not affect plugin configuration, need unique // each plugin. // plugin config blocks can set id, displayname, version, description // , tags each plugin. // id , displayname mandatory. // if no version set, project version used. // if no tags or description set, tags or description // pluginbundle block used, must set in 1 of // 2 places. plugins { kiaragenplugin { id = 'org.fiware.kiara.generator.kiaragen' displayname = 'kiaragen 0.1.0' tags = ['kiaragen', 'idl', 'code', 'generator'] version = '0.1.0' } } } the project directory containing file contains .jar file:
$ ls build build.gradle build.gradle.bak kiaragen-0.1.0.jar kiaragen-0.2.0.jar meta-inf meta-inf/gradle-plugins/org.fiware.kiara.generator.kiaragen.properties contains name of main class:
manifest-version: 1.0 main-class: org.fiware.kiara.generator.kiaragen the .jar file need upload kiaragen-0.1.0.jar , dependencies located in:
/home/kiara/applab/kiara/kiaragen/lib/ running:
$ gradle publishpluginjar :publishpluginjar up-to-date build successful total time: 4.435 secs build faster, please consider using gradle daemon: http://gradle.org/docs/2.4/userguide/gradle_daemon.html running --info flag gives:
$ gradle publishpluginjar --info starting build settings evaluated using settings file '/master/settings.gradle'. projects loaded. root project using build file '/home/kiara/applab/kiara/uploadkiaragen/build.gradle'. included projects: [root project 'uploadkiaragen'] evaluating root project 'uploadkiaragen' using build file '/home/kiara/applab/kiara/uploadkiaragen/build.gradle'. projects evaluated. selected primary task 'publishpluginjar' project : tasks executed: [task ':publishpluginjar'] :publishpluginjar (thread[main,5,main]) started. :publishpluginjar skipping task ':publishpluginjar' up-to-date (took 0.086 secs). :publishpluginjar up-to-date :publishpluginjar (thread[main,5,main]) completed. took 0.148 secs. build successful total time: 4.792 secs stopped 0 compiler daemon(s). build faster, please consider using gradle daemon: http://gradle.org/docs/2.4/userguide/gradle_daemon.html the problem i'm not sure .jar file has been uploaded. loading different project makes use of shows it's not. reading documentation page:
some plugins require manual acceptance plugin portal maintainers, , not made available when published. case when have specified custom “group id” plugin artifact. plugin publishing plugin tell if plugin pending acceptance when publish. if plugin requires changes before can accepted, contacted via email address associated account. receive email when plugin accepted. how "plugin publishing plugin" tell me if plugin pending acceptance when publish?
it seems plugins.gradle.com meant plugins extend functionality of gradle itself.
Comments
Post a Comment