Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Tycho and JUnit
Tycho and JUnit [message #1791417] Fri, 29 June 2018 06:49 Go to next message
Chris Merg is currently offline Chris MergFriend
Messages: 12
Registered: January 2018
Junior Member
Hello everyone,

I'm currently trying to configure some JUnit Tests for my RAP project and it's working well before deploying. Now when I try to deploy my war file to Tomcat, Tycho added "org.eclipse.rap.rwt.testfixture" and "org.junit" to my config.ini while they are not added in my project.product file. I just added those 2 in my Manifest.MF as Imported Packages (otherwise my test class cannot import "org.eclipse.rap.rwt.testfixture.TestContext" and "org.junit.Rule").

Once I try to deploy the war to tomcat, my Plugin does not start anymore, I'm getting this error when trying to start from OSGI Console:

BundleException: Could not resolve module: Project [3]
  Unresolved requirement: Import-Package: org.eclipse.rap.rwt.testfixture; version="3.4.0"
    -> Export-Package: org.eclipse.rap.rwt.testfixture; bundle-symbolic-name="org.eclipse.rap.rwt.testfixture"; bundle-version="3.4.0.20171017-0945"; version="3.4.0"
       org.eclipse.rap.rwt.testfixture [44]
         Unresolved requirement: Import-Package: javax.servlet; version="[3.1.0,4.0.0)"


So how can I exclude JUnit and Testfixture from my war file while still being able to import them to my Test classes?

Thanks in advance,
Chris
Re: Tycho and JUnit [message #1791466 is a reply to message #1791417] Fri, 29 June 2018 20:19 Go to previous messageGo to next message
Chris Merg is currently offline Chris MergFriend
Messages: 12
Registered: January 2018
Junior Member
Nevermind, I just needed to add ";resolution:=optional" to Required bundle.
Re: Tycho and JUnit [message #1791526 is a reply to message #1791466] Mon, 02 July 2018 02:32 Go to previous message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
Have you tried excluding the test bundles from your feature so Tycho doesn't include them or their dependencies in the WAR file?
Previous Topic:[ANN] RAP 3.5 released
Next Topic:RAP dependencies hell
Goto Forum:
  


Current Time: Thu Apr 25 12:02:03 GMT 2024

Powered by FUDForum. Page generated in 0.02675 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top