Hi,

I gonna take a look on pax-exam PR.

A possible workaround is to use your custom Karaf distribution (with
updated startup.properties) as base for pax-exam.

Regards
JB

On Wed, May 4, 2022 at 10:11 AM Richard Hierlmeier
<[email protected]> wrote:
>
> Hi Alex,
>
> I tested your suggested solution, how ever it is not working. Log4j does 
> still not found the custom appender.
>
> Regards
>
>   Richard
>
>
>
>
> Am Mi., 4. Mai 2022 um 09:58 Uhr schrieb Domke, Alexander <[email protected]>:
>>
>> Hello Richard,
>>
>>
>>
>> I would have done it like this:
>>
>>
>>
>> import static org.ops4j.pax.exam.CoreOptions.bundle;
>>
>> import static org.ops4j.pax.exam.CoreOptions.maven;
>>
>> import org.ops4j.pax.exam.Option;
>>
>>
>>
>> @RunWith(PaxExam.class)
>>
>> public class MyTest  {
>>
>>
>>
>>   @Configuration
>>
>>   public static Option[] configuration() {
>>
>>     final List<Option> options = new ArrayList<>();
>>
>>     options.add(
>>
>>         bundle(
>>
>>             maven()
>>
>>                 .groupId("com.lmax")
>>
>>                 .artifactId("disruptor")
>>
>>                 .version("2.12.5")
>>
>>                 .getURL()));
>>
>>     return options;
>>
>>   }
>>
>>
>>
>>   @Test
>>
>>   public void bugFixed() throws Exception {
>>
>>     // your test code
>>
>>   }
>>
>> }
>>
>>
>>
>>
>>
>> Greeting
>>
>> Alex
>>
>>
>>
>> Von: Richard Hierlmeier [mailto:[email protected]]
>> Gesendet: Mittwoch, 4. Mai 2022 09:41
>> An: [email protected]
>> Betreff: Additional bundles in startup.properties in pax-exam test
>>
>>
>>
>>
>>
>> I have to write an integration test with pax-exam that tests a custom log4j2 
>> appender.
>>
>>
>>
>> To test it with the plain Karaf distribution I have to define the additional 
>> bundles in startup.properties.
>>
>> The changes in in the startup.properties file can be done with
>>
>>
>>
>> KarafDistributionOption.editConfigurationFilePut("etc/startup.properties",  
>> " mvn:com.lmax/.artifactId/disruptor/2.12.5  ", "9"));
>>
>>
>>
>> But how can the bundles be provisioned into the system folder?
>>
>>
>>
>> Regards
>>
>>
>>
>>   Richard
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, 
>> Fax: +49 711 7825-4000, Internet: www.cenit.com
>> Geschaeftsstellen (Branch Offices): Berlin, Frankfurt, Hamburg, Hannover, 
>> Muenchen, Oelsnitz, Ratingen, Saarbruecken
>> Vorstandsmitglieder (Members of the Board): Peter Schneck, Dr. Markus Wesel
>> Aufsichtsratsmitglieder (Supervisory Board Members): Rainer Koppitz 
>> (Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board), Prof. 
>> Dr. Isabell Welpe, Ricardo Malta
>> Bankverbindungen (Bank Accounts):
>> Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1040 
>> 00 SWIFT-CODE : DEUTDESS,
>> Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 
>> 0155 00 SWIFT-Code : COBADEFF600,
>> Registergericht (Registry court): Amtsgericht Stuttgart
>> Handelsregister (Commercial Register): HRB Nr. 19117
>> Umsatzsteuer (VAT) ID: DE 147 862 777

Reply via email to