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

Bug 342851

Summary: Artifacts from POM dependencies missing in eclipse-repository
Product: z_Archived Reporter: Tobias Oberlies <t-oberlies>
Component: TychoAssignee: Tobias Oberlies <t-oberlies>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: esmond_lee, hwellmann.de, lukasz.jastrzebski, pascal.leclercq
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 342876    

Description Tobias Oberlies CLA 2011-04-14 10:44:16 EDT
See https://issues.sonatype.org/browse/TYCHO-570

(Created this proxy in order to use the "blocks" relationship in Bugzilla)
Comment 1 Tobias Oberlies CLA 2011-04-27 10:05:02 EDT
Original description:

Bundles that come into the target platform through POM dependencies are not properly included into the p2 repository built by eclipse-repository: the IUs are included, but the JAR files (and the corresponding entry in the artifacts.xml) are missing.

An example project is attached to this mailing list message by Hamza Soussou [1]

The root cause of this issue is that the POM dependency artifacts are not listed in the .meta/p2-artifacts.properties file, and hence the p2 artifact repository view of the local Maven repository (LocalArtifactRepository) does not include the artifact.

And to make things worse, the issue doesn't even make the build fail. It succeeds even though the eclipse-repository does not contain the expected content. This is caused by a limitation in the MirrorApplication used by eclipse-repository (see TYCHO-561 [2]).


[1] http://software.2206966.n2.nabble.com/tycho-p2-publisher-plugin-0-11-0-SNAPSHOT-does-not-publish-bundles-from-maven-repo-tt5906321.html#a5910069
[2] https://issues.sonatype.org/browse/TYCHO-561
Comment 2 Tobias Oberlies CLA 2011-05-26 16:37:51 EDT
Resolved with commit b005616 [1]. All commits that contributed to the fix have a commit message prefixed with "TYCHO-570".

[1] https://github.com/sonatype/sonatype-tycho/commit/b005616b284127e10d546da334c90e3a4a1d37ad
Comment 3 Jan Sievers CLA 2011-07-04 08:50:50 EDT
*** Bug 351018 has been marked as a duplicate of this bug. ***
Comment 4 esmond_lee CLA 2011-08-01 21:12:07 EDT
I'm using the latest 0.13.0-SNAPSHOT (as of 8/1/2011) and this fix doesn't seem to work with SNAPSHOT pom dependencies. 

The error I am getting is as follows:

Installation failed.
An error occurred while collecting items to be installed
 session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal
.p2.engine.phases.Collect, operand=, action=).
 Artifact not found: osgi.bundle,com.ccadllc.dta.messages,1.0.0.20110801082601.
Caused by:  java.io.FileNotFoundException: I:\.m2\repository\com\ccadllc\dta\com
.ccadllc.dta.messages\1.0.0-20110801.152612-9\com.ccadllc.dta.messages-1.0.0-201
10801.152612-9.jar (The system cannot find the path specified)

In the error message, notice that the plugin tries to resolve the dependency from the local repository using the date/timestamp version folder. This folder does not exist, but 1.0.0-SNAPSHOT does exist. If I created the 1.0.0-20110801.152612-9 folder and copied the com.ccadllc.dta.messages-1.0.0-201
10801.152612-9.jar it works okay, however, since we have new builds everyday, this date/timestamp of the snapshot build would change daily.

Should the plugin try to resolve the dependency from the p2 artifact repository instead of the local maven repository?

We are using Maven 3 and Nexus as our repository.
Comment 5 Tobias Oberlies CLA 2011-08-02 07:31:29 EDT
(In reply to comment #4)
> I'm using the latest 0.13.0-SNAPSHOT (as of 8/1/2011) and this fix doesn't seem
> to work with SNAPSHOT pom dependencies.

This issue is tracked as bug 352154.