Cannot use PAX URL assembly protocol with automatically running packages in Felix config.properties

I am trying to use the PAX URL so that I can collect unpacked packages on the fly.

If I put pax-url-assembly-1.2.1.jar in autorun pools, then type

install assembly: path / to / my / folder

everything is working. The problem is that I want to provide felix to these folders in the configuration file using> felix.auto.start.1 = assembly: path / to / my / folder

If I do this, I get the exception “Unknown protocol: assembly”.

I tried to load the PAX URL at level 1 and set the initial default level of all other packages to 10. It will not help. I think this is the “System Kit” itself, which reads the configuration before loading any package, and therefore the “build” is not understood.

My guess: I need to tell Felix to load the PAX URL directly when Felix starts.

Any ideas? I got it?:)

Thank!

+2
source share
2 answers

Try putting the PAX URL in a folder bundlein Apache Felix and run it with the parameters -Djava.protocol.handler.pkgs=org.ops4j.pax.url.

Here is a post describing Apache Felix development in Eclipse

+4
source

! Declarative Services maven-SCR, pax-url servicecomponents.xml, ( target/classes). , scr, , :

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-scr-plugin</artifactId>
    <version>1.7.0</version>
    <executions>
        <execution>
            <id>generate-scr-scrdescriptor</id>
            <goals>
                <goal>scr</goal>
            </goals>
            <configuration>
                <!-- Without this, PAX-URL won't work -->
                <outputDirectory>target/classes</outputDirectory>
            </configuration>
        </execution>
    </executions>
</plugin>
+2

Source: https://habr.com/ru/post/1794940/


All Articles