在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):sponiro/gradle-nar-plugin开源软件地址(OpenSource Url):https://github.com/sponiro/gradle-nar-plugin开源编程语言(OpenSource Language):Groovy 100.0%开源软件介绍(OpenSource Introduction):gradle-nar-pluginA gradle plugin to create nar files for Apache nifi. InstallationTo use the plugin, add the bintray repository to your script and add the plugin dependency: buildscript {
repositories {
mavenCentral()
maven {
url 'http://dl.bintray.com/sponiro/gradle-plugins'
}
}
dependencies {
classpath group: 'de.fanero.gradle.plugin.nar', name: 'gradle-nar-plugin', version: '0.4'
}
}
apply plugin: 'de.fanero.gradle.plugin.nar' UsageRun ConfigurationThis plugin depends on the JavaPlugin. If it does not exist it will add it to the build. Nar TaskThe plugin adds a new preconfigured task of type Nar named Nar ParentNar archives can have a parent nar. The parent is optional and there can be at maximum one parent. The parent relationship is added to the manifest. To tell the plugin to add a parent you have to add a nar dependency to the nar configuration. The nar configuration is created by the plugin. Add the parent nar like this: dependencies {
nar 'org.apache.nifi:nifi-standard-services-api-nar:0.2.1'
} If you add more than one dependency, it will complain and crash the build. ManifestThe manifest of a nar file contains properties to identify the nar file and a parent nar. This plugin configures the manifest generation to contain the values from the project name, group and version. The same goes for the nar parent. Default manifest values
Override manifest valuesThe plugin respects manifest overrides from the user. For example: nar {
manifest {
attributes 'Nar-Group': 'overriden-nar-group-value'
}
} A full description can be found at https://docs.gradle.org/current/userguide/java_plugin.html#sec:jar. ShortcomingsVersion 0.1 and 0.2 do not add the parent nar in the nar configuration to the dependencies. To fix this you can either use version 0.3 or add the following code to your build: configurations {
compileOnly.extendsFrom(configurations.nar)
} Service LocatorApache nifi uses the ServiceLocator to define processors. The Processor API
explains in detail how this works. Basically, you have to add a file in ContributionsVersion 0.4Thanks to Lars Winderling for making the plugin ready for Gradle 6. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论