Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
michad
Contributor II
Contributor II

Talend Open Studio 7.x, Git and external build

Hello all,

 

Ok since version 7 of Talend Open Studio, it is more difficult to maintain a Talend project into git repository. But I don't give up! For an important project in my company, we used the TOS 6 version maintained in a git repository. It was tedious but with a bit of rigor, it was ok and we managed to complete the project.

 

So I give it a shot with version 7. Since Talend dragged the Java sources directly into the project, I've been looking to drag them into the Git repository. And I wondered if it was possible to use Maven to compile the job out of the studio.

 

And it works!

 

You can consult the git repository here: https://gitlab.com/michad/tos-esb-7-framework

 

I use Talend Open Studio ESB 7.3.1 for my test. The studio is available at https://sourceforge.net/projects/talendesb/files/Talend%20Open%20Studio%20for%20ESB/7.3.1/

 

Instruction to test the external compilation, assuming that:

  • the studio is in the folder C:\talend\studio
  • the workspace is in the folder C:\talend\workspace

 

  1. cd C:\talend\workspace
  2. git clone https://gitlab.com/michad/tos-esb-7-framework framework
  3. cd .\FRAMEWORK
  4. mvn -f .\poms\pom.xml -am -pl jobs/process/Lab/checkifyoucancompilme_0.1 clean package --settings "C:\talend\studio\configuration\maven_user_settings.xml"

 

Now, a zip archive of the job must be present into C:\talend\workspace\FRAMEWORK\poms\jobs\process\Lab\checkifyoucancompilme_0.1\target\checkifyoucancompilme_0_1.zip 🙂

 

To be able to execute the Maven command, it was necessary to modify the default POM of the standalone jobs in the properties of the project (it is necessary to remove the use of the plugin org.talend.ci:signer-maven-plugin...). This modification is present in the git repository.

 

Then to check that the project is not broken by opening it in the studio :

 

  1. Execute C:\talend\studio\TOS_ESB-win-x86_64.exe
  2. Click on the Manager Connection button and fill in the workspace folder C:\talend\workspace then OK
  3. Reload the studio
  4. When the studio is reloaded and prompts you to create a project, create an empty project named FRAMEWORK then OK
  5. Once the project is loaded, try opening the job to see if everything is OK. Don't hesitate to run the command "git status" to see if any files have been modified after loading the project.

 

The ignored files are present in .gitignore. I let you consult its contents.

 

These are my first attempts so I'm still expecting surprises. But it's promising! And it leaves the way open for the CI/CD to do the open studio version of Talend. 😉

Labels (2)
4 Replies
michad
Contributor II
Contributor II
Author

Ok I see that some dependencies only appear if you run the job at least once or if you generate the code (via the code tab) in the Talend studio.

 

So I suggest you to do it in reverse order. Start by opening the studio and loading the project, then run the job at least once in the studio. Then try to compile the job by running the mvn command.

 

I just did the test and it's OK. Obviously when using the Big Data studio, there are some changes in the Java code, but that's normal and that's even what we want.

kiran_talend
Contributor
Contributor

It got solved by adding talend_file_enhanced_20070724 jar in .m2 repository, btw thank you very much for the quick response...

Anonymous
Not applicable

@Michael Duflot​, nice post! Thanks for your great contribution to community.

 

Regards

Shong

kiran_talend
Contributor
Contributor

@Michael Duflot​  - How to make the build with specific Context group like - Dev, QA, PROD

 

Is there any parameter we need to add in above maven command?

 

Thanks,

Kiran