问题
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
回答1:
I have found the solution in the Talend git repository, you can create the custom component by following the steps below
- setup the maven and java on your machine
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/
meanwhile you are command is running it will ask you few questions like name of the component and version etc.
once you have done with command, it will generate an input component template for you
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
now just find the POM.XML file of the component and run the command
mvn install
- This command will compile the source code and generate few jar file with different classifiers. jar and bundle
- during the compile process you can have errors, for now remove the test classes.
- once the source code is compiled, copy the bundle jar file to Talend root->plugins
- Restart the Talend Studio
- after restarting the Talend search your component in the palette
来源:https://stackoverflow.com/questions/43452212/custom-component-with-dynamic-configuration-like-jira-jdbc-or-azurestorage-in-t