antosgiosgi-bundlebndtools

bndtools : How to get latest version for a jar file or a plugin


I am new in bndtools. I am wondering if there is any way to retrieve the latest version of my jar file? My lib folder has a lot of JARs version (My-Api-1.0.50, My-Api-1.0.85, My-Api-1.0.90)?

I managed to resolve dependencies by using ant. My JARs files are saved in lib folder. I want to use it in my bnb.bnb. But I need to use the latest version.

instead of :

-buildpath:     lib/My-Api-1.0.90.jar;version=file

I want something like that or an alternative solution :

-buildpath:     lib/My-Api-[**latestVertion**].jar;version=file

Please advise?? Thank you


Solution

  • I mangaed to solve this problem by:

    <move tofile="lib/MyApi-latest.jar" force="true">
        <fileset dir="lib">
            <include name="My-Api*.jar" />
            <exclude name="My-Api-latest.jar"/>
        </fileset>
    </move>
    

    -buildpath: lib/My-Api-latest.jar;version=file