https://github.com/kakwa/talend-codegen
Command line code generation (job export) plugin for talend
https://github.com/kakwa/talend-codegen
crap java talend
Last synced: 10 months ago
JSON representation
Command line code generation (job export) plugin for talend
- Host: GitHub
- URL: https://github.com/kakwa/talend-codegen
- Owner: kakwa
- Created: 2013-10-12T09:00:53.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-28T10:48:53.000Z (over 10 years ago)
- Last Synced: 2025-04-05T05:51:11.243Z (about 1 year ago)
- Topics: crap, java, talend
- Language: Java
- Size: 44.2 MB
- Stars: 5
- Watchers: 2
- Forks: 36
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
talend-codegen
==============
Command line code generation (job build/export) plugin for talend
Compiling & Configuring
-----------------------
Build:
```bash
#to build the latest version available
> make
#ls in the out directory
>ls jar/talend-codegen_5.6.0.jar
#build an older version
>make build_jar_5.4.1
#build directly with ant:
> cat Makefile
build_jar_5.6.0:
ant build -Dtalend_version=5.6.0 -Dtalend_revision=20141024_1545
clean_5.6.0:
ant clean -Dtalend_version=5.6.0 -Dtalend_revision=20141024_1545
#select your version
> ant build -Dtalend_version=5.5.1 -Dtalend_revision=r118616
```
And copy `jar/talend-codegen.jar` to the plugins directory of Talend.
Usage with talend-codegen helper
--------------------------------
This project is shipped with an helper script available in **./bin/talend-codegen**.
This script must be modify to reflect your Talend installation (TALEND_DIR and TALEND_BIN at the beginning of the script)
Generation:
```bash
# create out directory
$ mkdir -p './out'
# With all '-need' options enabled
$ talend-codegen -p './MyProjectDir/' -o './out/' -j './MyJobName' -a
# With custom options
$ talend-codegen -p './MyProjectDir/' -o './out/' -j 'MyJobName' -O '-needLauncher=true -needContext=true'
```
help:
```
# help
$ talend-codegen -h
usage: talend-codegen -p -o -j \
[-a] [-O ] [-T ] [-c ]
Build Talend project from command line
examples:
* talend-codegen -p ./MyProjectDir/ -o out/ -j MyJobName -a
* talend-codegen -p ./MyProjectDir/ -o out/ -j MyJobName -O '-needLauncher=true -needDependencies=true'
arguments:
-p : directory containing the talend project
-j : job to export
-o : output directory
optional arguments:
-a: enable all -need* options
-O : custom options (cannot be used with -a)
-T : talend install directory (default: /home/pcarpent/TOS_DI-r95165-V5.2.1)
-c : location of any custom components used in the job
codegen options (for -O):
* -version - version of job to be exported
* -needLauncher - include launcher script (true/false)
* -needSystemRoutine - include system outines (true/false)
* -needUserRoutine - and so on..
* -needTalendLibraries
* -needJobItem
* -needSourceCode
* -needDependencies
* -needJobScript
* -needContext
* -applyToChildren
```
Usage invoking TOS directly
---------------------------
Invoke talend with the following mandatory command line arguments:
* -projectDir - the project directory where the project can be found
* -jobName - name of the job to be exported
* -targetDir - the directory where the exported job will be placed
Eclipse application arguments
* -application au.org.emii.talend.codegen.Generator - run the code generation plugin
* -nosplash stops the display of the gui splash window
* --launcher.suppressErrors stops errors being displayed in message boxes - output to stderr instead
* -data specifies the talend workspace used for building the project - created automatically if it doesn't exist (recommended to ensure a clean build)
* --clean_component_cache tells TOS to reload external components and rebuild the cache
Some optional command line arguments you can have:
* -version - version of job to be exported
* -componentDir - location of any custom components used in the job
* -needLauncher - include launcher script (true/false)
* -needSystemRoutine - include system outines (true/false)
* -needUserRoutine - and so on..
* -needTalendLibraries
* -needJobItem
* -needSourceCode
* -needDependencies
* -needJobScript
* -needContext
* -applyToChildren
Example:
```bash
export JOBNAME=MyJob
export WORKSPACE=/home/projectname/workspace
export PROJECTDIR=/home/projectname/workspace/MYPROJECT
export TARGETDIR=/home/projectname/workspace/.talend-build
export COMPONENTDIR=/home/projectname/custom_components
cp $PROJECTDIR/libs/* /home/TOS_DI-r118616-V5.5.1/lib/java/
/home/TOS_DI-20141024_1545-V5.6.0/TOS_DI-linux-gtk-x86_64 \
-nosplash --launcher.suppressErrors -data $WORKSPACE \
-application au.org.emii.talend.codegen.Generator \
-jobName $JOBNAME -projectDir $PROJECTDIR \
-targetDir $TARGETDIR -componentDir $COMPONENTDIR
```