openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "l.penet@senat.fr" <l.pe...@senat.fr>
Subject Re: Strange behaviour with @RunWith(CdiTestRunner.class)
Date Thu, 27 Oct 2016 08:58:11 GMT
On 27/10/2016 10:05, Gerhard Petracek wrote:
> hi ludovic,
>
> the classpath-scanner (in java-se mode) isn't aware of some locations.
> you can tweak e.g. your build-file - see e.g. [1].
>
> regards,
> gerhard
>
> [1] 
> https://github.com/CDIatWork/IdeaFork/blob/master/ideafork_ee6/pom.xml#L526
Well, yes, I can do that and ended doing somethin like that...

  <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.7</version>
<executions> <execution> <id>copy-resources</id> <!-- here the
phase you need --> <phase>validate</phase> <goals> <goal>copy-resources</goal>
</goals> <configuration> <outputDirectory>${project.basedir}/target/test-classes</outputDirectory>
<resources> <resource> <directory>${project.basedir}/src/main/resources/META-INF</directory>
<filtering>false</filtering> </resource> <resource> <directory>${project.basedir}/target/classes</directory>
<filtering>false</filtering> </resource> </resources> </configuration>
</execution> 
</executions> </plugin>


... but I would have prefered to be able to add a classpath to OWB scanner.
This way, I would have added target/classes, and zou.

Anyway, it is logical and quickly done. IMHO, it deserves to be added to 
the test module FAQ.

Thanks !

Ludovic

|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|


Mime
View raw message