eclipsep2pdeantbuilder

Change metadata and artifact Repository names with p2 and Ant builder from build.xml file


I want to change the name of my resulting repositories when running a Ant build for a deplayable feature from: "repository name='file://buildRepo - artifacts' t.." to a more friendly one. i have tried using

...
<property name="p2.metadata.repo"       value="file:${basedir}/buildRepo"/>
<property name="p2.metadata.repo.name"       value="Friendly Name"/>
    <property name="p2.artifact.repo"       value="file:${basedir}/buildRepo"/>
    <property name="p2.artifact.repo.name"       value="Friendly Name"/>
..
<eclipse.gatherFeature 
       metadataRepository="${p2.metadata.repo}"
       metadataRepositoryName="${p2.metadata.repo.name}"
       artifactRepository="${p2.artifact.repo}"
       artifactRepositoryName="${p2.artifact.repo.name}"
       buildResultFolder="${feature.temp.folder}"
       baseDirectory="${basedir}"
    />
...

The p2.gathering is not used so that these cand apply (as documented in the Eclipse wiki). What am i doing wrong?


Solution

  • After the generation of your repo you can use the p2.mirror ant task to accomplish this. A detailed description of the task can be found here. Eclipse p2 mirror help.

    <p2.mirror source="${p2.artifact.repo}">
    <destination location="file:///${p2.artifact.repo}_beautifulName" name="p2.repo.name"  />
    

    or separte mirror tasks for metadata and artifact if you need them.