Bug 539552 - Generate download.stats for artifacts.xml
Summary: Generate download.stats for artifacts.xml
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Mickael Istria CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 539733
Blocks:
  Show dependency tree
 
Reported: 2018-09-27 05:09 EDT by Mickael Istria CLA
Modified: 2021-04-28 16:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2018-09-27 05:09:39 EDT
Tycho metadata plugin should generate `download.stats` property for artifacts.
Comment 1 Eclipse Genie CLA 2018-10-01 11:47:48 EDT
New Gerrit change created: https://git.eclipse.org/r/130248
Comment 2 Jan Sievers CLA 2018-10-02 02:44:16 EDT
is this a duplicate of bug 341744 ?
Comment 3 Mickael Istria CLA 2018-10-02 03:47:24 EDT
(In reply to Jan Sievers from comment #2)
> is this a duplicate of bug 341744 ?

No, but they are deeply related.
This issue here is about generating the "download.stats" property for artifacts, and to have them published with such properties so that consumers which have a p2.statsURI set in their artifact repo (like SimRel) will trigger a HEAD request to the download server.
This patch doesn't cover the addition of p2.statsURI in the repo.
Comment 5 Mickael Istria CLA 2018-10-02 04:09:08 EDT
wiki.eclipse.org is currently unlogging me for no good reason whenever I try to push a change. I'm leaving the N&N change here and will move it to wiki when it's in a better mood.




* {{bug|538729}} Tycho 1.3.0 surefire plugin supports starting applications that use org.apache.felix.scr bundle in place of org.eclipse.equinox.ds (like Eclipse Platform 4.10 based target-platforms)
* {{bug|539552}} Support for <tt>download.stats</tt> property on artifacts metadata. In order to (partially) enable p2 download stats as documented in [[Equinox_p2_download_stats]], you can now configure you <tt>tycho-p2-plugin:p2-metadata</tt> execution to add the necessary property on the artifacts:
<source lang="xml">
   <plugin>
     <groupId>org.eclipse.tycho</groupId>
     <artifactId>tycho-p2-plugin</groupId>
     <configuration>
        <generateDownloadStatsProperty>true</generateDownloadStatsProperty>
     </configuration>
   </plugin>
</source>
or alternatively, you can override the <tt>tycho.generateDownloadStatsProperty</tt> property either by CLI with <tt>mvn -Dtycho.generateDownloadStatsProperty=true ...</tt> or by adding <tt><tycho.generateDownloadStatsProperty>true</tycho.generateDownloadStatsProperty></tt> in the <tt><properties></tt> element of your pom.xml.

This results in this in artifacts.xml (and derived artifacts.jar and artifacts.xml.xz):
<source lang="xml">
  <artifacts size='4'>
    <artifact classifier='osgi.bundle' id='bundle' version='1.0.0.123abc'>
      <properties size='9'>
        <!-- ... -->
        <property name='download.stats' value='bundle/1.0.0.123abc'/>
        <!-- ... -->
      </properties>
    </artifact>
    <artifact classifier='osgi.bundle' id='bundle' version='1.0.0.123abc'>
      <processing size='1'>
        <step id='org.eclipse.equinox.p2.processing.Pack200Unpacker' required='true'/>
      </processing>
      <properties size='12'>
        <!-- ... -->
        <property name='download.stats' value='bundle/1.0.0.123abc'/>
        <!-- ... -->
      </properties>
    </artifact>
</source>
Comment 6 Mickael Istria CLA 2018-10-02 07:10:30 EDT
I could finally modify the wiki and add it to N&N.
Closing!
Comment 7 Eclipse Genie CLA 2018-10-02 13:16:40 EDT
New Gerrit change created: https://git.eclipse.org/r/130325