具有动态配置的自定义组件,如jira,jdbc或azurestorage [英] Custom component with dynamic configuration like jira, jdbc or azurestorage in talend

查看:362
本文介绍了具有动态配置的自定义组件,如jira,jdbc或azurestorage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用动态配置创建一个Talend组件。我试过各种来源来实现,但没有运气,
apprach我以前尝试过,但是我无法将组件与插件相链接,它总是给出错误


失败加载组件


那么我正在尝试创建像azure存储这样的插件,我从 talend组件与动态配置
我开发了新的组件,如天蓝色存储,并试图在


$ b中注册$ b


C:\Users\sandy\Documents\talend\TOS_BD-20161216_1026-V6.3.1\features\org.talend.tos.components.feature_6。 3.1.20161216_1026 / feature.xml
添加




 < plugin 
id =rg.talend.components.mycomp
download-size =0
install-size =0
version =0.14.0
unpack =false/>

然后创建一个组件并安装到Talend。就像其他组件,Jira,azure和JDBC一样,但没有运气,没有显示我在代码中设置的任何东西。
如果任何人有任何想法如何实现

解决方案

我已经找到了Talend git仓库中的解决方案,
您可以按照以下步骤创建自定义组件


  1. 在机器上设置maven和java

  2. 转到您的工作区并运行以下命令

      mvn org.apache.maven.plugins: maven-archetype-plugin:2.4:generate -DarchetypeGroupId = org.talend.components -DarchetypeArtifactId = input-component-archetypes -DarchetypeVersion = 0.20.0-SNAPSHOT -DarchetypeRepository = https://artifacts-oss.talend.com/nexus/内容/存储库/ TalendOpenSourceRelease / 


  3. 同时你正在命令运行它会问你几个问题像组件和版本的名称等一样。


  4. 一旦完成命令,它将为您生成一个输入组件模板


  5. 在命令中有 Darch etypeVersion 版本,如果您需要不同的版本,您可以更改

      -DarchetypeVersion = 0.20.0-SNAPSHOT 

    在我的情况下,我使用

      -DarchetypeVersion = 0.16.0-SNAPSHOT 


  6. 现在只要找组件的POM.XML文件并运行命令

      mvn install 
    / pre>

  7. 此命令将编译源代码,并生成不同分类器的几个jar文件。 jar和bundle

  8. 在编译过程中你可能有错误,现在删除测试类。

  9. 一旦编译源代码,复制捆绑jar文件到Talend root-> plugins

  10. 重新启动Talend在调色板中搜索您的组件后重新启动Talend Studio



I want to create a Talend component with dynamic configuration. I tried various sources to achieve that but no luck, apprach I tried previously but I could not able to link the component with plug-in, it always gives the error

failed to load component

then I am trying to create plugins like azure storage I cloned the repo from talend components with dynamic configuraion I developed the new component like azure storage and tried to register in

C:\Users\sandy\Documents\talend\TOS_BD-20161216_1026-V6.3.1\features\org.talend.tos.components.feature_6.3.1.20161216_1026/feature.xml by adding

 <plugin
          id="rg.talend.components.mycomp"
          download-size="0"
          install-size="0"
          version="0.14.0"
          unpack="false"/>

then create a component and installed to Talend. just like other components, Jira, azure, and JDBC, but no luck it didn't show anything that I setup in the code. if anyone has any idea how I can achieve

解决方案

I have found the solution in the Talend git repository, you can create the custom component by following the steps below

  1. setup the maven and java on your machine
  2. go to your workspace and run the following command

    mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.talend.components -DarchetypeArtifactId=input-component-archetypes -DarchetypeVersion=0.20.0-SNAPSHOT  -DarchetypeRepository=https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/
    

  3. meanwhile you are command is running it will ask you few questions like name of the component and version etc.

  4. once you have done with command, it will generate an input component template for you

  5. in the command there is DarchetypeVersion version you can change if you need the different version

     -DarchetypeVersion=0.20.0-SNAPSHOT 
    

    in my case I am using the

     -DarchetypeVersion=0.16.0-SNAPSHOT 
    

  6. now just find the POM.XML file of the component and run the command

      mvn install
    

  7. This command will compile the source code and generate few jar file with different classifiers. jar and bundle
  8. during the compile process you can have errors, for now remove the test classes.
  9. once the source code is compiled, copy the bundle jar file to Talend root->plugins
  10. Restart the Talend Studio
  11. after restarting the Talend search your component in the palette

这篇关于具有动态配置的自定义组件,如jira,jdbc或azurestorage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆