0
votes

I generated jars from Talend,and I suppose to use them in a maven project.After some research I know that I have to install this jars in the local maven repository using: mvn install:install-file -Dfile=non-maven-proj.jar -DgroupId=some.group -DartifactId=non-maven-proj -Dversion=1 -Dpackaging=jar and then add a dependency:

    <dependency>
     <groupId>....</groupId>
     <artifactId>...</artifactId>
     <version>...</version>
    </dependency>

But I don't know what to put exactly in the groupId,artifactId and version tag. Help plz

3

3 Answers

2
votes

Go to the maven repository https://mvnrepository.com and search for your dependency. Click on the version number and it will show you the complete dependency tag for your talend. e.g

<!-- https://mvnrepository.com/artifact/org.talend.esb.job/org.talend.esb.job.api -->
<dependency>
<groupId>org.talend.esb.job</groupId>
<artifactId>org.talend.esb.job.api</artifactId>
<version>6.3.1</version>

0
votes

You should specify what is this "Talend"? Here is simple introduction to maven pom structure:maven pom doc

groupId: This is generally unique amongst an organization or a project.

artifactId: The artifactId is generally the name that the project is known by.

version: is last piece of specification which package to use.

You can find specification to mvn dependencies on maven repository page. Here is an example for Talend ESB jar (newest version):

<!-- https://mvnrepository.com/artifact/org.talend.esb.job/org.talend.esb.job.api -->
<dependency>
    <groupId>org.talend.esb.job</groupId>
    <artifactId>org.talend.esb.job.api</artifactId>
    <version>6.3.1</version>
</dependency>
0
votes

BTW if you are just using it locally , then you can install jar with any group Id,artifact Id and version you feel like. Just make sure you use the same in your dependencies in project POM. However this is not the recommended approach, but if you are not sure about the maven coordinates( group Id, artifact Id and version) you can use above given hack.