You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by hwaastad <he...@waastad.org> on 2016/04/13 21:14:38 UTC

applicationcomposer scan exclude

Hi,
just wondering:

got a large project having deltaspike deps.

I need to annotate all @module/@classes with @jars('deltaspike').

Is it possible in app composer to "exclude" ds libs from scanning (or any
other cdi lib) in tests?

it's not a b ig deal, just makes my IT tests run a little slower...

/hw




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: applicationcomposer scan exclude

Posted by Romain Manni-Bucau <rm...@gmail.com>.
added few words on
http://tomee.apache.org/ng/developer/testing/applicationcomposer/index.html

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-04-14 12:31 GMT+02:00 hwaastad <he...@waastad.org>:
> OK.
>
> any docs on this?
>
> /hw
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136p4678142.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: applicationcomposer scan exclude

Posted by hwaastad <he...@waastad.org>.
OK.

any docs on this?

/hw



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136p4678142.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: applicationcomposer scan exclude

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Yes you nees a single app by execution but there is a system prop to force
it and then you ignore @App on the model class and can define multiple
executions
Le 14 avr. 2016 12:27, "hwaastad" <he...@waastad.org> a écrit :

> @Romain,
> yeah, i noticed your blog post regarding this.
>
> as far as I can see I need @application and
> runwith(SingleApplicationComposerRunner.class) to get this working.
> However @application cannot be used more than once (annotated test class)
> or
> else you'll get an " IllegalArgument Ambiguous @Application"
>
> So I need to build up an suite of test classes for this. Am I right?
>
> /hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136p4678140.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: applicationcomposer scan exclude

Posted by hwaastad <he...@waastad.org>.
@Romain,
yeah, i noticed your blog post regarding this.

as far as I can see I need @application and
runwith(SingleApplicationComposerRunner.class) to get this working.
However @application cannot be used more than once (annotated test class) or
else you'll get an " IllegalArgument Ambiguous @Application"

So I need to build up an suite of test classes for this. Am I right?

/hw



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136p4678140.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: applicationcomposer scan exclude

Posted by Romain Manni-Bucau <rm...@gmail.com>.
The single flavor of app composer (runner/rule/...):
https://github.com/apache/tomee/blob/master/container/openejb-core/src/main/java/org/apache/openejb/testing/SingleApplicationComposerRunner.java
Le 13 avr. 2016 22:36, "hwaastad" <he...@waastad.org> a écrit :

> @Romain,
>
> @cdiextension() was what I was looking for.
>
> Thanks alot!
>
> Do you mean by using appcomposerrule and @classrule?
> (any hints appreciated :-) )
>
> /hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136p4678138.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: applicationcomposer scan exclude

Posted by hwaastad <he...@waastad.org>.
@Romain,

@cdiextension() was what I was looking for.

Thanks alot!

Do you mean by using appcomposerrule and @classrule?
(any hints appreciated :-) )

/hw



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136p4678138.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: applicationcomposer scan exclude

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I m not sure I fully get the question so maybe answering in the dark:

- if you want to exclude extension: @CdiExtensions or a custom
LoaderService work. Note you can also just configure ds extension to not be
activated.
- if you want to automatically add it for all tests either an openejb
extension or a reusable app composer module would work

Finally note you can deploy once and have N test classes using the same
deployment/container which makes the boot a little smaller but the whole
suite really faster (from 12mn to 3mn on a recent project).
Le 13 avr. 2016 21:46, "hwaastad" <he...@waastad.org> a écrit :

> Hi,
> just wondering:
>
> got a large project having deltaspike deps.
>
> I need to annotate all @module/@classes with @jars('deltaspike').
>
> Is it possible in app composer to "exclude" ds libs from scanning (or any
> other cdi lib) in tests?
>
> it's not a b ig deal, just makes my IT tests run a little slower...
>
> /hw
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/applicationcomposer-scan-exclude-tp4678136.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>