[ 
https://issues.apache.org/jira/browse/FELIX-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stuart McCulloch resolved FELIX-1820.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: maven-bundle-plugin-2.3.4

In the 2.3.4 bundleplugin there's a goal called "cleanVersions" that lets you 
convert versions to the OSGi format before they're used in filters, etc. This 
can be useful in situations where bnd may not automatically correct versions, 
such as in fragment ranges:

   <plugin> 
     <groupId>org.apache.felix</groupId> 
     <artifactId>maven-bundle-plugin</artifactId> 
     <extensions>true</extensions> 
     <version>2.3.4</version> 
     <executions>
       <execution>
         <phase>validate</phase>
         <goals>
           <goal>cleanVersions</goal>
         </goals>
         <configuration>
           <versions>
             <osgiProjectVersion>${project.version}</osgiProjectVersion>
           </versions>
         </configuration>
       </execution>
     </executions>
   </plugin> 

But there's also a much simpler solution, which is to use ${Bundle-Version} - 
the bundleplugin sets this by default to ${project.version} (converted to OSGi 
format).

> Fragment-Host version not converted
> -----------------------------------
>
>                 Key: FELIX-1820
>                 URL: https://issues.apache.org/jira/browse/FELIX-1820
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.1
>            Reporter: Leonardo Uribe
>            Assignee: Stuart McCulloch
>             Fix For: maven-bundle-plugin-2.3.4
>
>
> Hi
> In few words, I need to include something like this:
>                 
> <Fragment-Host>org.apache.myfaces.core.api;bundle-version="[${project.version},
>  1.3.0)"</Fragment-Host>
> if the value ${project.version} return 1.2.8-SNAPSHOT, the expression is 
> resolved as 1.2.8-SNAPSHOT, and it should be 1.2.8.SNAPSHOT
> See MYFACES-2290 for details (the file MYFACES-2290-no-activator.patch shows 
> the context.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to