You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Subrahmanyam Sistha <su...@gmail.com> on 2018/08/31 12:18:24 UTC
Configure resolution:=optional from maven bundle plugin
HI Team,
I need help to configure a dependency as optional,
Using maven-bundle-plugin:3.4.0,
In the Import-packages section, they refereed as resolution:optional
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.4.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
<Import-Package>
org.junit.*;/resolution=optional/,
junit.framework.*;/resolution=optional/
</Import-Package>
<_nouses>true</_nouses>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
Expectation is generated OSGI manifest file should contains the
resolution:=optional for that library but the changes not reflecting.
Expectation :
junit.framework;resolution:=optional
but in generated manifest file
junit.framework
Did i miss any configuration to reflect it resolution as optional in the
generated manifest file?
On investigation Maven-Bundle-Plugin, BundlePlugin.java File, I realized
that if the artifact contains the optional true then reflected in the
generated manifest file as resolution:=optional
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
But the previous solution should work according to the BundlePlugin.java
source code,
Please help me, guide me to proceed further.
--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Configure resolution:=optional from maven bundle plugin
Posted by Francois Papon <fr...@openobject.fr>.
Hi,
You should ask on the Apache Felix mailing list.
regards,
François Papon
fpapon@apache.org
Le 31/08/2018 à 16:18, Subrahmanyam Sistha a écrit :
> HI Team,
>
> I need help to configure a dependency as optional,
>
> Using maven-bundle-plugin:3.4.0,
>
> In the Import-packages section, they refereed as resolution:optional
>
>
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>3.4.0</version>
> <extensions>true</extensions>
> <executions>
> <execution>
> <id>bundle-manifest</id>
> <phase>process-classes</phase>
> <goals>
> <goal>manifest</goal>
> </goals>
> <configuration>
> <instructions>
> <Export-Package>*</Export-Package>
> <Import-Package>
> org.junit.*;/resolution=optional/,
> junit.framework.*;/resolution=optional/
> </Import-Package>
> <_nouses>true</_nouses>
> </instructions>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
>
> Expectation is generated OSGI manifest file should contains the
> resolution:=optional for that library but the changes not reflecting.
>
> Expectation :
> junit.framework;resolution:=optional
>
> but in generated manifest file
> junit.framework
>
> Did i miss any configuration to reflect it resolution as optional in the
> generated manifest file?
>
> On investigation Maven-Bundle-Plugin, BundlePlugin.java File, I realized
> that if the artifact contains the optional true then reflected in the
> generated manifest file as resolution:=optional
>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
>
> <scope>provided</scope>
> <optional>true</optional>
> </dependency>
>
>
> But the previous solution should work according to the BundlePlugin.java
> source code,
>
> Please help me, guide me to proceed further.
>
>
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org