Trouble setting up EclipseLibrary under Maven plugin

32 views
Skip to first unread message

shafik....@enear.co

unread,
Sep 20, 2016, 10:37:45 AM9/20/16
to robotframework-eclipselibrary-users
First Off, many many thanks to Laurent Carbonnaux for developing this bridge library! it'a appreciated.

Now my help request -  as I just need assistance in getting this to run.

I'm setting up this library under robot-framework maven plugin, so install instructions were adapted somewhat - but something is still missing.

The resource file with EclipseLibrary Keywords is recognized just fine, the test file also gets executed though all FAIL, due to the error message produced from maven:
[ ERROR ] Error in file 'D:\samahomad\INGG_CoreHub\ch_svnroot\ui-portal-test-runner\target\tests\test-suites\Rest-test\A_TestEclipseLibrary_installation.html': Importing test library 'EclipseLibrary' failed: ImportError: No module named EclipseLibrary
Traceback (most recent call last):
  None
PYTHONPATH:
  D:\samahomad\INGG_CoreHub\ch_svnroot\ui-portal-test-runner\target\tests\libraries
  D:\samahomad\INGG_CoreHub\ch_svnroot\ui-portal-test-runner\target\tests\libraries\dblibrary-2.0.jar
  D:\samahomad\INGG_CoreHub\ch_svnroot\ui-portal-test-runner\target\tests\libraries\eclipselibrary-0.20-with-dependencies.jar
  C:\Users\samahomad\.m2\repository\org\robotframework\robotframework\3.0\Lib
  C:\Users\samahomad\.m2\repository\org\robotframework\robotframework\3.0\robotframework-3.0.jar\Lib
  __classpath__
  __pyclasspath__/
CLASSPATH:
  C:\Dev\Tools\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar

Now, my question:
    a) should I have the eclipseLibrary added to the path as below in my test-runner's project POM?   or should I rather...
    b) add a dependency from robotframework-maven-plugin ?? and if so, how do I go about expressing that dependency ?:

current pom config using the extra path solution
                    <plugin>
                        <groupId>org.robotframework</groupId>
                        <artifactId>robotframework-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>run-firefox</id>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <variables>
                                        ...
                                        <variable>RESOURCE_FOLDER:${project.build.directory}/tests/resources</variable>
                                        ...
                                    </variables>
                                    ...
                                    <extraPathDirectories>
                                        <extraPathDirectory>${project.build.directory}/tests/libraries</extraPathDirectory>
                                        <extraPathDirectory>${project.build.directory}/tests/libraries/eclipselibrary-0.20-with-dependencies.jar</extraPathDirectory>
                                    </extraPathDirectories>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

Many thanks in advance for any helping tips

Laurent Carbonnaux

unread,
Sep 20, 2016, 10:53:30 AM9/20/16
to robotframework-ec...@googlegroups.com
Hi Shafik,

I never use rflib with maven, so don't really know where it comes from.

I use a .bat fiel to launch the test, here it is
@echo off
set ECLIPSE_LIBRARY=dist/eclipselibrary-0.21-with-dependencies.jar
set ROBOTFRAMEWORK=libext/robotframework-2.8.7.jar
java -Xmx512m -XX:MaxPermSize=256M  -Xbootclasspath/a:%ECLIPSE_LIBRARY% -jar  %ROBOTFRAMEWORK% --debugfile jybot.log --loglevel DEBUG --outputdir results %* 

This mean you should add eclipselibrary-0.21-with-dependencies.jar in the classpath of roborframwork when you launch it.

Hope it helps a bit ;-)


regards,
Laurent


--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "robotframework-eclipselibrary-users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse robotframework-eclipselibrary-users+unsubscribe@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

shafik....@enear.co

unread,
Sep 20, 2016, 11:56:56 AM9/20/16
to robotframework-eclipselibrary-users
oh boy!  I'm so close... yet so far...

If only I could get the .jar properly recognized into the classpath...
Every source I've read points to maven plugin page instructing to add the jar as extraPathDirectories (as I did): http://robotframework.org/MavenPlugin/examples/javalibraries.html

However it still ain't working... I think I need to add it as a dependency, but I would need a maven artifactID reference...

do you have any plans to publish this library to the maven repositories ? it would be so usefull...

Laurent Carbonnaux

unread,
Sep 20, 2016, 11:59:50 AM9/20/16
to robotframework-ec...@googlegroups.com
I need to check how I can do that!

shafik....@enear.co

unread,
Sep 21, 2016, 5:39:06 AM9/21/16
to robotframework-eclipselibrary-users
I managed to get it running with Maven plugin.

Instead of following the instructions on the maven plugin page - which are somehow wrong, I did the following:

-I manually added/uploaded the .jar file to my "local" maven repository,
-Then I added a dependency to robotframework-maven-plugin and
-Voilá ! its working:-)

I still need to test something by removing the extraPathDirectory entry from the POM.

Next stage if all works, is uploading the jar file into the main repository (instead of locally on my workstation) so CI processes can pick it up as well.

If all works, maybe a good ideia would be to udate the Wiki page to reflect this new way to getting this to run ? I could help with it - though I', not experienced with Git

Laurent Carbonnaux

unread,
Sep 21, 2016, 6:05:39 AM9/21/16
to robotframework-ec...@googlegroups.com
yep! thanks
Reply all
Reply to author
Forward
0 new messages