Five Stars

Issue while installing the component is ask for the <file-input-0.1.0>.jar and I have used the file-input-0.1.0-bundle.jar to install the component

I am developing the Talend component by using the command given on the Talend Component Wiki

 

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

 

this command generates all the required files to develop the Talend component. without modifying any of the files I build the jar files

using the

mvn clean install

but in that case got the error

 

Tests in error:
  OsgiFileInputTestIT.org.talend.components.fileinput.OsgiFileInputTestIT » TestContainer


Tests run: 4, Failures: 0, Errors: 1, Skipped: 0

[INFO]
[INFO] --- maven-failsafe-plugin:2.18:verify (default) @ file-input ---
[INFO] Failsafe report directory: C:\Users\sunil.soni\Desktop\MultiJarIssue\file-input\target\failsafe-reports
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:31 min
[INFO] Finished at: 2017-05-26T17:17:31+05:30
[INFO] Final Memory: 52M/277M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18:verify (default) on project file-input: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\sunil.soni\Desktop\MultiJarIssue\file-input\target\failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

 

 

then I use the other command

mvn package

 

It works and I got few jar files. 

  1. file-input-0.1.0.jar
  2. file-input-0.1.0-bundle.jar
  3. file-input-0.1.0-javadoc.jar
  4. file-input-0.1.0-sources.jar

the I used the file-input-0.1.0-bundle.jar to install the component by copying the file to TOS Directory/Plugins and started the Talend Studio. 

the component is registered is successfully and visible in the palette 

I can edit the configuration of the component

but when I try to connect the component with other component is ask for the jar file  file-input-0.1.0.jar to run the job.

if I don't provide the jar the job won't run and gives the error

org.talend.components not found

If I install the jar then job runs successfully. 

but I don't want to install the jar because all the files in the file-input-0.1.0.jar  are already included in the bundle jar.

and this issue occurs without modifying anything.

I tried to check OSGi info and pom file but don't find anything. don't know what is wrong in the files.

 

any suggestion?

 

 

 

  • Data Integration
  • Exchange components
3 REPLIES
Community Manager

Re: Issue while installing the component is ask for the <file-input-0.1.0>.jar and I have used the file-input-0.1.0-bundle.jar to install the component

Hi
I have forwarded your issue to our technical developers who commit changes to this Talend component wiki project, hope that they will provide some suggestion and help you!
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Employee

Re: Issue while installing the component is ask for the <file-input-0.1.0>.jar and I have used the file-input-0.1.0-bundle.jar to install the component

Hello,

first I suppose you have already changed somthing to the pom to get the testing error cause the archetype does not even compile because the nexus server used for the depenecies have be replaced by another one and therefore the url have changed.

So you probable have changed the pom <repository/> section with this

	<repositories>
                <repository>
                        <id>talend_nexus</id>
                        <name>snapshots</name>
                        <url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
                </repository>
                <repository>
                        <id>releases</id>
                        <url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
                </repository>
  </repositories>

which is fine.

in order to make the test pass you also have to update the pom, again because of the nexus server url change.

please add in the <plugins/> section this.

		<plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.18</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
            <configuration>
              <systemProperties>
                <org.ops4j.pax.url.mvn.repositories>+https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceSnapshot@snapshots@noreleases@id=talend_nexus,https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease@id=talrelease</org.ops4j.pax.url.mvn.repositories>
              </systemProperties>
            </configuration>
          </execution>
        </executions>
      </plugin>			

 

Then you'll be able to build all the artifacts.

You second problem, the execution of the job relies on a jar the may not be a bundle and actually this not the same jar in the latest versions of the framework. I mean it is recommended to split the project in 2 modules (jars) one with the definition and one with the runtime.

Anyway, the Studio uses maven to discover the jar required when executing the job, so for your tests you have 2 choices:

  1. place the file-input-0.1.0.jar in the local maven repository used by the studio, <studio_root>/configuration/.m2 . In the proper location : org/talend/components/file-input/0.1.0/file-input-0.1.0.jar
  2. change the maven repo the Studio uses to make it use you global user repository by editing the <studio_root>/configuration/config.ini file and add the following line at the end : maven.repository=global

I hope this helps.

 

 

Five Stars

Re: Issue while installing the component is ask for the <file-input-0.1.0>.jar and I have used the file-input-0.1.0-bundle.jar to install the component

Thanks for the support, will check and get back to you.

Tags (1)