The situation is even more weird: <systemProperties> are not supported by surefire plugin, while <systemPropertyVariables> are not supported by jetty plugin.
Maybe this is going to be useful for someone else - I spent a lot of time to figure it out. On Thu, Aug 7, 2014 at 9:51 PM, Ilya Obshadko <ilya.obsha...@gmail.com> wrote: > I finally found the answer. > > In fact, deprecated maven <systemProperties> tag is not just deprecated, > it's now ignored. When I've changed that to <systemPropertyVariables> > everything started to work as expected. > > > On Fri, Aug 8, 2014 at 2:00 AM, Ilya Obshadko <ilya.obsha...@gmail.com> > wrote: > >> I don't have any problems with module classes (yet). The problem is only >> with injected configuration symbols. >> >> When I'm running 'mvn test', I can see that module binding works fine, >> but when it comes to service contribution methods, I receive an error. >> >> So I have a method in my main application module: >> >> public static void contributeMyCustomService ( >> @Inject @Symbol("my.custom.symbol") String mySymbol ) { >> // something here >> } >> >> The error I receive is: >> >> [2014-08-07 18:42:57,176] [ERROR] [Registry] Symbol 'my.custom.symbol' is >> not defined. >> >> So, you suggest me to add QaModule.class as a last argument to PageTester >> constructor, and contribute all missing configuration symbols from there. >> I've tried that, but still have the same result. >> QaModule contributeApplicationDefaults is never being called. >> >> I can't understand what to do next, because configuration symbol does >> present in maven-surefire-plugin configuration section. >> >> >> >> On Thu, Aug 7, 2014 at 6:36 PM, Lance Java <lance.j...@googlemail.com> >> wrote: >> >>> As I mentioned, there's a PageTester constructor which accepts module >>> classes. You can explicitly pass the modules you want to test. >>> >>> Please ignore my earlier comments regarding pom.xml. I was assuming you >>> were talking about the jar manifest when you were discussing maven >>> surefire >>> properties. >>> >>> It's best to keep your test config out of maven IMHO. This way it's >>> easier >>> to run tests in your ide. >>> >> >> >> >> -- >> Ilya Obshadko >> >> > > > -- > Ilya Obshadko > > -- Ilya Obshadko