Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351884

Summary: Bogus download of p2 metadata for non-p2 artifacts
Product: z_Archived Reporter: Harald Wellmann <hwellmann.de>
Component: TychoAssignee: Igor Fedorenko <igor>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: igor, t-oberlies
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Sample product to reproduce the problem none

Description Harald Wellmann CLA 2011-07-12 14:38:26 EDT
Build Identifier: Tycho 0.13.0-SNAPSHOT

Building an eclipse-repository project including both Maven and p2 artifacts, Tycho tries to download p2 metadata for each plain old Maven dependency, which does not make sense.

The initial build takes very long, since Tycho tries each configured repository for each dependency.

Example:

Downloading: https://repository.sonatype.org/content/repositories/forge/org/apache/aries/org.apache.aries.util/0.3/org.apache.aries.util-0.3-p2metadata.xml
Downloading: http://repo1.maven.org/maven2/org/apache/aries/org.apache.aries.util/0.3/org.apache.aries.util-0.3-p2metadata.xml
Downloading: https://repository.sonatype.org/content/repositories/forge/org/apache/aries/org.apache.aries.util/0.3/org.apache.aries.util-0.3-p2artifacts.xml
Downloading: http://repo1.maven.org/maven2/org/apache/aries/org.apache.aries.util/0.3/org.apache.aries.util-0.3-p2artifacts.xml


Reproducible: Always

Steps to Reproduce:
Unpack the attached archive. (Site with 1 feature containing 1 Maven bundle).
Run mvn clean install and watch the download messages.

Delete the artifact and try again:
rm -fr ~/.m2/repository/org/apache/aries/org.apache.aries.util/
mvn clean install

Same result.
Comment 1 Harald Wellmann CLA 2011-07-12 14:39:32 EDT
Created attachment 199523 [details]
Sample product to reproduce the problem
Comment 2 Igor Fedorenko CLA 2011-07-13 00:58:49 EDT
Should be fixed now. Thank you for spotting this.
Comment 3 Tobias Oberlies CLA 2011-07-13 10:49:38 EDT
This behaviour was aiming at preventing re-publishing of p2 metadata. However it has a severe performance impact for very limited gain, so the behaviour was removed.

We will need to address the re-publishing on a larger scale again, e.g. through embedding p2 metadata in artifacts. (But not as part of this bug.)
Comment 4 Harald Wellmann CLA 2011-07-14 14:27:14 EDT
Just tested the latest snapshot, which works fine. Thanks for fixing this so quickly!