felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: maven-bundle-plugin 2.3.7, version issue?
Date Fri, 10 Aug 2012 14:36:34 GMT
You can use the cleanVersions goal to convert versions to OSGi format, for example:

    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <executions>
            <execution>
                <phase>generate-sources</phase>
                <goals> 
                    <goal>cleanVersions</goal>
                </goals>
                <configuration>
                    <versions>
                        <scala.version.osgi>${scala.version}</scala.version.osgi>
                    </versions>
                </configuration>
            </execution>
        </executions>
    </plugin>

The cleaned versions are stored back into the project's properties using the given key, in
this case 'scala.version.osgi', so you can then use:

    <Fragment-Host>org.scala-lang-osgi.scala-actors;bundle-version=${scala.version.osgi}</Fragment-Host>

in your bundle instructions.

--
Cheers, Stuart

On 10 Aug 2012, at 10:28, Guofeng Zhang wrote:

> Hi,
> 
> I configure maven-bundle-plugin as the following:
>          <instructions>
>            <Fragment-Host> org.scala-lang-osgi.scala-actors;bundle-version=${scala.version}</Fragment-Host>
>          </instructions>
> But in MANIFEST.MF, it is:
>      Fragment-Host: org.scala-lang-osgi.scala-actors; bundle-version=2.10.0-SHANPSHOT
> 
> It cannot be deployed in Felix, the error message is :
> org.osgi.framework.BundleException: Could not create bundle object.
> ...
> Caused by: java.lang.NumberFormatException: For input string: "0-SNAPSHOT"
> Change "-SNAPSHOT"  to ".SNAPSHOT", that is,
>   Fragment-Host: org.scala-lang-osgi.scala-actors; bundle-version=2.10.0.SHANPSHOT
> fix the issue.
> 
> Is it a bug or the incorrect way I specify the version for it.
> 
> Thanks
> 
> Guofeng
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message