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

Bug 512182

Summary: Version 1.0.0 fails with "Could not assemble p2 repository: Mirroring failed"
Product: z_Archived Reporter: Greg Watson <g.watson>
Component: TychoAssignee: Jan Sievers <jan.sievers>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jan.sievers, malaperle
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/91064
https://git.eclipse.org/r/91087
https://git.eclipse.org/c/ptp/org.eclipse.ptp.master.git/commit/?id=19c29ed9c276642d6e6bddbed0def485abf6afd6
https://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=b61b6aba32c990eb3d72f7fab82e8933c7834529
Whiteboard:

Description Greg Watson CLA 2017-02-14 09:31:44 EST
My build works fine with 0.26.0 but when I change it to 1.0.0 it fails.

Repeat by:

git clone https://git.eclipse.org/r/ptp/org.eclipse.ptp.master
cd org.eclipse.ptp.master
git checkout ptp_9_1
mvn clean install

... succeeds ...

Edit pom.xml and change the tycho version to 1.0.0

mvn clean install

...
[INFO] ------------------------------------------------------------------------
[INFO] Building org.eclipse.ptp.rcp.sysmon-product 9.1.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] Deleting /Users/gw6/Work/git/org.eclipse.ptp.master/org.eclipse.ptp.rcp.sysmon-product/target
[INFO] 
[INFO] --- tycho-packaging-plugin:1.0.0:build-qualifier-aggregator (default-build-qualifier-aggregator) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] The project's OSGi version is 9.1.2.201702140129
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean-1) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/gw6/Work/git/org.eclipse.ptp.master/org.eclipse.ptp.rcp.sysmon-product/src/main/resources
[INFO] 
[INFO] --- tycho-source-plugin:1.0.0:plugin-source (attach-source) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] 
[INFO] --- target-platform-configuration:1.0.0:target-platform (default-target-platform) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:1.0.0:publish-products (default-publish-products) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:1.0.0:publish-categories (default-publish-categories) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:1.0.0:attach-artifacts (default-attach-artifacts) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] 
[INFO] --- tycho-p2-repository-plugin:1.0.0:assemble-repository (default-assemble-repository) @ org.eclipse.ptp.rcp.sysmon-product ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] PTP Products ....................................... SUCCESS [  0.134 s]
[INFO] org.eclipse.ptp.rcp.sysmon ......................... SUCCESS [  1.356 s]
[INFO] org.eclipse.ptp.rcp.sysmon ......................... SUCCESS [  1.329 s]
[INFO] org.eclipse.ptp.product ............................ SUCCESS [  0.385 s]
[INFO] org.eclipse.ptp.rcp.sysmon-product ................. FAILURE [  2.521 s]
[INFO] org.eclipse.ptp-product ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 53.117 s
[INFO] Finished at: 2017-02-13T20:30:52-05:00
[INFO] Final Memory: 97M/1510M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-repository-plugin:1.0.0:assemble-repository (default-assemble-repository) on project org.eclipse.ptp.rcp.sysmon-product: Could not assemble p2 repository: Mirroring failed: No repository found at file:/Users/gw6/Work/git/org.eclipse.ptp.master/org.eclipse.ptp.rcp.sysmon-product/target/repository/. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.eclipse.ptp.rcp.sysmon-product
Comment 1 Jan Sievers CLA 2017-02-14 10:38:46 EST
I can reproduce the problem.

This is caused by createArtifactRepository=false in

<plugin>
 <groupId>org.eclipse.tycho</groupId>
 <artifactId>tycho-p2-repository-plugin</artifactId>
 <version>${tycho-version}</version>
 <configuration>
  <createArtifactRepository>false</createArtifactRepository>
 </configuration>
</plugin>

Looks like a regression we introduced with bug 357513 where we did not handle the case that there is no artifact repo correctly.

As a workaround with 1.0.0 for now, you can use createArtifactRepository=true
Comment 2 Eclipse Genie CLA 2017-02-14 10:50:00 EST
New Gerrit change created: https://git.eclipse.org/r/91064
Comment 3 Eclipse Genie CLA 2017-02-14 14:20:44 EST
New Gerrit change created: https://git.eclipse.org/r/91087